/* ==========================================================================
   COMPREHENSIVE MOBILE & GLOBAL DEVICE OPTIMIZATIONS
   ========================================================================== */

/* ==========================================================================
   MOBILE FIRST - BASE STYLES (All devices under 768px)
   ========================================================================== */
@media (max-width: 768px) {

    /* Global Container Padding - Prevent text touching edges */
    /* GLOBAL RWD BASE - Ensure nothing overflows & everything aligns */
    html,
    body {
        padding: 0;
        margin: 0;
        overflow-x: hidden !important;
        width: 100%;
        position: relative;
        -webkit-text-size-adjust: 100%;
        /* Fix iOS scaling */
    }

    * {
        max-width: 100% !important;
        /* Force items to stay within parents */
        box-sizing: border-box !important;
    }

    .container,
    .nav-container,
    .footer-content,
    .product-details-container {
        width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        max-width: 100% !important;
    }

    .container {
        padding: 0 15px;
    }

    /* Typography Scaling */
    html {
        font-size: 14px;
        /* Slightly smaller base for mobile */
    }

    h1 {
        font-size: 2rem !important;
    }

    h2 {
        font-size: 1.75rem !important;
    }

    h3 {
        font-size: 1.5rem !important;
    }

    /* Hero Section - Reduce overwhelming size */
    .hero-section {
        min-height: 70vh !important;
        padding: 60px 20px !important;
    }

    .masked-hero-text {
        font-size: 15vw !important;
    }

    .hero-content h1 {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
    }

    .hero-content p {
        font-size: 1rem !important;
        margin-bottom: 1.5rem !important;
    }

    /* Navigation */
    .nav-container {
        padding: 0 15px !important;
    }

    .logo-text {
        height: 18px !important;
    }

    .logo-icon {
        height: 35px !important;
    }

    /* Product Grid */
    .products-grid,
    .woocommerce-loop-product__link {
        padding: 0 !important;
    }

    .product-card {
        margin-bottom: 2rem;
    }

    .product-info h3 {
        font-size: 1.1rem !important;
        line-height: 1.4 !important;
        padding: 0 10px;
    }

    .price-container {
        padding: 0 10px;
        font-size: 1rem !important;
    }

    /* PRODUCT PAGE - GLOBAL ALIGNMENT */
    .product-details-section {
        padding: 90px 10px 3rem !important;
        width: 100% !important;
        display: block !important;
    }

    .product-details-container {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 2rem !important;
        width: 100% !important;
        padding: 0 !important;
    }

    /* Target both potential gallery classes */
    .product-gallery,
    .product-gallery-vlack {
        display: block !important;
        width: 100% !important;
        position: static !important;
        margin: 0 auto 2rem !important;
    }

    .main-image-container {
        width: 100% !important;
        margin: 0 !important;
        display: flex !important;
        justify-content: center !important;
    }

    /* Product Info - LEFT ALIGNED */
    .product-info-vlack {
        width: 100% !important;
        padding: 0 10px !important;
        text-align: left !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .product-title-vlack {
        font-size: 2rem !important;
        line-height: 1.1 !important;
        margin: 0 0 1.5rem 0 !important;
        text-align: left !important;
        width: 100% !important;
        overflow-wrap: break-word !important;
    }

    .price-container-vlack {
        font-size: 1.3rem !important;
        justify-content: flex-start !important;
        width: 100% !important;
        text-align: left !important;
        margin-bottom: 2rem !important;
    }

    .tax-note {
        text-align: left !important;
    }

    /* Variation Selectors - Left aligned */
    .product-actions-vlack .variations {
        padding: 0 !important;
        margin: 0 0 2rem 0 !important;
        width: 100% !important;
    }

    .product-actions-vlack .variations table {
        margin: 0 !important;
    }

    .product-actions-vlack .variations tr {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        margin-bottom: 1.5rem !important;
    }

    .product-actions-vlack .variations label {
        text-align: left !important;
        margin-bottom: 1rem !important;
        display: block !important;
        width: 100% !important;
    }

    .product-actions-vlack .variations .value {
        padding: 0 !important;
        display: flex !important;
        justify-content: flex-start !important;
    }

    /* Color Swatches - Massive Gap for Selection Growth */
    .tawcvs-swatches {
        gap: 45px !important;
        /* Extremely wide gap for circle expansion */
        padding: 0 !important;
        justify-content: flex-start !important;
        flex-wrap: nowrap !important;
        display: flex !important;
        overflow-x: visible !important;
    }

    /* Size Selectors - Compact Gap to Stay on One Line */
    .size-selector,
    .product-actions-vlack .variations .value {
        gap: 10px !important;
        /* Compact gap for 5 buttons */
        padding: 0 !important;
        justify-content: flex-start !important;
        flex-wrap: nowrap !important;
        display: flex !important;
        overflow-x: visible !important;
    }

    .tawcvs-swatches .swatch,
    .size-btn,
    .swatch-label {
        min-width: 44px !important;
        width: auto !important;
        max-width: 60px !important;
        height: 44px !important;
        padding: 0 5px !important;
        font-size: 0.85rem !important;
        flex-shrink: 0 !important;
        display: flex !important;
        align-items: flex-start !important;
        justify-content: center !important;
    }

    /* Add to Cart Section - Force Constant Stacked Column */
    .product-actions-vlack form.cart,
    .product-actions-vlack .variations_button,
    .product-actions-vlack .woocommerce-variation-add-to-cart,
    .single_variation_wrap {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        width: 100% !important;
    }

    .product-actions-vlack .quantity,
    .product-actions-vlack .qty-wrapper,
    .quantity {
        width: 140px !important;
        margin: 0 0 1rem 0 !important;
        border: 1px solid #fff !important;
        height: 50px !important;
        flex: none !important;
    }

    .product-actions-vlack .single_add_to_cart_button,
    .single_add_to_cart_button {
        width: 100% !important;
        max-width: 400px !important;
        min-height: 65px !important;
        /* Taller mobile height */
        background: #B6B6B6 !important;
        color: #17181A !important;
        font-family: 'Anton', sans-serif !important;
        font-size: 1.3rem !important;
        /* Slightly bigger font */
        padding: 0 1.5rem !important;
        margin: 0 !important;
        border-radius: 8px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        white-space: nowrap !important;
    }

    /* Accordions */
    .accordion-item summary {
        font-size: 1rem !important;
        padding: 1.2rem 0 !important;
    }

    .accordion-content {
        font-size: 0.9rem !important;
        line-height: 1.7 !important;
    }

    /* Trust Badges */
    /* Trust Badges - FORCED HORIZONTAL */
    .trust-badges-block {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 0.5rem !important;
        padding: 1.5rem 0 !important;
        margin: 2rem auto !important;
        width: 100% !important;
    }

    .trust-item {
        flex: 1 !important;
        min-height: auto !important;
        gap: 0.4rem !important;
    }

    .trust-text {
        font-size: 0.6rem !important;
        letter-spacing: 0.5px !important;
    }

    .trust-icon {
        width: 22px !important;
        height: 22px !important;
    }

    .trust-divider {
        display: none !important;
        /* Hide dividers on mobile to save space */
    }

    /* Related Products - Better Typography */
    .related-products-section {
        padding: 4rem 10px !important;
    }

    .related-products-section .product-grid {
        grid-template-columns: 1fr !important;
        /* Single column on mobile */
        width: 100% !important;
        margin: 0 auto !important;
    }

    .related-products-section h2 {
        font-size: 2rem !important;
        margin-bottom: 2rem !important;
        text-align: center !important;
    }

    .related-products-section .product .woocommerce-loop-product__title,
    .upsells-products-section .product .woocommerce-loop-product__title {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
        letter-spacing: 0.3px !important;
    }

    /* Footer */
    /* Footer - RWD LEFT ALIGNED */
    .footer-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        text-align: left !important;
        gap: 2rem !important;
        width: 100% !important;
        padding: 3rem 15px !important;
    }

    .footer-brand {
        flex: 0 0 100% !important;
        margin-bottom: 2rem !important;
    }

    .footer-links {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
        width: 100% !important;
        gap: 2.5rem 2rem !important;
    }

    .link-column {
        flex: 1 1 40% !important;
        /* Two columns side by side on most phones */
        min-width: 120px !important;
        text-align: left !important;
    }

    .link-column h4 {
        font-size: 1.1rem !important;
        margin-bottom: 1rem !important;
    }

    .link-column a {
        font-size: 0.85rem !important;
        margin-bottom: 0.5rem !important;
        display: block !important;
    }

    /* Hide Gallery Section on Mobile */
    .gallery-section,
    #gallery {
        display: none !important;
    }

    /* Checkout Page */
    .woocommerce-checkout {
        padding-top: 90px !important;
    }

    .wc-block-checkout__header {
        padding: 0 15px !important;
    }

    .wc-block-components-sidebar {
        padding: 20px 15px 40px !important;
    }

    .wc-block-components-main {
        padding: 0 15px !important;
    }

    /* Contact Page */
    .contact-container {
        flex-direction: column !important;
        gap: 2rem !important;
        padding: 0 20px !important;
    }

    .contact-info h2 {
        font-size: 2.5rem !important;
    }

    /* Shop Page */
    .shop-header {
        padding: 100px 20px 40px !important;
    }

    .shop-header h1 {
        font-size: 2.5rem !important;
    }

    /* Cart Sidebar */
    .cart-sidebar {
        width: 100% !important;
        max-width: 100% !important;
    }

    .cart-sidebar-header h2 {
        font-size: 1.5rem !important;
    }
}

/* ==========================================================================
   SMALL MOBILE (iPhone SE, Small Androids - under 400px)
   ========================================================================== */
@media (max-width: 400px) {

    body {
        padding: 0;
    }

    .container {
        padding: 0 8px;
    }

    html {
        font-size: 13px;
    }

    .product-title-vlack {
        font-size: 1.6rem !important;
    }

    .hero-content h1 {
        font-size: 2rem !important;
    }

    .related-products-section ul.products,
    .upsells-products-section ul.products {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .announcement-bar {
        font-size: 0.7rem !important;
        padding: 8px 0 !important;
        width: 100% !important;
        margin: 0 !important;
    }
}

/* ==========================================================================
   TABLET (768px - 1024px)
   ========================================================================== */
@media (min-width: 769px) and (max-width: 1024px) {

    .container {
        padding: 0 30px;
    }

    .product-details-container {
        gap: 3rem !important;
    }

    .product-title-vlack {
        font-size: 2.8rem !important;
    }

    .hero-content h1 {
        font-size: 3.5rem !important;
    }

    .related-products-section ul.products,
    .upsells-products-section ul.products {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
    }
}

/* ==========================================================================
   LARGE DESKTOP (1440px+)
   ========================================================================== */
@media (min-width: 1440px) {

    .container {
        max-width: 1600px;
    }

    .product-details-container {
        max-width: 1600px;
    }

    .related-products-section,
    .upsells-products-section {
        max-width: 1600px;
    }
}

/* ==========================================================================
   LANDSCAPE MOBILE (Mobile in landscape orientation)
   ========================================================================== */
@media (max-height: 500px) and (orientation: landscape) {

    .hero-section {
        min-height: 100vh !important;
    }

    .product-details-section {
        padding-top: 80px !important;
    }

    .nav-container {
        padding: 10px 20px !important;
    }
}

/* ==========================================================================
   TOUCH DEVICE OPTIMIZATIONS
   ========================================================================== */
@media (hover: none) and (pointer: coarse) {

    /* Larger touch targets */
    button,
    .button,
    a.button,
    input[type="submit"] {
        min-height: 44px !important;
        min-width: 44px !important;
    }

    /* Prevent hover states on touch */
    .product-card:hover {
        transform: none !important;
    }

    /* Better tap feedback */
    button:active,
    .button:active {
        transform: scale(0.98) !important;
    }
}

/* ==========================================================================
   HIGH DPI DISPLAYS (Retina, 4K, etc.)
   ========================================================================== */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

    /* Sharper borders */
    .product-card,
    .related-products-section .product {
        border-width: 0.5px !important;
    }

    /* Better image rendering */
    img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* MINI CART QUANTITY STYLING */
.widget_shopping_cart_content .quantity,
.xoo-wsc-cart-content .quantity,
.xoo-wsc-qty {
    display: flex !important;
    align-items: center;
    max-width: 150px;
    margin: 5px 0;
    color: #000;
}

.widget_shopping_cart_content .qty-wrapper,
.xoo-wsc-cart-content .qty-wrapper {
    display: flex !important;
    border: 1px solid #000;
    background: #fff !important;
    margin-right: 10px;
}

.widget_shopping_cart_content input.qty,
.xoo-wsc-cart-content input.qty,
.xoo-wsc-qty input {
    width: 40px !important;
    text-align: center !important;
    border: none !important;
    padding: 0 !important;
    height: 35px !important;
    margin: 0 !important;
    color: #000 !important;
    background: #fff !important;
    font-size: 1rem !important;
    -moz-appearance: textfield;
}

.widget_shopping_cart_content .qty-btn,
.xoo-wsc-cart-content .qty-btn {
    width: 35px !important;
    height: 35px !important;
    background: #000 !important;
    color: #fff !important;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 !important;
}

input.qty::-webkit-outer-spin-button,
input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}