/* EkoKeeper Custom Styles - Reptile Feeder Bug Products */

/* Custom Tailwind Colors */
:root {
    --eco-green: #22c55e;
    --eco-dark: #0f172a;
    --eco-light: #f8fafc;
    --eco-green-rgb: 34, 197, 94;
    --eco-dark-rgb: 15, 23, 42;
}

/* Hero Section Styles */
.gradient-bg {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 40%, #16a34a 80%, #22c55e 100%);
    position: relative;
    overflow: hidden;
}

/* Video Background Styles */
.hero-video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 1;
    object-fit: cover;
}

.gradient-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.4) 0%, rgba(22, 163, 74, 0.3) 50%, rgba(34, 197, 94, 0.4) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
}

.hero-pattern {
    background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.1) 1px, transparent 0);
    background-size: 20px 20px;
}

/* Product Selection Styles */
.color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    touch-action: manipulation;
    /* Improves mobile touch performance */
}

@media (max-width: 768px) {
    .color-swatch {
        width: 50px;
        height: 50px;
    }
}

.color-swatch:hover {
    transform: scale(1.1);
}

.color-swatch.selected {
    border-color: var(--eco-green);
    box-shadow: 0 0 0 2px rgba(var(--eco-green-rgb), 0.2);
}

/* Card Styles */
.product-card {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.glass-card {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Button Effects */
.btn-glow {
    box-shadow: 0 0 20px rgba(var(--eco-green-rgb), 0.4);
}

.btn-glow:hover {
    box-shadow: 0 0 30px rgba(var(--eco-green-rgb), 0.6);
}

.btn-eco {
    background: var(--eco-green);
    color: white;
    transition: all 0.3s ease;
}

.btn-eco:hover {
    background: #16a34a;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(var(--eco-green-rgb), 0.3);
}

/* Mobile-friendly button improvements */
.model-btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 48px;
    /* Minimum touch target size for mobile */
}

@media (max-width: 768px) {
    .model-btn {
        min-height: 56px;
        font-size: 16px;
        /* Prevents zoom on iOS */
    }

    /* Larger touch targets for mobile */
    .btn,
    button {
        min-height: 44px;
        font-size: 16px;
    }

    /* Better mobile navigation */
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* Mobile Navigation Improvements */
#mobile-menu {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#mobile-menu a:hover,
#mobile-menu button:hover {
    transform: translateX(4px);
}

/* Mobile Menu Animation */
.mobile-menu-item {
    animation: slideInFromRight 0.3s ease-out;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Mobile User Section Styling */
#mobile-user-section {
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(22, 163, 74, 0.05) 100%);
}

/* Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

/* Page Header Styles */
.page-header {
    background: linear-gradient(135deg, var(--eco-dark) 0%, #1e293b 50%, var(--eco-green) 100%);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.8);
    z-index: 1;
}

.page-header-content {
    position: relative;
    z-index: 2;
}

/* Navigation Enhancements */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--eco-green);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Improve mobile menu visibility */
@media (max-width: 768px) {
    #mobile-menu {
        backdrop-filter: blur(20px);
    }

    /* Prevent content shift on menu open */
    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
}

/* Content Sections */
.content-section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--eco-dark);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.25rem;
    color: #6b7280;
    margin-bottom: 3rem;
}

/* Bug-specific Styles */
.bug-category-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.bug-category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--eco-green);
}

.bug-icon {
    width: 4rem;
    height: 4rem;
    background: var(--eco-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 1.5rem;
}

/* Feature Cards */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Responsive Design */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .hero-content {
        padding: 2rem 0;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Optimize video for mobile devices */
    .hero-video-bg {
        /* Keep video visible on mobile - modern devices can handle it */
        object-fit: cover;
    }

    /* Mobile should use same gradient as desktop - no blown up logo */
    .gradient-bg {
        /* Use the same gradient background as desktop */
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 40%, #16a34a 80%, #22c55e 100%);
    }
}

/* Utility Classes */
.text-eco-green {
    color: var(--eco-green);
}

.text-eco-dark {
    color: var(--eco-dark);
}

.bg-eco-green {
    background-color: var(--eco-green);
}

.bg-eco-dark {
    background-color: var(--eco-dark);
}

.bg-eco-light {
    background-color: var(--eco-light);
}

.border-eco-green {
    border-color: var(--eco-green);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--eco-green);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Announcement Banner Styles */
.announcement-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(90deg, var(--eco-green) 0%, #16a34a 50%, var(--eco-green) 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-out;
    height: 40px;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.announcement-banner.hidden {
    transform: translateY(-100%);
}

.announcement-scroll {
    white-space: nowrap;
    animation: scroll-text 25s linear infinite;
    display: inline-block;
    padding: 0 20px;
    line-height: 1;
}

@keyframes scroll-text {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

.announcement-banner .close-btn {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10000;
    line-height: 1;
    flex-shrink: 0;
}

.announcement-banner .close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Header and Banner Integration */
header {
    transition: transform 0.3s ease-in-out;
}

/* Adjust content spacing based on banner visibility */
.banner-offset {
    padding-top: calc(4rem + 40px) !important;
    /* nav height + banner height */
}

body:not(.banner-visible) .banner-offset {
    padding-top: 4rem !important;
    /* just nav height */
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .announcement-banner {
        height: 36px;
        font-size: 13px;
        padding: 0 8px;
    }

    .banner-offset {
        padding-top: calc(4rem + 36px) !important;
        /* nav height + mobile banner height */
    }

    body:not(.banner-visible) .banner-offset {
        padding-top: 4rem !important;
    }

    .announcement-banner .close-btn {
        width: 22px;
        height: 22px;
        font-size: 14px;
        right: 8px;
        border-radius: 50%;
        min-width: 22px;
        min-height: 22px;
    }

    .announcement-scroll {
        padding: 0 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .announcement-banner {
        height: 32px;
        font-size: 12px;
        padding: 0 6px;
    }

    .banner-offset {
        padding-top: calc(4rem + 32px) !important;
        /* nav height + small mobile banner height */
    }

    body:not(.banner-visible) .banner-offset {
        padding-top: 4rem !important;
    }

    .announcement-banner .close-btn {
        width: 20px;
        height: 20px;
        font-size: 12px;
        right: 6px;
        border-radius: 50%;
        min-width: 20px;
        min-height: 20px;
    }

    .announcement-scroll {
        padding: 0 10px;
        font-size: 12px;
    }
}

/* 📱 ADMIN DASHBOARD MOBILE ENHANCEMENTS */

/* Improved mobile buttons for admin dashboard */
@media (max-width: 768px) {
    /* INVENTORY SECTION MOBILE FIX - Keep it professional! */

    /* Smaller, more mobile-friendly action buttons */
    #inventory-panel .bg-eco-green,
    #inventory-panel .bg-blue-500,
    button[onclick="addInventoryItem()"],
    button[onclick="refreshInventory()"] {
        padding: 8px 12px !important;
        font-size: 14px !important;
        min-height: 40px !important;
    }

    /* Make button container responsive */
    #inventory-panel .flex.gap-3 {
        flex-direction: column !important;
        gap: 8px !important;
        width: 100% !important;
    }

    #inventory-panel .flex.gap-3 button {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Header section mobile improvements */
    #inventory-panel .flex.justify-between.items-center {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }

    #inventory-panel h2 {
        font-size: 1.25rem !important;
        margin-bottom: 0 !important;
    }

    /* Summary cards - two columns on mobile */
    #inventory-panel .grid.grid-cols-1.md\\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        margin-bottom: 16px !important;
    }

    /* RESPONSIVE INVENTORY CARDS - Remove scroll if items fit */
    #inventory-groups {
        /* Remove forced horizontal scroll - let it be natural */
        padding-bottom: 4px !important;
    }

    /* Individual inventory group cards - more compact */
    #inventory-groups .bg-white {
        margin-bottom: 12px !important;
        border-radius: 8px !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    }

    /* Product header in groups - much more compact */
    #inventory-groups .bg-gray-50 {
        padding: 8px 12px !important;
        border-radius: 8px 8px 0 0 !important;
    }

    #inventory-groups .bg-gray-50 h3 {
        font-size: 0.9rem !important;
        margin-bottom: 2px !important;
        font-weight: 600 !important;
    }

    /* ORIGINAL INVENTORY DESIGN - Keep original desktop, mobile-friendly mobile */
    #inventory-groups {
        padding-bottom: 8px !important;
    }

    /* Individual inventory product cards */
    #inventory-groups .bg-white {
        margin-bottom: 20px !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
        overflow: hidden !important;
    }

    /* Product header */
    #inventory-groups .bg-gray-50 {
        padding: 16px 20px !important;
        border-radius: 8px 8px 0 0 !important;
        background: #f9fafb !important;
        border-bottom: 1px solid #e5e7eb !important;
    }

    #inventory-groups .bg-gray-50 h3 {
        font-size: 1.1rem !important;
        margin-bottom: 6px !important;
        font-weight: 600 !important;
        color: #1f2937 !important;
    }

    /* Original grid layout - responsive */
    #inventory-groups .grid.grid-cols-1.md\\:grid-cols-2.lg\\:grid-cols-3 {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
        gap: 16px !important;
        padding: 20px !important;
    }

    /* Individual variant cards - keep original design but make mobile-friendly */
    #inventory-groups .grid>div {
        background: #ffffff !important;
        border: 1px solid #e5e7eb !important;
        border-radius: 8px !important;
        padding: 16px !important;
        transition: all 0.2s ease !important;
        min-height: 180px !important;
    }

    /* Stock-based color coding - keep original colors */
    #inventory-groups .grid>div.stock-high {
        border-left: 4px solid #22c55e !important;
        background: #f0fdf4 !important;
    }

    #inventory-groups .grid>div.stock-medium {
        border-left: 4px solid #f59e0b !important;
        background: #fffbeb !important;
    }

    #inventory-groups .grid>div.stock-low {
        border-left: 4px solid #ef4444 !important;
        background: #fef2f2 !important;
    }

    #inventory-groups .grid>div.stock-empty {
        border-left: 4px solid #6b7280 !important;
        background: #f9fafb !important;
    }

    /* Mobile responsive improvements - change to list layout on mobile only */
    @media (max-width: 767px) {

        /* Mobile: Convert to simple list layout */
        #inventory-groups .grid.grid-cols-1.md\\:grid-cols-2.lg\\:grid-cols-3 {
            display: block !important;
            padding: 16px !important;
        }

        /* Mobile: Convert grid cards to simple list items */
        #inventory-groups .grid>div {
            border: none !important;
            border-radius: 0 !important;
            padding: 12px 0 !important;
            background: transparent !important;
            border-bottom: 1px solid #f3f4f6 !important;
            min-height: auto !important;
            margin-bottom: 0 !important;
        }

        #inventory-groups .grid>div:last-child {
            border-bottom: none !important;
        }

        /* Mobile: Stock-based coloring - subtle left border */
        #inventory-groups .grid>div.stock-high {
            border-left: 3px solid #22c55e !important;
            padding-left: 15px !important;
            background: #f0fdf4 !important;
            margin-left: -3px !important;
            border-bottom: 1px solid #f3f4f6 !important;
        }

        #inventory-groups .grid>div.stock-medium {
            border-left: 3px solid #f59e0b !important;
            padding-left: 15px !important;
            background: #fffbeb !important;
            margin-left: -3px !important;
            border-bottom: 1px solid #f3f4f6 !important;
        }

        #inventory-groups .grid>div.stock-low {
            border-left: 3px solid #ef4444 !important;
            padding-left: 15px !important;
            background: #fef2f2 !important;
            margin-left: -3px !important;
            border-bottom: 1px solid #f3f4f6 !important;
        }

        #inventory-groups .grid>div.stock-empty {
            border-left: 3px solid #6b7280 !important;
            padding-left: 15px !important;
            background: #f9fafb !important;
            margin-left: -3px !important;
            border-bottom: 1px solid #f3f4f6 !important;
        }

        /* Mobile: Simplify the grid layout inside cards */
        #inventory-groups .grid>div .grid.grid-cols-3 {
            display: flex !important;
            justify-content: space-between !important;
            text-align: left !important;
        }

        /* Mobile: Smaller header sections */
        #inventory-groups .bg-gray-50 {
            padding: 12px 16px !important;
        }

        /* Mobile: Very small screens - stack some elements */
        @media (max-width: 480px) {
            #inventory-groups .grid>div .flex.justify-between {
                flex-direction: column !important;
                align-items: flex-start !important;
                gap: 8px !important;
            }
        }
    }

    /* General admin improvements */
    .admin-btn,
    button[type="submit"],
    button[type="button"],
    .btn-primary,
    .btn-secondary {
        min-height: 44px !important;
        min-width: 44px !important;
        padding: 10px 14px !important;
        font-size: 14px !important;
        touch-action: manipulation;
    }

    /* Small action buttons */
    .btn-sm,
    .action-btn {
        min-height: 40px !important;
        min-width: 40px !important;
        padding: 8px 10px !important;
    }

    /* Stats cards - better mobile layout */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .stat-card {
        padding: 16px 12px !important;
        text-align: center !important;
    }

    /* Table responsiveness improvements for regular tables */
    .admin-table-container {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        border-radius: 8px !important;
        border: 1px solid #e5e7eb !important;
        margin: 0 -16px !important;
    }

    .admin-table {
        min-width: 800px !important;
        /* Ensure table doesn't get too cramped */
    }

    .admin-table th,
    .admin-table td {
        padding: 8px 6px !important;
        font-size: 13px !important;
        white-space: nowrap !important;
    }

    /* Form inputs - better mobile experience */
    .admin-input,
    input[type="text"],
    input[type="email"],
    input[type="number"],
    input[type="password"],
    textarea,
    select {
        min-height: 44px !important;
        font-size: 16px !important;
        /* Prevents zoom on iOS */
        padding: 10px 14px !important;
        border-radius: 6px !important;
    }

    /* Modal improvements for mobile */
    .admin-modal {
        margin: 8px !important;
        max-height: calc(100vh - 32px) !important;
        overflow-y: auto !important;
    }

    .modal-content {
        padding: 16px !important;
    }

    .modal-footer {
        flex-direction: column !important;
    }

    .modal-footer button {
        width: 100% !important;
        margin: 4px 0 !important;
    }

    /* Tab navigation - mobile friendly */
    .admin-tabs {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .admin-tab {
        min-width: 120px !important;
        padding: 12px 16px !important;
        white-space: nowrap !important;
    }

    /* Spacing improvements */
    .admin-section {
        padding: 16px 12px !important;
        margin-bottom: 16px !important;
    }
}

/* Small screen specific (phones in portrait) */
@media (max-width: 480px) {

    /* Single column layout for stats */
    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    /* Smaller padding for very small screens */
    .admin-section {
        padding: 12px 8px !important;
    }

    /* Compact table for small screens */
    .admin-table th,
    .admin-table td {
        padding: 8px 4px !important;
        font-size: 12px !important;
    }

    /* Stack button groups vertically */
    .button-group {
        flex-direction: column !important;
    }

    .button-group button {
        margin: 2px 0 !important;
        width: 100% !important;
    }
}

/* Touch improvements for all mobile devices */
@media (hover: none) and (pointer: coarse) {

    /* Better touch targets */
    .clickable,
    button,
    .btn,
    a:not(.no-touch) {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Remove hover effects on touch devices */
    .hover-effect:hover {
        transform: none !important;
    }

    /* Better focus states for touch */
    button:focus,
    input:focus,
    select:focus,
    textarea:focus {
        outline: 2px solid #22c55e !important;
        outline-offset: 2px !important;
    }
}

/* Pro Package Food Selection Styles */
#pro-food-selection {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Package Selection Styles for Product Details */
.package-option {
    transition: all 0.2s ease;
}

.package-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.package-option.active {
    border-color: #22c55e !important;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

/* Weight option styles for product details */
.weight-option {
    transition: all 0.2s ease;
}

.weight-option:hover {
    transform: translateY(-1px);
}

#pro-weight-options label {
    transition: all 0.2s ease;
}

#pro-weight-options label:hover {
    border-color: #f59e0b;
    background-color: #fef3c7;
}

#pro-weight-options input[type="radio"]:checked+div {
    color: #d97706;
}

#pro-price-breakdown {
    background: linear-gradient(135deg, #ffffff 0%, #fefbf3 100%);
    border: 1px solid #f3e8ff;
}

/* Weight option radio button animations */
#pro-weight-options input[type="radio"] {
    transition: all 0.2s ease;
}

#pro-weight-options input[type="radio"]:checked {
    transform: scale(1.1);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

/* Success message styling for pro package */
.pro-package-success {
    backdrop-filter: blur(4px);
    border-left: 4px solid #f59e0b;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* ========================================
   FOLDABLE DEVICE SUPPORT (Samsung Fold, etc.)
   ======================================== */

/* Samsung Fold 5 Cover Display (folded): 904x2316px */
@media screen and (max-width: 380px) {
    body {
        font-size: 14px;
    }

    .hero-content h1 {
        font-size: 2rem !important;
    }

    .hero-content p {
        font-size: 0.9rem !important;
    }

    /* Ensure buttons are touch-friendly on narrow screens */
    button,
    .btn,
    a.btn {
        min-height: 48px;
        padding: 12px 16px;
        font-size: 14px;
    }

    /* Stack elements vertically on very narrow screens */
    .grid {
        grid-template-columns: 1fr !important;
    }
}

/* Touch-optimized for all mobile devices including foldables */
@media (hover: none) and (pointer: coarse) {

    /* Larger touch targets */
    button,
    .btn,
    a.btn,
    input,
    select,
    textarea {
        min-height: 48px;
        padding: 12px 16px;
    }

    /* Remove hover effects on touch devices */
    .color-swatch:hover {
        transform: none;
    }

    .btn-eco:hover {
        transform: none;
    }

    /* Add active state for better feedback */
    .color-swatch:active {
        transform: scale(0.95);
    }

    button:active,
    .btn:active {
        transform: scale(0.98);
    }
}

/* Wide foldable screens (unfolded) */
@media screen and (min-width: 600px) and (max-width: 900px) {

    /* Optimize for tablet-like unfolded view */
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Landscape mode for foldables */
@media screen and (orientation: landscape) and (max-height: 500px) {

    /* Reduce vertical padding in landscape */
    .hero-section,
    section {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    .min-h-screen {
        min-height: auto !important;
    }
}

/* Modern Image Carousel Styles */
.image-carousel-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 0 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 20px;
    aspect-ratio: 1;
    background: #ffffff;
}

.carousel-track {
    display: flex;
    width: 400%;
    /* 4 slides total (2 original + 2 duplicates) */
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.carousel-slide {
    flex: 0 0 25%;
    /* Each slide takes 25% of the track (100% / 4 slides) */
    height: 100%;
    position: relative;
    overflow: hidden;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    border-radius: 0;
    border: none;
}

.carousel-slide:hover .carousel-image {
    transform: scale(1.02);
    transition: transform 0.4s ease;
}

/* Subtle overlay effect for production images */
.carousel-slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.05) 0%,
            rgba(255, 255, 255, 0.1) 30%,
            rgba(255, 255, 255, 0.05) 70%,
            rgba(255, 255, 255, 0.08) 100%);
    pointer-events: none;
    z-index: 1;
}


/* Auto-rotation animation */
.carousel-track.auto-rotate {
    animation: autoSlide 12s infinite linear;
}

@keyframes autoSlide {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-25%);
    }

    50% {
        transform: translateX(-50%);
    }

    75% {
        transform: translateX(-75%);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Pause animation on hover */
.image-carousel-container:hover .carousel-track.auto-rotate {
    animation-play-state: paused;
}

/* Touch and drag indicators */
.carousel-wrapper::before {
    content: '← Swipe to navigate →';
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.image-carousel-container:hover .carousel-wrapper::before {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .carousel-wrapper {
        height: 350px;
        aspect-ratio: 1;
    }

    .carousel-wrapper::before {
        font-size: 12px;
        padding: 6px 12px;
    }

    .image-carousel-container {
        padding: 0 15px;
        max-width: 95%;
    }
}

@media (max-width: 480px) {
    .carousel-wrapper {
        height: 280px;
        aspect-ratio: 1;
    }

    .image-carousel-container {
        border-radius: 15px;
        max-width: 98%;
        padding: 0 10px;
    }

    .carousel-wrapper {
        border-radius: 15px;
    }
}

/* Light Smoky Fade Transition */
.hero-to-gallery-fade {
    height: 120px;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.1) 20%,
            rgba(255, 255, 255, 0.3) 40%,
            rgba(255, 255, 255, 0.5) 60%,
            rgba(255, 255, 255, 0.7) 80%,
            rgba(255, 255, 255, 0.9) 90%,
            white 100%);
    backdrop-filter: blur(2px);
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: 0;
    display: block;
    width: 100%;
}

/* Add light smoky texture */
.hero-to-gallery-fade::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 25% 20%, rgba(255, 255, 255, 0.4) 0%, transparent 60%),
        radial-gradient(ellipse at 75% 40%, rgba(255, 255, 255, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 70%, rgba(255, 255, 255, 0.2) 0%, transparent 40%),
        radial-gradient(ellipse at 10% 60%, rgba(255, 255, 255, 0.25) 0%, transparent 45%),
        radial-gradient(ellipse at 90% 30%, rgba(255, 255, 255, 0.15) 0%, transparent 35%);
    filter: blur(3px);
    z-index: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-to-gallery-fade {
        height: 100px;
        background: linear-gradient(180deg,
                rgba(255, 255, 255, 0) 0%,
                rgba(255, 255, 255, 0.15) 20%,
                rgba(255, 255, 255, 0.35) 40%,
                rgba(255, 255, 255, 0.55) 60%,
                rgba(255, 255, 255, 0.75) 80%,
                rgba(255, 255, 255, 0.9) 90%,
                white 100%);
    }
}

@media (max-width: 480px) {
    .hero-to-gallery-fade {
        height: 80px;
        background: linear-gradient(180deg,
                rgba(255, 255, 255, 0) 0%,
                rgba(255, 255, 255, 0.2) 20%,
                rgba(255, 255, 255, 0.4) 40%,
                rgba(255, 255, 255, 0.6) 60%,
                rgba(255, 255, 255, 0.8) 80%,
                white 100%);
    }
}

/* ==========================================
   Products in Action Gallery Styles
   ========================================== */

.action-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Featured item spans 2 columns and 2 rows */
.action-media-item.featured {
    grid-column: span 2;
    grid-row: span 2;
}

.action-media-item {
    position: relative;
    cursor: pointer;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
}

.action-media-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.action-media-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 250px;
    overflow: hidden;
}

.action-media-item.featured .action-media-wrapper {
    min-height: 520px;
}

.action-media-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-media-item:hover .action-media-img {
    transform: scale(1.08);
}

/* Overlay */
.action-media-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0.1) 40%,
            rgba(0, 0, 0, 0.7) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.action-media-item:hover .action-media-overlay {
    opacity: 1;
}

.action-media-content {
    transform: translateY(20px);
    transition: transform 0.4s ease;
    color: white;
}

.action-media-item:hover .action-media-content {
    transform: translateY(0);
}

.action-media-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.action-media-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    color: white;
}

.action-media-item.featured .action-media-title {
    font-size: 24px;
}

.action-media-caption {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

/* Zoom icon */
.action-media-zoom {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--eco-green);
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.action-media-item:hover .action-media-zoom {
    opacity: 1;
    transform: scale(1);
}

.action-media-zoom:hover {
    background: var(--eco-green);
    color: white;
}

/* Coming Soon Placeholders */
.video-coming-soon,
.coming-soon-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 50%, #bbf7d0 100%);
    border: 2px dashed rgba(34, 197, 94, 0.3);
}

.video-coming-soon-content,
.coming-soon-content {
    text-align: center;
    padding: 24px;
}

.video-icon-wrapper {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--eco-green) 0%, #16a34a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: white;
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.35);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 8px 25px rgba(34, 197, 94, 0.35);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 12px 35px rgba(34, 197, 94, 0.5);
        transform: scale(1.05);
    }
}

.coming-soon-badge {
    display: inline-block;
    padding: 8px 16px;
    background: white;
    color: var(--eco-green);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.coming-soon-text {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

/* Video placeholder specific */
.video-placeholder .action-media-wrapper {
    cursor: default;
}

.video-placeholder:hover {
    transform: none;
}

/* Lightbox Styles */
.action-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.action-lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-nav:hover {
    background: var(--eco-green);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    text-align: center;
    margin-top: 20px;
    color: white;
}

.lightbox-caption h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 8px;
}

.lightbox-caption p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 500;
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .action-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .action-media-item.featured {
        grid-column: span 2;
        grid-row: span 1;
    }

    .action-media-item.featured .action-media-wrapper {
        min-height: 350px;
    }

    .action-media-wrapper {
        min-height: 200px;
    }
}

/* Responsive - Mobile */
@media (max-width: 640px) {

    /* Convert to horizontal carousel on mobile */
    .action-gallery-grid {
        display: flex;
        flex-direction: row;
        gap: 16px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Firefox */
        padding: 0 0 20px 0;
        margin: 0 -20px;
        padding-left: 20px;
        padding-right: 20px;
    }

    /* Hide scrollbar for Chrome, Safari and Opera */
    .action-gallery-grid::-webkit-scrollbar {
        display: none;
    }

    .action-media-item {
        flex: 0 0 88%;
        scroll-snap-align: center;
        max-width: 88%;
    }

    .action-media-item.featured {
        flex: 0 0 88%;
        max-width: 88%;
        grid-column: unset;
        grid-row: unset;
    }

    .action-media-item.featured .action-media-wrapper,
    .action-media-wrapper {
        min-height: 340px;
        border-radius: 20px;
    }

    .action-media-overlay {
        opacity: 1;
        background: linear-gradient(180deg,
                rgba(0, 0, 0, 0) 0%,
                rgba(0, 0, 0, 0.05) 30%,
                rgba(0, 0, 0, 0.75) 100%);
        padding: 20px;
    }

    .action-media-content {
        transform: translateY(0);
    }

    .action-media-zoom {
        display: none;
    }

    .action-media-title {
        font-size: 17px;
        font-weight: 700;
    }

    .action-media-item.featured .action-media-title {
        font-size: 19px;
    }

    .action-media-caption {
        font-size: 13px;
    }

    /* Add swipe indicator below gallery */
    #products-in-action .max-w-7xl::after {
        content: '← Swipe to explore →';
        display: block;
        text-align: center;
        color: #9ca3af;
        font-size: 13px;
        font-weight: 500;
        margin-top: 16px;
        animation: fade-pulse 3s ease-in-out infinite;
    }

    @keyframes fade-pulse {

        0%,
        100% {
            opacity: 0.5;
        }

        50% {
            opacity: 1;
        }
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }

    /* Adjust coming soon placeholders for carousel */
    .video-coming-soon,
    .coming-soon-placeholder {
        border-radius: 20px;
    }

    .video-icon-wrapper {
        width: 64px;
        height: 64px;
    }

    .video-icon-wrapper svg {
        width: 30px;
        height: 30px;
    }

    .coming-soon-badge {
        font-size: 12px;
        padding: 6px 14px;
    }

    .coming-soon-text {
        font-size: 12px;
    }
}