/* ===================================================
   Mobile Responsiveness Requirements & Stacked Layouts
   LIFE STYLE Pudukkottai - மொபைல் திரைக்கான பதிலளிப்பு அமைப்புகள்
   =================================================== */

/* Tablet Adjustments (< 992px) */
@media (max-width: 991.98px) {
    .hero-slider .carousel-item, .hero-slider img {
        height: 380px;
    }
    .hero-caption {
        padding: 20px;
    }
    .hero-caption h2 {
        font-size: 1.8rem;
    }
}

/* Mobile Screens (< 768px): STRICT SINGLE CARD PER ROW REQUIREMENT */
@media (max-width: 767.98px) {
    /* HERO SLIDER MOBILE OPTIMIZATION */
    .hero-slider .carousel-item, .hero-slider img {
        height: 260px;
    }
    .hero-caption {
        padding: 12px;
    }
    .hero-caption h2 {
        font-size: 1.3rem;
    }
    .hero-caption p {
        font-size: 0.85rem;
        display: none;
    }
    .hero-caption .btn {
        font-size: 0.8rem;
        padding: 6px 16px;
    }

    /* PRODUCT GRID: STRICT ONE CARD PER ROW AT ALL TIMES */
    #productGridContainer > [class*="col-"],
    .product-grid > [class*="col-"] {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .product-card {
        width: 100% !important;
        margin-bottom: 15px;
    }

    .product-card img {
        height: 280px !important; /* Large, clear images on mobile */
    }

    /* Hero Slider Mobile Caption Responsive Sizing */
    .hero-caption {
        padding: 10px 14px !important;
        bottom: 15px !important;
        background: rgba(0, 0, 0, 0.45) !important;
        backdrop-filter: blur(4px) !important;
        border-radius: 14px !important;
        max-width: 90% !important;
        left: 5% !important;
        right: 5% !important;
    }

    .hero-caption h2 {
        font-size: 1.15rem !important;
        margin-bottom: 3px !important;
        line-height: 1.25 !important;
    }

    .hero-caption p {
        font-size: 0.78rem !important;
        margin-bottom: 6px !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    .hero-caption .btn {
        padding: 5px 16px !important;
        font-size: 0.75rem !important;
        margin-top: 0 !important;
    }

    /* ADMIN PANEL MOBILE STYLING FIXES */
    .admin-header-container {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .admin-actions-bar {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .admin-actions-bar .btn {
        flex: 1 1 calc(50% - 8px) !important;
        font-size: 0.85rem !important;
        padding: 8px 10px !important;
        text-align: center;
    }

    .admin-tabs-wrapper {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    #adminTabs {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        padding-bottom: 5px;
    }

    #adminTabs .nav-item {
        flex: 0 0 auto !important;
    }

    #adminTabs .nav-link {
        white-space: nowrap !important;
        padding: 8px 16px !important;
        font-size: 0.85rem !important;
    }

    .category-card img {
        height: 240px;
    }

    .product-title {
        font-size: 1.15rem !important; /* Large readable text */
    }

    .product-price {
        font-size: 1.35rem !important;
    }

    /* Touch-friendly large buttons (min 44px height) */
    .btn, .nav-link, .btn-pink, .btn-outline-pink, .btn-whatsapp-card {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0.95rem !important;
    }

    .card-action-buttons {
        gap: 8px;
    }

    .card-action-buttons .btn {
        flex: 1 1 100% !important; /* Stack action buttons vertically on mobile for large touch area */
        width: 100% !important;
        text-align: center;
        margin-bottom: 4px;
    }

    /* FLOATING ACTION DOCK MOBILE POSITIONING */
    .floating-dock-container {
        bottom: 18px;
        right: 18px;
        gap: 10px;
    }

    .dock-btn {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    /* HIDE TOOLTIPS ON TOUCH SCREENS */
    .dock-tooltip {
        display: none !important;
    }
}

/* Specific Small Devices: 320px, 360px, 375px, 390px, 412px, 480px */
@media (max-width: 480px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .navbar-brand {
        font-size: 1.35rem;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .product-card img {
        height: 250px !important;
    }

    .display-6 {
        font-size: 1.5rem;
    }
}
