/* ============================================
   MEGAGLOW COSMETIC - RESPONSIVE STYLES
   ============================================ */

/* Tablets & Medium Devices */
@media (max-width: 1024px) {
    .navbar-container {
        gap: 1.2rem;
    }

    .search-input {
        font-size: 0.85rem;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1.2rem;
    }

    .quick-view-body {
        grid-template-columns: 1fr;
    }

    .cart-drawer {
        width: 360px;
    }

    .hero-content h2 {
        font-size: 3rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    :root {
        --spacing-lg: 1.6rem;
        --spacing-xl: 2.2rem;
    }

    /* Navigation */
    .navbar-container {
        gap: 0.85rem;
        padding: 0.75rem 1rem;
    }

    .logo h1 {
        font-size: 1.3rem;
        letter-spacing: 0.3px;
    }

    .search-container {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .mega-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-height: 0;
        clip-path: inset(0 0 100% 0);
    }

    .mega-menu.active {
        max-height: 500px;
        clip-path: inset(0 0 0 0);
    }

    /* Hero */
    .hero {
        padding: 70px 1.2rem;
        min-height: 450px;
    }

    .hero-content h2 {
        font-size: 2.4rem;
        letter-spacing: -0.8px;
    }

    .hero-content p {
        font-size: 1.15rem;
        letter-spacing: 0.3px;
    }

    /* Product Grid */
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        gap: 0.9rem;
    }

    .product-info {
        padding: 1rem;
    }

    .product-name {
        font-size: 0.95rem;
        font-weight: 600;
    }

    .product-price {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }

    .product-brand {
        font-size: 0.78rem;
        letter-spacing: 0.8px;
    }

    /* Routine Builder */
    .routine-goals {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .routine-card {
        padding: 1.3rem 1rem;
        border-radius: 14px;
    }

    .routine-card i {
        font-size: 2.3rem;
        margin-bottom: 0.5rem;
    }

    .routine-card h3 {
        font-size: 1.1rem;
    }

    /* Ingredient Library */
    .ingredients-showcase {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 0.9rem;
    }

    .ingredient-btn {
        padding: 1.4rem 1rem;
        border-radius: 12px;
    }

    /* Cart Drawer */
    .cart-drawer {
        width: 100%;
        max-width: 380px;
        box-shadow: -6px 0 35px rgba(0, 0, 0, 0.1);
    }

    /* Modals */
    .modal-content {
        width: 95%;
        max-height: 95vh;
        border-radius: 18px;
    }

    .quick-view-body {
        padding: 1.2rem;
        gap: 1rem;
    }

    .checkout-container {
        padding: 1.2rem;
    }

    .checkout-step h2 {
        font-size: 1.6rem;
    }

    /* Forms */
    .form-row {
        grid-template-columns: 1fr;
    }

    form input, form select {
        padding: 12px 14px;
        border-radius: 9px;
    }

    /* Bottom Navigation */
    .bottom-nav {
        display: flex;
    }

    body {
        padding-bottom: 72px;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    h1 { font-size: 1.9rem; font-weight: 300; }
    h2 { font-size: 1.6rem; font-weight: 300; }
    h3 { font-size: 1.25rem; font-weight: 400; }

    .container {
        padding: 0 1rem;
    }

    .navbar-container {
        padding: 0.75rem 1rem;
        gap: 0.6rem;
    }

    .logo h1 {
        font-size: 1.05rem;
        letter-spacing: 0.2px;
    }

    .hero {
        padding: 50px 1rem;
        min-height: 400px;
    }

    .hero-content h2 {
        font-size: 1.95rem;
        letter-spacing: -0.6px;
    }

    .hero-content p {
        font-size: 1rem;
        letter-spacing: 0.2px;
    }

    .btn {
        padding: 11px 20px;
        font-size: 0.92rem;
        border-radius: 8px;
        font-weight: 600;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.7rem;
    }

    .product-card {
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    }

    .product-info {
        padding: 0.8rem;
    }

    .product-name {
        font-size: 0.88rem;
        font-weight: 600;
        line-height: 1.3;
    }

    .product-brand {
        font-size: 0.7rem;
        letter-spacing: 0.8px;
        margin-bottom: 6px;
    }

    .product-price {
        font-size: 1rem;
        margin-bottom: 8px;
        font-weight: 700;
    }

    .product-actions {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .quick-view-btn, .add-btn {
        padding: 8px;
        font-size: 0.75rem;
        border-radius: 6px;
        font-weight: 600;
    }

    .routine-goals {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .routine-card {
        padding: 1rem 0.8rem;
        border-radius: 12px;
    }

    .routine-card i {
        font-size: 1.8rem;
        margin-bottom: 0.4rem;
    }

    .routine-card h3 {
        font-size: 1rem;
        margin-bottom: 2px;
    }

    .routine-card p {
        font-size: 0.8rem;
    }

    .ingredients-showcase {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.7rem;
    }

    .ingredient-btn {
        padding: 1rem 0.8rem;
        border-radius: 11px;
    }

    .ingredient-btn h4 {
        font-size: 0.92rem;
        margin: 0;
        font-weight: 600;
    }

    .ingredient-btn p {
        font-size: 0.75rem;
        margin: 0.3rem 0 0;
    }

    .category-section h2 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
        letter-spacing: -0.4px;
    }

    /* Cart Drawer */
    .cart-drawer {
        width: 100%;
    }

    .cart-header {
        padding: 1rem 1rem;
    }

    .cart-item {
        gap: 0.8rem;
        margin-bottom: 0.9rem;
        padding-bottom: 0.9rem;
    }

    .cart-item-image {
        width: 65px;
        height: 65px;
        border-radius: 6px;
    }

    .cart-item-name {
        font-size: 0.87rem;
        font-weight: 600;
    }

    .cart-item-price {
        font-size: 0.95rem;
        font-weight: 700;
    }

    .cart-item-qty {
        font-size: 0.8rem;
    }

    .qty-btn {
        width: 22px;
        height: 22px;
        font-size: 0.8rem;
        border-radius: 4px;
    }

    /* Checkout */
    .checkout-steps {
        margin-bottom: 1.6rem;
        gap: 0.8rem;
    }

    .checkout-steps::before {
        top: 18px;
    }

    .step span {
        width: 38px;
        height: 38px;
        font-size: 0.85rem;
        font-weight: 600;
    }

    .step p {
        font-size: 0.7rem;
        margin-top: 4px;
    }

    form input, form select {
        padding: 11px 13px;
        font-size: 0.9rem;
        border-radius: 8px;
        border-width: 2px;
    }

    .form-row {
        gap: 0.9rem;
    }

    /* Success Modal */
    .success-content {
        padding: 1.6rem 1.2rem;
    }

    .success-content i {
        font-size: 3.2rem;
        margin-bottom: 0.8rem;
    }

    .success-content h2 {
        font-size: 1.4rem;
        margin-bottom: 0.6rem;
    }

    .success-details {
        padding: 1rem;
        border-radius: 8px;
        margin-bottom: 0.8rem;
    }

    .detail-row {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .success-actions {
        gap: 0.8rem;
    }

    .success-actions .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    /* Bottom Navigation */
    .bottom-nav-item {
        padding: 8px 6px;
        gap: 2px;
        font-size: 0.65rem;
    }

    .bottom-nav-item i {
        font-size: 1.4rem;
    }

    /* Modal */
    .modal-content {
        border-radius: 16px;
        width: 95%;
    }

    .close-modal {
        top: 14px;
        right: 14px;
        font-size: 1.4rem;
    }

    .modal {
        background-color: rgba(0, 0, 0, 0.55);
    }
}

/* Extra Small Devices */
@media (max-width: 360px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .routine-goals {
        grid-template-columns: 1fr;
    }

    .ingredients-showcase {
        grid-template-columns: 1fr;
    }

    .product-actions {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .quick-view-btn, .add-btn {
        width: 100%;
        padding: 9px 12px;
    }

    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.3rem; }
    h3 { font-size: 1rem; }
}

