/* ============================================================
   Product Single Page Styles
   Design tokens: Purple accent #6F42C1, Green buy button, Inter
   ============================================================ */

/* ---- Layout ---- */
.product-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    padding: 20px 24px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.product-media-col {
    flex: 0 0 calc(60% - 20px);
    position: sticky;
    top: 90px;
    align-self: flex-start;
}

.product-details-col {
    flex: 0 0 calc(40% - 20px);
}

/* ---- Gallery List ---- */
.product-gallery-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gallery-list-item {
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.gallery-list-image {
    width: 100%;
    height: auto;
    display: block;
    cursor: zoom-in;
}

/* ---- Zoom Modal ---- */
.gallery-zoom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.92);
    z-index: 2147483647 !important;
    cursor: zoom-out;
}

.gallery-zoom-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

body:has(.gallery-zoom-modal.active) .header-wrapper {
    z-index: auto;
}

body:has(.gallery-zoom-modal.active) .offer-cards {
    visibility: hidden;
}

.zoom-container {
    max-width: 90vw;
    max-height: 90vh;
}

.zoom-image {
    max-width: 100%;
    /* max-height: 90vh; */
    object-fit: cover;
}

.zoom-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2.5rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1;
}

/* ---- Product Title ---- */
.product_title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.2;
}

/* ---- Rating ---- */
.woocommerce-product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.woocommerce-product-rating .star-rating {
    font-size: 1rem;
    color: #f5a623;
}

.woocommerce-review-link {
    font-size: 0.85rem;
    color: #666;
}

/* ---- Price ---- */
.product-price-wrap .price {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.product-price-wrap .price del {
    font-size: 0.9rem;
    color: #999;
    font-weight: 400;
}

.product-price-wrap .price ins {
    text-decoration: none;
    color: #000;
}

/* ---- Product Excerpt ---- */
.product-excerpt {
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(0, 0, 0, 0.81);
    margin: 8px 0 20px;
}

.product-excerpt p {
    margin-bottom: 8px;
}

/* ---- Separator ---- */
.product-separator {
    height: 1px;
    background: #e0e0e0;
    margin: 24px 0;
}

/* ---- Choose Offer Section ---- */
.choose-offer-section {
    margin: 24px 0;
}

.choose-offer-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.heading-line {
    flex: 1;
    height: 1px;
    background: #6F42C1;
}

.heading-text {
    font-size: 1rem;
    font-weight: 600;
    color: #000;
    white-space: nowrap;
}

/* Offer Cards */
.offer-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.offer-card {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 2px solid rgba(111, 66, 193, 0.48);
    border-radius: 14px;
    padding: 14px 16px;
    cursor: pointer;
    position: relative;
    transition: all 0.15s;
}

.offer-card:hover {
    border-color: #6F42C1;
}

.offer-card.selected {
    border-color: #6F42C1;
    background: rgba(111, 66, 193, 0.08);
    box-shadow: 0 0 0 2px rgba(111, 66, 193, 0.2);
}

.offer-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.offer-radio-circle {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #6F42C1;
    background: white;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
}

.offer-card.selected .offer-radio-circle {
    background: #fff;
    border: 5px solid #6F42C1;
    border-radius: 50%;
    box-shadow: 0 0 0 1px #000;
    width: 22px;
    height: 22px;
}

.offer-info {
    flex: 1;
    min-width: 0;
}

.offer-title {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #222;
}

.variant-description {
    display: block;
    font-size: 0.75rem;
    color: #666;
    margin-top: 2px;
}

.variant-description p {
    margin-bottom: 0;
}

.offer-price {
    font-size: 1rem;
    font-weight: 700;
    color: #000;
    white-space: nowrap;
}

.offer-compare-price {
    font-size: 0.75rem;
    color: #999;
    text-decoration: line-through;
    white-space: nowrap;
}

.offer-card:hover {
    border-color: #5C33A8;
}

.offer-card.selected {
    border-color: #6F42C1;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.offer-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.offer-info {
    flex: 1;
    min-width: 0;
}

.offer-title {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #222;
}

.offer-compare-price {
    display: block;
    font-size: 0.75rem;
    color: #999;
    text-decoration: line-through;
    margin-top: 2px;
}

.offer-price {
    font-size: 1rem;
    font-weight: 700;
    color: #000;
    white-space: nowrap;
}

.offer-popular-badge {
    position: absolute;
    top: -10px;
    right: 12px;
    background: #6F42C1;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    letter-spacing: 0.05em;
}

.offer-out-of-stock {
    font-size: 0.75rem;
    color: #999;
    white-space: nowrap;
}

/* ---- Quantity Selector ---- */
.product-quantity-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
}

.quantity-label {
    font-weight: 500;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.qty-btn {
    width: 40px;
    height: 44px;
    border: none;
    background: #f5f5f5;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: #eee;
}

.qty-input {
    width: 50px;
    height: 44px;
    border: none;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    -moz-appearance: textfield;
}

.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ---- Buy Now Button ---- */
.btn-buy-now-cod {
    width: 100%;
    background: #5B8D37;
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 16px 20px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background 0.15s, box-shadow 0.15s;
    box-shadow: 0 2px 7px 0 rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(20px) saturate(180%) brightness(1.5);
    animation: previewRsiBounce1_live 2.86s infinite cubic-bezier(.35,.06,.2,.98) both;
}

.btn-buy-now-cod:hover {
    background: #4A7330;
    box-shadow: 0 2px 7px 0 rgba(0, 0, 0, 0.2);
    animation-play-state: paused;
}

@keyframes previewRsiBounce1_live {
    0%, 100% { transform: translateY(0); }
    5% { transform: translateY(-10px); }
    10%, 90% { transform: translateY(0); }
    95% { transform: translateY(-10px); }
}

.buy-now-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    width: 100%;
}

.buy-now-inner i {
    font-size: 1.5rem;
}

.buy-now-text {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.buy-now-text strong {
    font-size: 1rem;
    font-weight: 700;
}

.buy-now-text small {
    font-size: 0.7rem;
    opacity: 0.85;
    font-weight: 400;
}

/* ---- Description (below fold) ---- */
.product-description-full {
    padding: 40px 0;
    border-top: 1px solid #e0e0e0;
    margin-top: 30px;
}

.product-description-full h2,
.product-description-full h3 {
    font-family: 'Inter', sans-serif;
    margin-bottom: 16px;
}

.product-description-full p {
    margin-bottom: 14px;
    line-height: 1.7;
}

.product-description-full img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}

.product-description-full ul,
.product-description-full ol {
    padding-left: 20px;
    margin-bottom: 14px;
}

.product-description-full li {
    margin-bottom: 6px;
    line-height: 1.6;
}

/* ---- Archive / Shop Page ---- */
.page-header {
    padding: 30px 0 10px;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
}

.woocommerce-products-header {
    margin-bottom: 24px;
}

/* ---- Related Products / Archive Grid ---- */
.related.products {
    padding: 0;
}

.related.products h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
    content: none !important;
    display: none !important;
}

ul.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 0;
    margin: 0;
    list-style: none;
}

ul.products li.product {
    margin: 0 !important;
    width: 100% !important;
    float: none !important;
}

@media (max-width: 991px) {
    ul.products {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 749px) {
    ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

.related.products ul.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.related.products ul.products li.product {
    margin: 0;
    width: 100%;
}

.related.products .product-card {
    background: #fff;
    height: 100%;
}

@media (max-width: 991px) {
    .related.products ul.products {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 749px) {
    .related.products ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* ---- Reviews ---- */
.woocommerce-Reviews {
    padding: 30px 0;
}

.woocommerce-Reviews-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

/* ---- Sticky Cart ---- */
.sticky-cart-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    background: linear-gradient(0deg, #5B8D37 0%, #5B8D37 100%), rgba(0,0,0,0.15);
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(91, 141, 55, 0.4);
    z-index: 999;
    transition: transform 0.3s ease;
    padding: 8px 12px;
    max-width: 520px;
    width: calc(100% - 32px);
    backdrop-filter: blur(20px) saturate(180%) brightness(1.5);
}

.sticky-cart-bar.visible {
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 576px) {
    .sticky-cart-bar {
        bottom: 70px;
        left: 48%;
        width: calc(100% - 32px);
    }
}

.sticky-cart-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sticky-cart-img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.3);
    flex-shrink: 0;
}

.sticky-cart-info {
    flex: 1;
    min-width: 0;
}

.sticky-cart-title {
    font-size: 0.75rem;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    color: rgba(255,255,255,0.9);
}

.sticky-cart-price {
    font-size: 0.85rem;
    font-weight: 700;
    margin: 2px 0 0;
    color: #fff;
}

.sticky-cart-price del {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.6);
    margin-right: 6px;
}

.sticky-cart-price ins {
    text-decoration: none;
}

.sticky-buy-btn {
    flex-shrink: 0;
    padding: 10px 18px;
    font-size: 0.8rem;
    background: transparent;
    color: #fff;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
}

.sticky-buy-btn:hover {
    background: #333;
    border: 1px solid #000;
    color: #fff;
}

/* ---- Responsive ---- */
@media (max-width: 991px) {
    .product-media-col {
        position: relative;
        top: 0;
    }
}

@media (max-width: 749px) {
    .product-layout {
        flex-direction: column;
        gap: 24px;
        padding: 12px 16px 30px;
    }

    .product-media-col,
    .product-details-col {
        flex: 1 1 100%;
    }

    .product-media-col {
        position: relative;
        top: 0;
    }

    .offer-card {
        padding: 12px;
    }

    .product-description-full {
        padding: 24px 0;
    }
}

/* ---- Order Timeline ---- */
.order-timeline {
    max-width: 900px;
    margin: 24px auto 0;
    position: relative;
}

.timeline-line {
    position: absolute;
    top: 26px;
    left: 12%;
    width: 76%;
    height: 2px;
    background: #1f1f1f;
    z-index: 1;
}

.timeline-items {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    z-index: 2;
}

.timeline-item {
    width: 33.33%;
    text-align: center;
    position: relative;
}

.timeline-icon {
    width: 52px;
    height: 52px;
    margin: auto;
    border-radius: 50%;
    background: #111111;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 10px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.timeline-date {
    font-size: 14px;
    font-weight: 700;
    color: #111111;
    margin-bottom: 4px;
}

.timeline-status {
    font-size: 12px;
    color: #6d6d6d;
    font-weight: 500;
}

@media (max-width: 768px) {
    .timeline-line {
        left: 15%;
        width: 70%;
        top: 22px;
    }

    .timeline-icon {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }

    .timeline-date {
        font-size: 12px;
    }

    .timeline-status {
        font-size: 11px;
    }
}

@media (max-width: 520px) {
    .order-timeline {
        padding-top: 14px;
    }

    .timeline-items {
        gap: 8px;
    }

    .timeline-line {
        top: 20px;
    }

    .timeline-icon {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .timeline-date {
        font-size: 11px;
        line-height: 1.3;
    }

    .timeline-status {
        font-size: 10px;
    }
}