/* ==========================================================================
   COMPREHENSIVE MOBILE & GLOBAL DEVICE OPTIMIZATIONS
   ========================================================================== */

/* ==========================================================================
   MOBILE FIRST - BASE STYLES (All devices under 768px)
   ========================================================================== */
@media (max-width: 768px) {

    /* Global Container Padding - Prevent text touching edges */
    body {
        padding: 0 15px;
    }

    .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 - Single Product */
    .product-details-section {
        padding: 100px 15px 4rem !important;
    }

    .product-details-container {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        padding: 0 !important;
    }

    .product-gallery {
        position: static !important;
        padding: 0 !important;
    }

    .main-image-container {
        margin: 0 !important;
    }

    /* Product Info */
    .product-info-vlack {
        padding: 0 15px !important;
        position: static !important;
    }

    .product-title-vlack {
        font-size: 2rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
    }

    .price-container-vlack {
        font-size: 1.1rem !important;
    }

    /* Variation Selectors - Add Padding */
    .product-actions-vlack .variations {
        padding: 0 !important;
        margin-bottom: 1.5rem !important;
    }

    .product-actions-vlack .variations label {
        padding-left: 0 !important;
        margin-bottom: 0.8rem !important;
    }

    .product-actions-vlack .variations .value {
        padding: 0 !important;
    }

    /* Size/Color Swatches */
    .tawcvs-swatches {
        gap: 10px !important;
        padding: 0 !important;
    }

    /* Add to Cart Section */
    .product-actions-vlack form.cart {
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .product-actions-vlack .quantity {
        width: 100% !important;
    }

    .product-actions-vlack .single_add_to_cart_button {
        width: 100% !important;
        font-size: 1.2rem !important;
        padding: 0 1.5rem !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-block {
        flex-direction: column !important;
        gap: 1.5rem !important;
        padding: 1.5rem 0 !important;
    }

    .trust-item {
        width: 100% !important;
    }

    /* Related Products - Better Typography */
    .related-products-section h2,
    .upsells-products-section h2 {
        font-size: 1.8rem !important;
        margin-bottom: 2rem !important;
        padding: 0 15px !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-content {
        flex-direction: column !important;
        gap: 2rem !important;
        padding: 3rem 20px !important;
    }

    .footer-section {
        width: 100% !important;
        text-align: center !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 10px;
    }

    .container {
        padding: 0 10px;
    }

    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.75rem !important;
        padding: 8px 10px !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;
    }
}