/**
 * Single Product Page
 * @package Eshanarya
 */

.single-product .ea-wc-main-wrapper {
    background: linear-gradient(180deg, var(--ea-cream) 0, #fff 240px);
    padding: 34px 0 96px;
}

.ea-single-product-layout {
    position: relative;
}

.ea-single-product-layout .ea-breadcrumb {
    margin-bottom: 22px;
}

.ea-single-product-hero {
    background: #fff;
    border: 1px solid #efe6d8;
    border-radius: 8px;
    padding: 26px;
    box-shadow: 0 16px 45px rgba(26, 26, 26, 0.08);
}

.ea-single-gallery {
    position: sticky;
    top: 110px;
}

.ea-single-gallery-shell {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.ea-single-gallery-main {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    background: #fbf7f0;
    border: 1px solid #efe6d8;
    border-radius: 8px;
    overflow: hidden;
}

.ea-single-gallery-main .ea-sale-badge {
    top: 12px;
    left: 12px;
    z-index: 4;
}

.ea-single-gallery-main-img,
.ea-single-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.ea-single-gallery-thumbs {
    display: grid;
    grid-auto-rows: 74px;
    gap: 8px;
    max-height: min(520px, calc(100vw - 40px));
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--ea-gold) #f1eadf;
}

.ea-single-gallery-thumbs::-webkit-scrollbar {
    width: 5px;
}

.ea-single-gallery-thumbs::-webkit-scrollbar-track {
    background: #f1eadf;
    border-radius: 99px;
}

.ea-single-gallery-thumbs::-webkit-scrollbar-thumb {
    background: var(--ea-gold);
    border-radius: 99px;
}

.ea-single-gallery-thumb {
    width: 74px;
    height: 74px;
    padding: 0;
    border: 1px solid #eadfcc;
    border-radius: 8px;
    background: #fffaf1;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.78;
    transition: opacity 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ea-single-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ea-single-gallery-thumb.is-active,
.ea-single-gallery-thumb:hover {
    border-color: var(--ea-gold);
    opacity: 1;
    box-shadow: 0 5px 15px rgba(201, 168, 76, 0.24);
}

.ea-single-summary {
    float: none !important;
    width: 100% !important;
    padding: 6px 4px;
}

.ea-single-summary .product_title {
    font-family: var(--ea-font-heading);
    font-size: clamp(1.85rem, 2.7vw, 2.75rem);
    line-height: 1.12;
    color: var(--ea-black);
    margin: 0 0 14px;
    letter-spacing: 0;
}

.ea-single-summary .woocommerce-product-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    color: #777;
}

.ea-single-summary .star-rating {
    color: var(--ea-gold);
}

.ea-single-summary .price {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: var(--ea-black);
    font-family: var(--ea-font-body);
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0 0 20px;
    padding: 12px 16px;
    background: #fff8e8;
    border: 1px solid #eadfcc;
    border-radius: 8px;
}

.ea-single-summary .price del {
    color: #9b9285;
    font-size: 1rem;
    font-weight: 500;
    margin-right: 8px;
}

.ea-single-summary .price ins {
    text-decoration: none;
    color: var(--ea-gold-dark);
}

.ea-single-summary .woocommerce-product-details__short-description {
    color: #635b51;
    font-size: 0.98rem;
    line-height: 1.8;
    margin: 0 0 22px;
}

.ea-single-cart-form {
    margin: 0 0 18px;
}

.ea-single-purchase-row {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
}

.ea-single-buy-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ea-single-summary .quantity {
    display: inline-flex;
    align-items: center;
}

.ea-single-summary .qty {
    width: 76px;
    height: 48px;
    border: 1.5px solid #e1d7c7;
    border-radius: 8px;
    text-align: center;
    color: var(--ea-black);
    font-weight: 700;
}

.ea-single-add-to-cart,
.ea-single-summary .single_add_to_cart_button,
.ea-single-buy-now {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    width: 100%;
    border: 0 !important;
    border-radius: 8px !important;
    background: var(--ea-black) !important;
    color: #fff !important;
    font-family: var(--ea-font-body);
    font-weight: 800 !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: background 0.2s ease, transform 0.2s ease;
}

.ea-single-add-to-cart:hover,
.ea-single-summary .single_add_to_cart_button:hover,
.ea-single-buy-now:hover {
    background: var(--ea-gold) !important;
    transform: translateY(-1px);
}

.ea-single-buy-now {
    background: var(--ea-gold) !important;
}

.ea-single-buy-now:hover {
    background: var(--ea-gold-dark) !important;
}

.ea-product-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 46px;
    border: 1.5px solid #1f9d55;
    border-radius: 8px;
    color: #137c3d;
    background: #f2fbf5;
    text-decoration: none;
    font-weight: 800;
    margin-bottom: 14px;
}

.ea-product-whatsapp:hover {
    background: #1f9d55;
    color: #fff;
}

.ea-product-trust-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.ea-product-trust-item {
    min-height: 86px;
    border: 1px solid #efe6d8;
    border-radius: 8px;
    background: #fffaf1;
    padding: 13px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    text-align: center;
    color: #5f564b;
    font-size: 0.78rem;
    font-weight: 700;
}

.ea-product-trust-item i {
    color: var(--ea-gold);
    font-size: 1.2rem;
}

.ea-single-summary .product_meta {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #efe6d8;
    color: #7c7469;
    font-size: 0.86rem;
}

.ea-single-summary .product_meta > span {
    display: block;
    margin-bottom: 7px;
}

.ea-single-summary .product_meta a {
    color: var(--ea-gold-dark);
    text-decoration: none;
}

.ea-single-summary table.variations {
    width: 100%;
    margin: 0 0 14px;
}

.ea-single-summary table.variations th,
.ea-single-summary table.variations td {
    display: block;
    padding: 0 0 8px;
}

.ea-single-summary table.variations label {
    color: var(--ea-black);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.ea-single-summary table.variations select {
    width: 100%;
    border: 1.5px solid #e1d7c7;
    border-radius: 8px;
    min-height: 44px;
    padding: 0 12px;
}

.ea-product-tabs,
.ea-single-product-details .upsells,
.ea-single-product-details .related {
    margin-top: 64px;
}

.ea-product-tabs-title {
    text-align: center;
    margin-bottom: 24px;
}

.ea-product-tabs .container,
.ea-single-product-details .related {
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

.ea-product-tabs-nav {
    justify-content: center;
    gap: 10px;
    border-bottom: 1px solid #eadfcc;
    margin-bottom: 28px;
}

.ea-product-tab-btn {
    border: 1px solid #eadfcc;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background: #fffaf1;
    color: var(--ea-black);
    padding: 12px 24px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.ea-product-tab-btn.active {
    background: var(--ea-gold);
    color: #fff;
    border-color: var(--ea-gold);
}

.ea-product-tabs-content {
    max-width: 1080px;
    margin: 0 auto;
    color: #5f564b;
    line-height: 1.8;
    font-size: 0.96rem;
}

.ea-product-tabs-content > .tab-pane.active,
.ea-product-tabs-content > .tab-pane.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.ea-product-tabs-content h2,
.ea-product-tabs-content h3 {
    font-family: var(--ea-font-heading);
    color: var(--ea-black);
}

.ea-product-tabs-content .woocommerce-Reviews {
    max-width: 100%;
}

.ea-product-tabs-content .shop_attributes {
    margin: 0;
    width: 100%;
}

.ea-product-tabs-content .shop_attributes th,
.ea-product-tabs-content .shop_attributes td {
    border-bottom: 1px solid #f0e7d8;
    padding: 10px 12px;
}

.ea-product-detail-accordion {
    margin-top: 22px;
}

.ea-product-detail-accordion .accordion-item {
    border: 1px solid #eadfcc;
    border-radius: 8px !important;
    overflow: hidden;
    margin-bottom: 10px;
}

.ea-product-detail-accordion .accordion-button {
    padding: 13px 16px;
    font-family: var(--ea-font-body);
    font-size: 0.86rem;
    font-weight: 800;
    color: var(--ea-black);
    background: #fffaf1;
    box-shadow: none;
}

.ea-product-detail-accordion .accordion-button:not(.collapsed) {
    background: #fff4cf;
    color: var(--ea-gold-dark);
}

.ea-product-detail-accordion .accordion-body {
    color: #5f564b;
    font-size: 0.92rem;
    line-height: 1.75;
    padding: 16px;
}

.ea-single-product-details .related > h2,
.ea-single-product-details .upsells > h2 {
    font-family: var(--ea-font-heading);
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    text-align: center;
    margin-bottom: 28px;
    color: var(--ea-black);
}

.single-product .related ul.products.ea-shop-grid,
.single-product .upsells ul.products.ea-shop-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px 24px;
}

.ea-sticky-atc {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1020;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid #eadfcc;
    box-shadow: 0 -10px 30px rgba(26, 26, 26, 0.12);
    transform: translateY(110%);
    transition: transform 0.25s ease;
}

.ea-sticky-atc.is-visible {
    transform: translateY(0);
}

.ea-sticky-atc-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ea-sticky-atc-product {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.ea-sticky-atc-thumb img,
.ea-sticky-product-img {
    width: 50px;
    height: 58px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #eadfcc;
}

.ea-sticky-atc-title {
    color: var(--ea-black);
    font-weight: 800;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: min(52vw, 520px);
}

.ea-sticky-atc-price {
    color: var(--ea-gold-dark);
    font-size: 0.9rem;
    font-weight: 800;
}

.ea-sticky-atc-price del {
    color: #9b9285;
    font-weight: 500;
}

.ea-sticky-atc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 22px;
    background: var(--ea-black);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 800;
}

.ea-sticky-atc-btn:hover {
    background: var(--ea-gold);
    color: #fff;
}

@media (max-width: 991.98px) {
    .ea-single-gallery {
        position: static;
    }

    .ea-single-product-hero {
        padding: 18px;
    }

    .ea-single-gallery .woocommerce-product-gallery {
        display: block;
    }

    .ea-single-gallery-shell {
        grid-template-columns: 1fr;
    }

    .ea-single-gallery-thumbs {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        grid-auto-rows: auto;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        order: 2;
    }

    .ea-single-gallery-thumb {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .single-product .related ul.products.ea-shop-grid,
    .single-product .upsells ul.products.ea-shop-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .single-product .ea-wc-main-wrapper {
        padding: 18px 0 84px;
    }

    .ea-single-product-hero {
        padding: 12px;
    }

    .ea-single-purchase-row,
    .ea-product-trust-grid {
        grid-template-columns: 1fr;
    }

    .ea-single-buy-actions {
        grid-template-columns: 1fr;
    }

    .ea-single-summary .quantity,
    .ea-single-summary .qty {
        width: 100%;
    }

    .ea-product-tabs-nav {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .ea-product-tab-btn {
        white-space: nowrap;
        padding: 10px 16px;
    }

    .ea-sticky-atc-inner {
        min-height: 66px;
    }

    .ea-sticky-atc-thumb,
    .ea-sticky-atc-price {
        display: none;
    }

    .ea-sticky-atc-title {
        max-width: 44vw;
        font-size: 0.88rem;
    }

    .ea-sticky-atc-btn {
        padding: 0 14px;
        min-width: 138px;
    }
}
