/**
 * Shared product styling for both category pages and home page
 * This ensures consistent product display across different page types
 * Higher specificity to override default Magento styling
 */

/* Product container styling - increased specificity */
body .products.wrapper.grid .products.list.items.product-items,
body .products-grid .products.list.items.product-items {
    display: grid;
    gap: 40px 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Product item info styling - override default */
body .product-item-info {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

body .product-item .product-image-wrapper {
    height: initial;
    background-color: #EAEAE8;
}

body .product-item .product-image-photo {
    position: initial;
}

body .product-item .product-image-photo {
    aspect-ratio: 80 / 52;
    object-fit: contain;;
}

.product-item .product-item-name > a, .product-item .product.name a > a {
    font-family: Oswald, Helvetica, Sans-Serif, serif !important;
    text-transform: uppercase;
    font-size: 16px !important;
    letter-spacing: .32px;
    line-height: 22px;
    color: #000;
    font-weight: bold;
    text-decoration: none;
}

.product-item .product-item-actions {
    position: absolute;
    right: 0;
    z-index: 1;
}

.product-item .product-item-inner {
    display: none;
}

.product-item .product-image-container,
.product-item .product-image-wrapper,
.product-item .product-image-photo {
    width:  100%;
}

/* Product details styling */

@media (max-width: 992px) {
    body .product-showcase .products.list {
        display: flex !important;
        overflow: scroll;
        margin: 0 -20px !important;
        padding: 20px 20px 0 20px !important;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    body .product-showcase .products.list .product {
        min-width: 280px!important;
    }

    body .product-showcase .products.list .product-item-actions {
        min-width: auto !important;
    }
}

body .product.details.product-item-details {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Product name styling */
body .product.name.product-item-name {
    margin-bottom: 1px !important;
}

body .product.name.product-item-name .product-item-link {
    color: #333 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    line-height: 1.3 !important;
}

/* Color attributes styling */
body .attributesColor .color-options {
    display: flex !important;
    gap: 5px !important;
    flex-wrap: wrap !important;
}

body .attributesColor .color-label {
    font-size: 12px !important;
    color: #666 !important;
}

/* Reviews styling */
body .noReviews .stars {
    display: flex !important;
    gap: 2px !important;
}

body .noReviews .stars img {
    width: 16px;
    height: 16px;
}

.yesReviews a,
.noReviews a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.yesReviews a:hover,
.noReviews a:hover {
    color: #1bab7b;
    text-decoration: underline;
}

/* Extra info styling */
.extraToev {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.extraToev img {
    width: 20px;
    height: 20px;
}

/* Price styling */
body .price-box,
body .product-item-details .price-box {
    font-size: 18px !important;
    font-weight: bold !important;
    color: #333 !important;
    display: block !important;
}

/* Stock status styling */
.stock {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 500;
}

.stock.available {
    color: #1bab7b;
}

.stock.available img {
    width: 16px;
    height: 16px;
}

.stock.saleableAt {
    color: #ff9500;
}

.stock.saleableAt img {
    width: 16px;
    height: 16px;
}

.stock.unavailable {
    color: #e74c3c;
}

.stock.unavailable img {
    width: 16px;
    height: 16px;
}

/* Product actions styling */
.product.actions.product-item-actions {
    margin-top: auto;
}

.actions-secondary {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}

a.action.towishlist {
    width: 18px !important;
    background-image: url(../images/heart-wishlist.png);
    background-position: center;
    background-size: cover;
    display: block !important;
    height: 18px !important;
    margin: 0;
}

a.action.towishlist > span {
    display: none;
}

div.is-favorite a.action.towishlist {
    width: 46px !important;
    height: 46px !important;
    background-color: #F5F5F5;
    background-image: url(../images/heart-like-xl.png);
}

@media only screen and (max-width: 768px) {
    div.is-favorite a.action.towishlist {
        width: 40px !important;
        height: 40px !important;
    }

    .product-info-main .box-tocart > div.fieldset input#qty {
        height: 40px !important;
        max-width: 50px;
    }
}

/* ===== HOMEPAGE SPECIFIC STYLING (was in homepage-products.css) ===== */

/* Price styling for homepage products */
body.cms-index-index .product-item-details div.price-box {
    margin-bottom: 0;
    line-height: 1.1;
}

body.cms-index-index .product-item-details div.noReviews {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 0;
}

@media only screen and (max-width: 992px) {
    body.cms-index-index .product-item-details div.noReviews {
        align-items: start;
        /* flex-direction: column; */
        margin-bottom: 15px;
        gap: 4px;
    }

    body.cms-index-index .product-item-details div.noReviews a {
        font-size: 12px;
        position: relative;
        top: -1px;
    }
}

body.cms-index-index .product-item-details div.noReviews div.stars {
    display: flex;
    gap: 2px;
}

body.cms-index-index .product-item-details div.noReviews div.stars img {
    display: block;
    width: 14px;
    height: 14px;
}

body.cms-index-index .product-item-details div.noReviews a {
    transition: all 0.2s;
    font-weight: 500;
    font-size: 12px;
}

body.cms-index-index .product-item-details div.noReviews a:hover {
    color: #1cab7b;
    transition: all 0.2s;
}


body.cms-index-index .product-item-details div.yesReviews {
    margin-top: -6px;
}


body.cms-index-index .product-item-details div.yesReviews div.product-reviews-summary {
    display: flex;
    gap: 7px;
}

@media only screen and (max-width: 992px) {
    body.cms-index-index .product-item-details div.yesReviews div.product-reviews-summary .reviews-actions {
        margin-top: 0;
    }
}

@media only screen and (max-width: 992px) {

    body.cms-index-index .product-item-details div.yesReviews {
        margin-top: 0;
    }

    body.cms-index-index .product-item-details div.yesReviews div.product-reviews-summary {
        align-items: start;
        /* flex-direction: column; */
        gap: 4px;
    }

    body.cms-index-index .product-item-details div.yesReviews div.product-reviews-summary a {
        font-size: 11px;
        position: relative;
        top: 2px;
    }

    body.cms-index-index .product-item-details div.yesReviews div.product-reviews-summary .rating-summary .rating-result:before,
    body.cms-index-index .product-item-details div.yesReviews div.product-reviews-summary .rating-summary .rating-result>span:before {
        font-size: 16px !important;
    }
}

body.cms-index-index .product-item-details div.yesReviews div.product-reviews-summary div.rating-summary {
    padding: 0;
    overflow: unset;
}

body.cms-index-index .product-item-details div.yesReviews div.product-reviews-summary div.rating-summary div.rating-result:before {
    content: url(/media/categoryProducts/grey-material-stars-ruimte-12px.svg) url(/media/categoryProducts/grey-material-stars-ruimte-12px.svg) url(/media/categoryProducts/grey-material-stars-ruimte-12px.svg) url(/media/categoryProducts/grey-material-stars-ruimte-12px.svg) url(/media/categoryProducts/grey-material-stars-ruimte-12px.svg) !important;
    height: 100%;
}

body.cms-index-index .product-item-details div.yesReviews div.product-reviews-summary div.rating-summary div.rating-result > span:before {
    content: url(/media/categoryProducts/green-materials-stars-ruimte-12px.svg) url(/media/categoryProducts/green-materials-stars-ruimte-12px.svg) url(/media/categoryProducts/green-materials-stars-ruimte-12px.svg) url(/media/categoryProducts/green-materials-stars-ruimte-12px.svg) url(/media/categoryProducts/green-materials-stars-ruimte-12px.svg) !important;
    height: 100%;
}

body.cms-index-index .product-item-details div.yesReviews div.product-reviews-summary div.reviews-actions a {
    transition: all 0.2s;
    font-weight: 500;
    font-size: 12px;
    text-transform: lowercase;
    margin-left: -5px;
}

@media only screen and (max-width: 992px) {
    body.cms-index-index .product-item-details div.yesReviews div.product-reviews-summary div.reviews-actions a {
        margin-left: 0;
    }
}

body.cms-index-index .product-item-details div.yesReviews div.product-reviews-summary div.reviews-actions a span {
    margin-left: -3px;
}

body.cms-index-index .product-item-details div.stock {
    align-items: center;
    display: flex;
    gap: 6px;
    margin-top: 0;
    margin-bottom: 6px;
}

body.cms-index-index .product-item-details div.stock span {
    font-weight: 600;
    font-size: 12px;
}

body.cms-index-index .product-item-details div.stock img {
    max-width: 12px;
    max-height: 12px;
}

body.cms-index-index .product-item-details div.stock.available span {
    color: #1aab7b;
}

body.cms-index-index .product-item-details div.stock.unavailable span {
    color: #333;
}

body.cms-index-index .product-item-details div.stock.saleableAt span {
    color: #e6b201;
}

/* Product name and color attributes styling */
body.cms-index-index div.product.details.product-item-details strong.product.name {
    display: grid;
    grid-template-columns: 1fr;
}

@media only screen and (max-width: 992px) {
    body.cms-index-index div.product.details.product-item-details strong.product.name {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

@media only screen and (max-width: 992px) {
    body.cms-index-index div.product.details.product-item-details strong.product.name a.product-item-link {
        order: 2;
        font-size: 15px !important;
        min-height: 0;
        margin-top: 0px;
    }
}

@media only screen and (max-width: 992px) {
    body.cms-index-index div.product.details.product-item-details strong.product.name div.attributesColor {
        order: 1;
        display: flex;
    }
}

body.cms-index-index div.product.details.product-item-details strong.product.name div.attributesColor div.swatch-attribute-options {
    margin: 0;
    justify-content: end;
}

body.cms-index-index div.product.details.product-item-details strong.product.name div.attributesColor div.swatch-attribute-options div.swatch-option {
    border-radius: 0;
    margin: 0 3px 3px 0;
    border: 2px solid transparent;
    min-width: 14px;
    width: 14px !important;
    height: 16px !important;
}

body.cms-index-index div.product.details.product-item-details strong.product.name div.attributesColor div.swatch-attribute-options div.swatch-option.image {
    background-repeat: repeat !important;
}

body.cms-index-index div.product.details.product-item-details strong.product.name div.attributesColor div.swatch-attribute-options div.swatch-option.disabled {
    display: none;
}

body.cms-index-index div.product.details.product-item-details strong.product.name div.attributesColor div.swatch-attribute-options div.swatch-option.selected {
    border-color: #1aab7b;
    outline: none;
}

/* Extra product information styling */
body.cms-index-index div.product.details.product-item-details div.extraToev {
    display: flex;
    gap: 5px;
    align-items: center;
    margin-bottom: -5px;
    margin-top: 7px;
}

@media only screen and (max-width: 992px) {
    body.cms-index-index div.product.details.product-item-details div.extraToev {
        margin-top: -8px;
    }
}

body.cms-index-index div.product.details.product-item-details div.extraToev img {
    max-width: 26px;
    max-height: 26px;
    object-fit: contain;
    object-position: center;
}

body.cms-index-index div.product.details.product-item-details div.extraToev span.extraToevText {
    font-family: "helvetica";
}

/* Homepage specific discount and new tag styling */
body.cms-index-index span.special-price span.price {
    color: #d42117;
    font-weight: 700;
    font-size: 18px;
}

body.cms-index-index .product-item .old-price .price {
    color: #7e7e7e;
    font-size: 16px;
    text-decoration: line-through;
    letter-spacing: 0.32px;
}

body.cms-index-index .product-item-details span.discount {
    top: 0;
    background: #d42117;
    position: absolute;
    padding: 3px 5px 5px 7px;
    display: inline-block;
    line-height: 16px;
    color: #fff;
    z-index: 99;
    left: 0;
    transform: rotate(-4deg) !important;
    box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.3);
    font-weight: 700;
    font-family: Oswald, Helvetica, Sans-Serif, serif;
}

body .new_tag {
    margin-top: 0;
    margin-bottom: 0;
    position: absolute;
    top: 10px;
    left: 10px;
}

body .new_tag span {
    position: relative;
    z-index: 99;
    background-color: #000;
    color: #fff;
    padding: 2px 9px;
    border-radius: 5px;
    text-transform: uppercase;
    font-weight: 600;
}

body .product-item .price-box {
    margin: 1px 0 0 0;
}

body .product-item .product-reviews-summary {
    margin: 0;
}

/* Product pricing consistency */
body.cms-index-index .product-item .price-box .price {
    font-weight: 500;
    letter-spacing: 0.26px;
    font-size: 16px;
    text-transform: uppercase;
    font-weight: 700;
}

@media only screen and (max-width: 1024px) {
    body.cms-index-index .product-item .price-box .price {
        font-weight: 500;
        letter-spacing: 0.26px;
        font-size: 16px;
    }
}

/* Product name styling consistency */
body.cms-index-index .column.main .product-item-name > a,
body.cms-index-index .column.main .product.name a > a {
    font-family: Oswald, Helvetica, Sans-Serif, serif !important;
    text-transform: uppercase;
    font-size: 15px !important;
    letter-spacing: 0.32px;
    line-height: 22px;
    color: #000;
    font-weight: 700;
    text-decoration: none;
}

@media only screen and (max-width: 1024px) {
    body.cms-index-index .column.main .product-item-name > a,
    body.cms-index-index .column.main .product.name a > a {
        font-size: 13px !important;
        line-height: 19px;
        letter-spacing: 0.26px;
        min-height: 37px;
        display: inline-block;
    }
}

@media only screen and (max-width: 1024px) {
    body.cms-index-index span.price-box .price {
        font-weight: 500;
        font-size: 16px;
    }
}
