/* Mobile Responsive Fixes for Krisova Storefront */

@media (max-width: 768px) {
    /* General Container Padding */
    .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    /* --- Product Detail Page --- */
    .product-detail-container {
        padding-top: 1rem;
    }

    .product-grid-layout {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .product-info-column {
        position: static; /* Remove sticky on mobile */
        padding: 0;
        background: transparent;
        border: none;
        backdrop-filter: none;
    }

    .product-title {
        font-size: 2rem; /* Smaller title on mobile */
    }

    .product-image-container {
        aspect-ratio: 1/1; /* Square on mobile for better view */
    }

    .product-thumbnails {
        justify-content: flex-start;
        gap: 0.75rem;
        padding-bottom: 0.75rem;
    }
    
    .thumb-item {
        width: 60px;
        height: 60px;
        border-radius: 4px;
    }

    /* Sticky CTA on Mobile */
    .sticky-cta-bar {
        padding: 0.75rem 1rem;
        bottom: 0;
        z-index: 1000; /* Ensure above other elements */
    }

    .sticky-cta-container {
        flex-direction: row;
        gap: 0.5rem;
    }

    .sticky-cta-product {
        display: none; /* Hide product details in sticky bar on mobile to save space */
    }
    
    .sticky-cta-bar .btn {
        width: 100%; /* Full width button */
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    /* --- Cart Page --- */
    .cart-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
        border: 1px solid var(--color-border);
        border-radius: 8px;
    }

    .cart-item-image {
        width: 100px;
        height: 100px;
        margin-right: 0;
    }
    
    .cart-item > .flex-1 {
        width: 100%;
    }

    .qty-stepper {
        height: 44px;
    }

    .qty-stepper button {
        width: 44px; /* Larger touch target */
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f5f5f5;
        border: 1px solid #ddd;
    }
    
    .qty-stepper input {
        height: 100%;
        text-align: center;
        width: 50px;
    }

    /* Cart Summary */
    .cart-summary {
        background: var(--color-ivory-dark);
        padding: 1.5rem;
        border-radius: 8px;
    }
}

/* Accessibility & Performance Tweaks */
img {
    max-width: 100%;
    height: auto;
}

/* Fix sticky header overlap on mobile */
.site-header {
    height: auto;
    min-height: 60px;
}

/* Ensure touch targets are large enough */
button, 
a.btn, 
.nav-link {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-link {
    display: inline-flex; /* Fix for nav links */
}
