/* ISAKAA — WooCommerce Single Product Styling */

body.single-product {
    background: #171717;
    color: #f1f1ef;
}

body.single-product .site-content,
body.single-product #main,
body.single-product .content-area {
    background: #171717;
    color: #f1f1ef;
}

body.single-product div.product {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    gap: 55px;
    align-items: start;
    max-width: 1440px;
    margin: 50px auto;
    padding: 0 5%;
}

body.single-product div.product div.images,
body.single-product div.product div.summary {
    float: none;
    width: 100%;
    margin: 0;
}

body.single-product div.product div.images img {
    width: 100%;
    height: auto;
    object-fit: contain;
    background: #202020;
}

body.single-product div.product div.summary {
    color: #eee;
}

body.single-product .product_title {
    color: #f5f5f2;
    font-size: clamp(26px, 3vw, 42px);
    line-height: 1.2;
    margin: 0 0 20px;
}

body.single-product .price {
    color: #fff;
    font-size: 24px;
    margin: 20px 0;
}

body.single-product .woocommerce-product-details__short-description,
body.single-product .woocommerce-product-details__short-description p {
    color: #c5c5c5;
    line-height: 1.8;
}

body.single-product .woocommerce-tabs {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 35px;
    border-top: 1px solid #383838;
    padding-top: 25px;
}

body.single-product .woocommerce-tabs ul.tabs {
    padding: 0;
    margin: 0 0 25px;
    border: 0;
    background: transparent;
}

body.single-product .woocommerce-tabs ul.tabs::before,
body.single-product .woocommerce-tabs ul.tabs li::before,
body.single-product .woocommerce-tabs ul.tabs li::after {
    display: none;
}

body.single-product .woocommerce-tabs ul.tabs li {
    background: transparent;
    border: 0;
    margin: 0 25px 0 0;
    padding: 0;
}

body.single-product .woocommerce-tabs ul.tabs li a {
    color: #aaa;
    padding: 12px 0;
}

body.single-product .woocommerce-tabs ul.tabs li.active a,
body.single-product .woocommerce-tabs ul.tabs li a:hover {
    color: #fff;
}

body.single-product .woocommerce-Tabs-panel,
body.single-product .woocommerce-Tabs-panel p {
    color: #ccc;
    line-height: 1.8;
}

body.single-product .related,
body.single-product .up-sells {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 45px;
}

body.single-product .related > h2,
body.single-product .up-sells > h2 {
    color: #f1f1ef;
    margin-bottom: 25px;
}

body.single-product .related ul.products,
body.single-product .up-sells ul.products {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 25px;
}

body.single-product ul.products li.product {
    width: auto;
    margin: 0;
    float: none;
    background: #202020;
    padding: 12px;
}

body.single-product ul.products li.product .woocommerce-loop-product__title {
    color: #eee;
}

body.single-product .woocommerce-breadcrumb {
    color: #999;
    padding: 15px 5%;
}

body.single-product .woocommerce-breadcrumb a {
    color: #bbb;
}

@media (max-width: 767px) {
    body.single-product div.product {
        display: block;
        margin: 20px auto;
        padding: 0 18px;
    }

    body.single-product div.product div.images,
    body.single-product div.product div.summary {
        width: 100%;
        margin-bottom: 30px;
    }

    body.single-product .woocommerce-tabs {
        margin-top: 25px;
    }

    body.single-product .related ul.products,
    body.single-product .up-sells ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    body.single-product .woocommerce-tabs ul.tabs li {
        margin-right: 15px;
    }
}

/* Remove unwanted default WordPress widgets on product pages */
body.single-product #secondary,
body.single-product .sidebar,
body.single-product .widget-area,
body.single-product .widget_search,
body.single-product .widget_pages {
    display: none !important;
}


/* Hide unwanted default footer and widget content on product pages */
body.single-product footer,
body.single-product .widget,
body.single-product .widget_block,
body.single-product .wp-block-search,
body.single-product .wp-block-page-list,
body.single-product .widget-area,
body.single-product #secondary {
    display: none !important;
}


/* ISAKAA — Product category and shop archive */
body.archive.woocommerce,
body.tax-product_cat,
body.post-type-archive-product {
    background: #171717;
    color: #f1f1ef;
}

.isakaa-shop-archive {
    max-width: 1440px;
    width: 92%;
    margin: 45px auto 80px;
    color: #f1f1ef;
}

.isakaa-archive-heading {
    margin-bottom: 30px;
    font-size: 32px;
    font-weight: 600;
    color: #f1f1ef;
}

.isakaa-shop-archive ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 42px 28px !important;
    margin: 25px 0 !important;
    padding: 0 !important;
}

.isakaa-shop-archive ul.products::before,
.isakaa-shop-archive ul.products::after {
    display: none !important;
}

.isakaa-shop-archive ul.products li.product {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    background: #1d1d1d;
    padding: 0 0 18px !important;
    list-style: none !important;
}

.isakaa-shop-archive ul.products li.product img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #171717;
    padding: 12px;
    margin: 0 0 15px !important;
}

.isakaa-shop-archive ul.products li.product .woocommerce-loop-product__title {
    color: #f1f1ef !important;
    font-size: 15px !important;
    line-height: 1.5;
    padding: 0 14px !important;
}

.isakaa-shop-archive ul.products li.product a {
    color: #f1f1ef;
    text-decoration: none;
}

.isakaa-shop-archive .woocommerce-result-count,
.isakaa-shop-archive .woocommerce-ordering {
    color: #ccc;
    margin-bottom: 20px;
}

.isakaa-shop-archive .woocommerce-pagination {
    display: none !important;
}

@media (max-width: 767px) {
    .isakaa-shop-archive ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 22px 12px !important;
    }

    .isakaa-shop-archive {
        width: 94%;
        margin-top: 25px;
    }

    .isakaa-archive-heading {
        font-size: 25px;
    }
}

/* ISAKAA — Match homepage charcoal product image treatment on archives */
body.woocommerce.archive .isakaa-shop-archive ul.products li.product a img,
body.tax-product_cat .isakaa-shop-archive ul.products li.product a img {
    background: radial-gradient(
        ellipse at 50% 48%,
        #24262b 0%,
        #17191d 58%,
        #111216 100%
    ) !important;
    object-fit: contain !important;
}

body.woocommerce.archive .isakaa-shop-archive ul.products li.product,
body.tax-product_cat .isakaa-shop-archive ul.products li.product {
    background: #171717 !important;
}

body.woocommerce.archive .isakaa-shop-archive ul.products li.product a,
body.tax-product_cat .isakaa-shop-archive ul.products li.product a {
    background: #171717;
    display: block;
}

/* ISAKAA — Charcoal product thumbnails on shop and category pages */
body.woocommerce.archive .isakaa-shop-archive ul.products li.product a img,
body.tax-product_cat .isakaa-shop-archive ul.products li.product a img {
    background: radial-gradient(ellipse at 50% 45%, #292929 0%, #171717 65%, #111111 100%) !important;
    object-fit: contain !important;
    padding: 0 !important;
}

body.woocommerce.archive .isakaa-shop-archive ul.products li.product,
body.tax-product_cat .isakaa-shop-archive ul.products li.product,
body.woocommerce.archive .isakaa-shop-archive ul.products li.product a,
body.tax-product_cat .isakaa-shop-archive ul.products li.product a {
    background: #171717 !important;
}

/* ISAKAA — Universal charcoal backgrounds for WooCommerce archive thumbnails */
body.woocommerce ul.products li.product img.woocommerce_thumbnail,
body.tax-product_cat ul.products li.product img.woocommerce_thumbnail,
body.tax-product_tag ul.products li.product img.woocommerce_thumbnail {
    background: #171717 !important;
    object-fit: contain !important;
}

body.woocommerce ul.products li.product,
body.woocommerce ul.products li.product a.woocommerce-LoopProduct-link {
    background-color: #171717 !important;
}

/* ISAKAA — Universal charcoal backgrounds for WooCommerce archive thumbnails */
body.woocommerce ul.products li.product img.woocommerce_thumbnail,
body.tax-product_cat ul.products li.product img.woocommerce_thumbnail,
body.tax-product_tag ul.products li.product img.woocommerce_thumbnail {
    background: #171717 !important;
    object-fit: contain !important;
}

body.woocommerce ul.products li.product,
body.woocommerce ul.products li.product a.woocommerce-LoopProduct-link {
    background-color: #171717 !important;
}

/* ISAKAA — Correct WooCommerce category thumbnail selector */
body.woocommerce ul.products li.product img.attachment-woocommerce_thumbnail {
    background-color: #171717 !important;
    object-fit: contain !important;
}

body.woocommerce ul.products li.product a.woocommerce-LoopProduct-link {
    background-color: #171717 !important;
}

/* ISAKAA — Homepage-style charcoal image container for product archives */
body.woocommerce.archive ul.products li.product .isakaa-archive-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: radial-gradient(ellipse at center, #333b49 0%, #191d26 55%, #101116 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

body.woocommerce.archive ul.products li.product .isakaa-archive-image img {
    display: block;
    width: 90% !important;
    height: 90% !important;
    max-width: 90%;
    object-fit: contain !important;
    filter: drop-shadow(0 22px 25px #0009);
    margin: 0 auto !important;
}
