/* ========================================
   SUBPAGE STYLES (Product, Shop, etc.)
   ======================================== */

/**
 * Design Tokens (inherited from root)
 */

/* Single Product Layout */
.single-product-main {
    padding: var(--space-xxl) 0;
}

.product-layout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: flex-start;
}

/* LEFT COLUMN: Gallery */
.product-breadcrumb-mobile-top {
    display: none;
}

.product-main-image {
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #fcfcfc;
}

.product-main-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    transition: opacity 0.3s ease;
}


/* Product Thumbnails Grid */
.product-thumbnails-grid {
    display: flex;
    gap: 0.75rem;
    margin-top: var(--space-lg);
    overflow-x: auto;
    padding-bottom: var(--space-sm);
}

.product-thumbnails-grid::-webkit-scrollbar {
    height: 4px;
}

.product-thumbnails-grid::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}

.thumb-item {
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumb-item:hover {
    border-color: var(--accent-color);
}

.thumb-item.active {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* RIGHT COLUMN: Info */
.product-summary-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.product-breadcrumb {
    font-size: 16px;
    color: #888;
    margin-bottom: var(--space-xs);
}

/* Categories & Secondary Icons Row */
.product-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xs);
}

.product-meta-top .posted_in {
    font-size: 14px;
    color: #555;
}

.product-meta-top .posted_in a {
    color: var(--text-dark);
    text-decoration: none;
    margin-right: 5px;
}

.secondary-actions-icons {
    display: flex;
    gap: var(--space-sm);
}

.icon-action-btn {
    width: 38px;
    height: 38px;
    border-radius: 4px;
    border: none;
    background: var(--complementary-1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.3s;
}

.icon-action-btn:hover {
    opacity: 0.9;
}

.product-type-title {
    font-family: var(--font-headings);
    font-size: 36px;
    color: var(--text-black);
    margin: 0;
    line-height: 1.1;
    font-weight: 700;
}

.product-price-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-xs);
}

.product-price-wrapper .price,
.product-price-wrapper .price ins,
.product-price-wrapper .price .amount {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color) !important;
    text-decoration: none !important;
}

.product-price-wrapper .price del .amount {
    font-size: 20px;
    color: #b5b5b5 !important;
    font-weight: 400;
}

.product-description-short {
    font-size: 15px;
    line-height: 1.7;
    color: #555;
    margin: var(--space-sm) 0;
    padding-left: 12px;
}

/* WhatsApp Direct Button */
.whatsapp-direct-integration {
    margin: var(--space-md) 0;
}

.whatsapp-buy-btn-premium {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    background: #25D366;
    color: #fff !important;
    text-decoration: none !important;
    padding: var(--space-md) var(--space-lg);
    border-radius: 4px;
    font-weight: 700;
    font-family: var(--font-buttons);
    font-size: 16px;
    transition: transform 0.2s;
}

.whatsapp-buy-btn-premium:hover {
    transform: translateY(-2px);
    background: #1eb956;
}

/* Key Features Section */
.product-specs-container {
    padding-top: var(--space-lg);
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.specs-section h3 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
}

.specs-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.specs-section ul li {
    font-size: 15px;
    color: #444;
    margin-bottom: 6px;
}

.specs-section ul li strong {
    color: #000;
    font-weight: 600;
}

/* Accordions */
.product-accordions {
    margin: var(--space-xl) 0;
    border-top: 1px solid #f0f0f0;
}

.accordion-item {
    border-bottom: 2px solid #f8f8f8;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

.accordion-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.4s ease;
    transform-origin: bottom;
    z-index: 2;
}

.accordion-item.active::before {
    transform: scaleY(1);
    transform-origin: top;
}

.accordion-item.active {
    background: #fdfdfd;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.02);
}

.accordion-header {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: transparent;
    border: none;
    outline: none;
    text-align: left;
    transition: all 0.3s ease;
}

.accordion-header:hover {
    padding-left: calc(var(--space-lg) + 8px);
    background: rgba(76, 54, 150, 0.03);
}

.accordion-header span {
    font-weight: 700;
    color: var(--text-black);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-family: var(--header-font);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.accordion-header span i {
    color: var(--primary-color);
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.accordion-header i.fa-chevron-down {
    font-size: 12px;
    color: #999;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 var(--space-lg);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.accordion-item.active .accordion-content {
    max-height: 500px;
    padding: var(--space-sm) var(--space-lg) var(--space-lg);
}

.accordion-item.active .accordion-header i.fa-chevron-down {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.accordion-content p {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin: 0;
}

/* Trust Bullets */
.product-trust-bullets {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: var(--space-md);
    margin: var(--space-md) 0;
    padding: var(--space-md) 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    overflow-x: auto;
}

.product-trust-bullets::-webkit-scrollbar {
    display: none;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
}

.trust-item i {
    color: var(--primary-color);
    /* Matches brand instead of generic green */
}

.product-meta-extra {
    font-size: 12px;
    color: #999;
}

/* Responsive Subpages */
@media (max-width: 991px) {
    .single-product-main.container {
        padding-left: 20px !important;
        padding-right: 20px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .product-layout-grid {
        display: block !important;
        width: 100% !important;
    }

    .product-gallery-container,
    .product-summary-container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    .product-main-image {
        width: 100% !important;
        margin-bottom: 15px;
    }

    .product-main-image img {
        width: 100% !important;
        height: auto !important;
        display: block !important;
        max-width: 100% !important;
    }

    .product-thumbnails-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 8px !important;
        margin-top: 15px;
        overflow: hidden !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .thumb-item {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1;
        flex: none !important;
    }

    .thumb-item img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .product-gallery-container {
        position: relative;
        top: 0;
        width: 100%;
        overflow: hidden;
    }

    .product-breadcrumb-desktop {
        display: none;
    }

    .product-breadcrumb-mobile-top {
        display: block;
        margin-bottom: var(--space-md);
        font-size: 14px;
        color: #888;
        padding: 0 !important;
    }

    .hide-mobile {
        display: none !important;
    }

    .product-type-title {
        font-size: 28px;
        margin-top: 10px;
    }

    .whatsapp-buy-btn-premium {
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .product-breadcrumb {
        order: -1;
        margin-bottom: var(--space-sm);
        flex-wrap: wrap;
        display: flex;
    }

    .woocommerce-breadcrumb {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        line-height: 1.4;
    }
}

/* ========================================
   WOOCOMMERCE SHOP CATALOG STYLES (ULTRA-PREMIUM)
   ======================================== */

.woocommerce-shop-page {
    background: #fbfbfd;
    padding-bottom: var(--space-3xl);
}

/* Advanced Shop Header */
.woocommerce-products-header {
    text-align: center;
    padding: var(--space-3xl) 0 var(--space-xxl);
    background: #fff;
    margin-bottom: var(--space-3xl);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.woocommerce-products-header__title.page-title {
    font-family: var(--header-font);
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--text-black);
    margin-bottom: 5px;
    padding-top: var(--space-xl);
    background: linear-gradient(135deg, var(--text-black) 0%, #444 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.woocommerce-products-header__title.page-title span {
    font-style: italic;
    opacity: 0.8;
    background: none;
    -webkit-text-fill-color: var(--primary-color);
    text-transform: capitalize;
}

.term-description {
    max-width: 600px;
    margin: 0 auto;
    font-family: var(--font-body);
    font-size: 18px;
    color: #666;
    line-height: 1.5;
    font-weight: 400;
}

/* Refined Controls */
.shop-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    margin-bottom: var(--space-xxl);
}

.woocommerce-ordering select {
    border: 1px solid #eee;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 13px;
    color: #333;
    appearance: none;
    background: #fdfdfd;
}

/* Global Product Card styles now handled in headfoot.css */

.whatsapp-shop-btn i {
    font-size: 18px;
}

/* Hidden links */
.product-full-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 70%;
    /* Only covers top half to allow button interaction */
    z-index: 2;
}

@media (max-width: 991px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }

    .shop-controls {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .woocommerce-products-header__title.page-title {
        font-size: 40px;
    }
}

/* Product Details Full Section */
.product-details-full-section {
    margin-top: var(--space-3xl);
    padding: var(--space-xxl) 0;
    border-top: 1px solid #eee;
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.section-title-wrapper.centered {
    margin-bottom: var(--space-xl);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.section-title {
    font-family: var(--font-headings);
    font-size: 32px;
    color: var(--text-black);
    margin: 0;
}

.title-divider {
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    margin-top: var(--space-sm);
    border-radius: 2px;
}

.product-description-content {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.8;
    color: #444;
    text-align: left;
}

.product-description-content p {
    margin-bottom: var(--space-md);
}

.product-breadcrumb .woocommerce-breadcrumb a {
    text-decoration: none !important;
}

@media (max-width: 768px) {
    .product-details-full-section {
        padding: var(--space-xl) 20px !important;
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .section-title {
        font-size: 24px;
    }

    .product-description-content {
        font-size: 15px;
        line-height: 1.7;
    }

    /* Fix USP Bar to stay within viewport while allowing internal scroll */
    .product-trust-bullets {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        gap: var(--space-md) !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        border: none !important;
        background: #fdfdfd !important;
        padding: var(--space-lg) !important;
        border-radius: var(--radius-lg);
        margin: var(--space-lg) 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .product-trust-bullets::-webkit-scrollbar {
        display: none;
    }

    .trust-item {
        flex: 0 0 100px !important;
        white-space: normal !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        font-size: 11px !important;
    }

    .trust-item i {
        font-size: 20px !important;
        margin-bottom: 8px !important;
    }
}