/* ================================================================
   PRODUCT PAGE V3 - RESPONSIVE CSS
   Mobile optimizations and breakpoint refinements
   ================================================================ */

/* ----------------------------------------------------------------
   TABLET ADJUSTMENTS (768px - 1023px)
   ---------------------------------------------------------------- */
@media (min-width: 768px) and (max-width: 1023px) {
    .v3-hero {
        gap: 32px;
    }

    .v3-gallery-thumbnails {
        flex-direction: row;
        width: 100%;
    }

    .v3-thumbnail {
        min-width: 60px;
        width: 60px;
        height: 60px;
    }

    /* Adjust content columns */
    .v3-content {
        gap: 32px;
        padding: 0 32px;
    }

    .v3-editorial-content {
        flex: 0 0 55%;
        max-width: 55%;
    }

    .v3-accordions {
        flex: 0 0 45%;
        max-width: 45%;
    }

    .v3-product-ingress {
        display: none !important;
    }
}

/* ----------------------------------------------------------------
   MOBILE LANDSCAPE (480px - 767px)
   ---------------------------------------------------------------- */
@media (min-width: 480px) and (max-width: 767px) {
    .v3-product-title {
        font-size: 28px;
    }

    .v3-product-price {
        font-size: 24px;
    }

    /* Keep quantity + button side by side on landscape */
    .v3-add-to-cart-wrapper form.cart,
    .v3-add-to-cart-wrapper .woocommerce-variation-add-to-cart {
        flex-direction: row;
    }

    .v3-add-to-cart-wrapper .quantity {
        flex: 0 0 auto;
    }

    .v3-add-to-cart-wrapper .single_add_to_cart_button {
        flex: 1;
    }

    .v3-product-ingress {
        display: none !important;
    }
}

/* ----------------------------------------------------------------
   SMALL MOBILE (<480px)
   ---------------------------------------------------------------- */
@media (max-width: 479px) {
    .product-page-v3 {
        padding: 0 16px;
    }

    .v3-hero {
        gap: 20px;
        margin: 20px 0;
    }

    /* Gallery */
    .v3-gallery-thumbnails {
        gap: 8px;
    }

    .v3-thumbnail {
        min-width: 50px;
        width: 50px;
        height: 50px;
    }

    .v3-main-image-wrapper {
        border-radius: 4px;
    }

    /* Product Header */
    .v3-product-title {
        font-size: 22px;
        margin-bottom: 12px;
    }

    .v3-product-price {
        font-size: 22px;
        margin-bottom: 12px;
    }

    .v3-product-ingress {
        display: none !important;
    }

    /* Purchase Module */
    .v3-purchase-module {
        margin-bottom: 20px;
    }

    .v3-quantity-wrapper {
        width: 130px;
        height: 48px;
    }

    .v3-quantity-input {
        width: 100%;
    }

    .v3-add-to-cart-btn {
        height: 48px;
        font-size: 15px;
    }

    /* Trust Badges */
    .v3-trust-badges {
        gap: 10px;
        padding: 16px 0;
    }

    .v3-trust-item {
        font-size: 13px;
    }

    /* Statement Band */
    .v3-statement-band {
        padding: 32px 16px;
        margin: 32px 0;
    }

    .v3-statement-text {
        font-size: 16px;
    }

    .v3-statement-icon {
        font-size: 28px;
    }

    /* Content Section */
    .v3-content {
        gap: 32px;
        margin: 32px 0;
        padding: 0;
    }

    .related.products,
    .upsells.products,
    .cross-sells.products {
        padding: 0 12px;
        position: relative;
    }

    .related-products,
    .editorial-related {
        padding: 32px 0;
        margin: 0 16px;
        position: relative;
    }

    /* Scroll hint arrow for horizontal slider */
    .related-products::after {
        content: "→";
        position: absolute;
        right: 12px;
        top: 60%;
        transform: translateY(-50%);
        width: 60px;
        height: 60%;
        background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1) 70%);
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding-right: 5px;
        font-size: 24px;
        font-weight: bold;
        color: #8a7c28;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .related-products.is-scrolled::after {
        opacity: 0;
    }

    .v3-story-box {
        padding: 20px 16px;
        margin-bottom: 32px;
    }

    /* Statement Band - Allow wrapping on mobile to prevent overflow */
    .v3-statement-text {
        white-space: normal !important;
        font-size: 16px !important;
        line-height: 1.4 !important;
    }

    .v3-story-title {
        font-size: 18px;
    }

    .v3-long-description {
        font-size: 15px;
        padding: 0 12px;
    }

    /* Accordion */
    .v3-accordion-header {
        padding: 14px 16px;
    }

    .v3-accordion-title {
        font-size: 15px;
    }

    .v3-accordion-inner {
        padding: 0 16px 16px 16px;
        font-size: 14px;
    }
}

/* ----------------------------------------------------------------
   PRINT STYLES
   ---------------------------------------------------------------- */
@media print {

    .v3-gallery-thumbnails,
    .v3-nav-arrow,
    .v3-zoom-trigger,
    .v3-purchase-module,
    .v3-add-to-cart-btn {
        display: none !important;
    }

    .v3-accordion-item {
        border: none !important;
        page-break-inside: avoid;
    }

    .v3-accordion-content {
        max-height: none !important;
    }

    .v3-accordion-item .v3-accordion-content {
        display: block !important;
    }
}

/* ----------------------------------------------------------------
   ACCESSIBILITY ENHANCEMENTS
   ---------------------------------------------------------------- */

/* Focus visible styles */
.v3-thumbnail:focus-visible,
.v3-nav-arrow:focus-visible,
.v3-zoom-trigger:focus-visible,
.v3-qty-btn:focus-visible,
.v3-add-to-cart-btn:focus-visible,
.v3-accordion-header:focus-visible {
    outline: 2px solid #2c5f2d;
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .v3-accordion-content {
        transition: none !important;
    }

    .v3-accordion-icon {
        transition: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .v3-accordion-item {
        border-width: 2px;
    }

    .v3-thumbnail {
        border-width: 3px;
    }

    .v3-add-to-cart-btn {
        border: 2px solid currentColor;
    }
}

/* ----------------------------------------------------------------
   DARK MODE (EXPERIMENTAL)
   ---------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable dark mode support */
    /*
    .product-page-v3 {
        background: #1a1a1a;
        color: #e5e5e5;
    }
    
    .v3-product-title,
    .v3-accordion-title {
        color: #fff;
    }
    
    .v3-accordion-item {
        background: #2a2a2a;
        border-color: #444;
    }
    
    .v3-statement-band {
        background: #2a2a2a;
    }
    */
}

/* ----------------------------------------------------------------
   PERFORMANCE OPTIMIZATIONS
   ---------------------------------------------------------------- */

/* Use GPU acceleration for smooth transitions */
.v3-main-image,
.v3-accordion-icon,
.v3-nav-arrow,
.v3-zoom-trigger {
    will-change: transform, opacity;
}

/* Remove will-change after transition completes */
.v3-main-image.active {
    will-change: auto;
}
