.pht-categories {
    margin: auto;
    max-width: 1200px;
}

.categories-contents {
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 1fr;
    grid-column-gap: 30px;
    grid-row-gap: 30px;
}

.categories-contents .pht-category {
    border-radius: 5px;
    width: 100%;
    background: #efefef;
    margin-bottom: 15px;
}

@media screen and (max-width: 600px) {
    .categories-contents {
        display: block;
    }
    .categories-contents .pht-category {
        width: auto;    
    }
}

.categories-contents .pht-category .pht-category-details {
    padding: 15px;
}

.categories-contents .pht-category h2 {
    padding: 0;
    margin: 0;
    margin-bottom: 15px;
    font-size: 24px;
    font-weight: bold;
}

.categories-contents .pht-category img {
    width: 100%;
}

.categories-contents .pht-category.opened {
    background-color: #999;
}

.categories-contents .pht-category .pht-category-products {
    display: none;
}

.categories-contents .pht-category.opened .pht-category-products {
    display: block;
    padding: 15px;
    background: #efefef;
    border-top: 1px solid #666666;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}

.categories-contents .pht-category-secondary-products.pht-secondary-select .pht-product {
    display: none;
}

.categories-contents .pht-product {
    cursor: pointer;
}

.pht-tiered-category-selector .pht-category {
    cursor: pointer;
}

.categories-contents .pht-category .pht-category-products.single {
    display: none;
}
.categories-contents .pht-category.opened .pht-category-products.single {
    display: none;
}

.categories-contents .pht-category .pht-category-secondary-products {
    display: none;
}
.categories-contents .pht-category.opened .pht-category-secondary-products{
    display: block;
    padding: 15px;
    background: #efefef;
    border-top: 1px solid #666666;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}
.categories-contents .pht-category.opened .pht-category-secondary-products.single{
    display: none;
}

.categories-contents .pht-product.multiple {
    display: flex;
    margin-bottom: 15px;
    padding: 10px;
}

.categories-contents .pht-product.selected {
    background: green;
}

.categories-contents .pht-product.input:hover {
    background: #fff;
    cursor: pointer;
}

.categories-contents .pht-product.multiple .pht-product-terms {
    font-size: 90%;
    font-style: italic;
}
.categories-contents .pht-product.multiple .pht-product-details {
    flex: 3;
}

/**
* Extending
*/
.categories-contents .pht-category .pht-category-details {
    display: block;
}

.categories-contents .pht-category.pht-category-imaged .pht-category-details  {
    display: flex;
    flex-direction: column;
    position: relative;
}

.categories-contents .pht-category.pht-category-imaged h2 {
    order: 2;
    position: absolute;
    width: 100%;
    text-align: center;
    color: #fff;
    text-shadow: 2px 2px 2px #000;
    margin-left: -15px;
}
.categories-contents .pht-category.pht-category-imaged .pht-category-image {
    margin-left: -15px;
    margin-right: -15px;
    margin-top: -15px;
    order: 1;
}
.categories-contents .pht-category .pht-category-price {
    order: 3;
    margin-bottom: 15px;
}
.categories-contents .pht-category .pht-category-select {
    order: 4;
    padding: 10px;
    text-transform: uppercase;
    font-weight: bold;
    background-color: #676767;
    color: #fff;
    border: transparent;
    width: 100%;
}
.categories-contents .pht-category .pht-secondary-selector {
    width: 100%;
    padding: 7px;
}

/**
* Summary styling
*/

.pht-summary-contents .pht-categories-summary .zone .title {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #ccc;
    margin-bottom: 15px;
    padding-top: 15px;
    font-size: 18px;
    font-weight: bold;
}
.pht-summary-contents .pht-categories-summary .zone.zone-no-zone .title {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid transparent;
    margin-bottom: 0px;
    padding-top: 0px;
    font-size: 18px;
}
.pht-summary-contents .pht-categories-summary .zone.zone-no-zone {
    margin-bottom: 0px;
    padding-top: 15px;
}
.pht-summary-contents .pht-product-summary .pht-product-title {
    display: flex;
    justify-content: space-between;
}
.pht-summary-contents .pht-product-summary .pht-product-title .qty-price {
    display: flex;
}
.pht-summary-contents .pht-product-summary .pht-product-title .qty-price .qty:before {
    content: 'x';
}
.pht-summary-contents .pht-product-summary .pht-product-title .qty-price .price {
    margin-left: 15px;
}

.pht-summary-contents .pht-categories-summary {
    display: flex;
    flex-direction: column;
}

.pht-product.input-selector .quantity-selector {
    width: 100%;
    max-width: 100%;
    text-align: right;
}

/**
* Set the order of the elements in the summary
*/

.pht-summary-contents .pht-categories-summary  > div {
    order: 10;
}

.pht-summary-contents .pht-categories-summary > div.zone.zone-no-zone {
    order: 1;
}

.pht-category.pht-disabled {
    display: none;
    background: #f00;
}

.pht-category .pht-product.pht-disabled {
    display: none;
    background: purple;
}

.pht-category.pht-hide {
    display: none;
    background: #f00;
}

.pht-category .pht-product.pht-hide {
    display: none;
    background: purple;
}

.pht-category.pht-inactive {
    position: relative;
}
.pht-category.pht-inactive::before {
    content: '';
    background-color: rgba(255,255,255,0.4);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

.pht-category-tiered-products-wrapper {
    display: none;
}

.categories-contents .pht-category .pht-category-tiered-products {
    display: none;
    padding: 15px;
    background: #efefef;
    border-top: 1px solid #666666;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}

.categories-contents .pht-category.opened .pht-category-tiered-products {
    display: block;
}

/** if the product is only one don't display it */
.categories-contents .pht-category.opened .pht-category-tiered-products.single {
    display: none;
}

.pht-tiered-category-selector {
    text-decoration: none;
    display: flex;
    flex-direction: row;
    margin-bottom: 15px;
    justify-content: space-between;
    background-color: #fff;
    padding: 15px;
}

.pht-tiered-category-selector.selected {
    background: green;
}