/* =====================================================================
   Responsive rules — loaded last on every storefront page.
   Desktop: 4 columns · Tablet: 2–3 columns · Mobile: 2 columns
   ===================================================================== */

/* Desktop dropdown on hover */
@media (min-width: 992px) {
    .main-nav .dropdown:hover > .dropdown-menu { display: block; }
    .main-nav .dropdown > .dropdown-menu { animation: dropIn .25s var(--ease); }
    @keyframes dropIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
    .hero-copy { text-align: left; }
    .hero .gold-divider { justify-content: flex-start; }
}

@media (max-width: 1199.98px) {
    .main-nav .nav-link { padding: .5rem .6rem !important; letter-spacing: .1em; }
    .product-grid { gap: 1.25rem; }
}

/* Tablet */
@media (max-width: 991.98px) {
    .site-header .navbar > .container { flex-wrap: nowrap; }
    .navbar-brand { margin: 0 auto; }
    .brand-logo { height: 50px; }
    .site-header.scrolled .brand-logo { height: 44px; }
    .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .product-grid.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hero-row { min-height: 480px; padding: 4rem 0 5rem; }
    .section { padding: 3.75rem 0; }
    .promo-banner::before { background: linear-gradient(90deg, rgba(255, 249, 240, .35) 0%, rgba(255, 249, 240, .92) 50%); }
    .product-gallery, .cart-summary, .account-nav { position: static; }
    .shop-filters.offcanvas-lg .offcanvas-body { padding: 1rem; }
    .auth-card { grid-template-columns: 1fr; }
    .footer-bottom { justify-content: center; text-align: center; }
    body.has-mobile-cta { padding-bottom: 76px; }
    body.has-mobile-cta .whatsapp-float { bottom: 88px; }
    body.has-mobile-cta .back-to-top { bottom: 160px; }
}

@media (max-width: 767.98px) {
    .product-grid, .product-grid.grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
    .circle-img { width: 96px; height: 96px; }
    .circle-cats { gap: 1.25rem 1.5rem; }
    .promise { flex-direction: column; text-align: center; gap: .4rem; }
    .promo-banner { background-position: 20% center; min-height: 300px; }
    .promo-content { text-align: center; margin: 0 auto; background: rgba(255, 249, 240, .9); padding: 1.75rem; border-radius: var(--radius); }
    .whatsapp-float-label { display: none; }
    .whatsapp-float { padding: 0; justify-content: center; width: 58px; height: 58px; min-width: 0; font-size: 1.8rem; }

    /* Cart table → cards */
    .cart-table thead { display: none; }
    .cart-table, .cart-table tbody, .cart-table tr, .cart-table td { display: block; width: 100%; }
    .cart-table tr { position: relative; display: grid; grid-template-columns: 84px 1fr; column-gap: 1rem; padding: 1rem; border-bottom: 1px solid var(--line); }
    .cart-table td { padding: .2rem 0; border: 0; }
    .cart-table td.cart-img { grid-row: span 4; width: auto; }
    .cart-table td[data-label] { display: flex; justify-content: space-between; align-items: center; }
    .cart-table td[data-label]::before { content: attr(data-label); font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
    .cart-table td:last-child { position: absolute; top: .8rem; right: .8rem; width: auto; }
    .cart-name { padding-right: 2.5rem !important; }

    .wishlist-item { grid-template-columns: 90px 1fr; }
    .wl-img img { width: 90px; height: 90px; }
    .wl-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
    .wl-actions .btn { flex: 1; }
    .progress-steps .label { font-size: .62rem; }
    .account-panel { padding: 1.4rem; }
    .form-card { padding: 1.5rem; }
    .auth-form { padding: 2.2rem 1.5rem; }
}

/* Mobile */
@media (max-width: 575.98px) {
    .announcement-bar { font-size: .72rem; }
    .brand-logo { height: 44px; }
    .icon-btn { width: 38px; height: 38px; font-size: 1.1rem; }
    .hero-row { min-height: 440px; }
    .hero-title { font-size: 2.3rem; }
    .hero .btn-lg { padding: .75rem 1.4rem; font-size: .92rem; }
    .section-title { font-size: 1.9rem; }
    .section-head { margin-bottom: 2rem; }
    .category-body { padding: .9rem .75rem 1.1rem; }
    .category-body h3 { font-size: 1.3rem; }
    .category-body p { display: none; }
    .product-body { padding: .75rem .75rem .9rem; }
    .product-title { font-size: 1.05rem; }
    .price-now { font-size: .95rem; }
    .product-actions .btn { font-size: .68rem; padding: .5rem .4rem; letter-spacing: .02em; }
    .product-actions .btn .bi-whatsapp { display: none; }
    .wishlist-btn { width: 34px; height: 34px; font-size: .95rem; }
    .quick-cart { opacity: 1; transform: none; left: auto; right: .5rem; bottom: .5rem; width: 36px; height: 36px; padding: 0; border-radius: 50%; }
    .quick-cart span { display: none; }
    .shop-toolbar { flex-wrap: wrap; gap: .6rem; }
    .result-count { order: 3; width: 100%; }
    .sort-form .form-select { min-width: 0; }
    .page-hero { padding: 1.8rem 0; }
    .footer-logo { height: 64px; }
    .about-stats { gap: 1.4rem; }
    .qty-row { justify-content: space-between; }
}

/* Touch devices: always show card quick actions */
@media (hover: none) {
    .quick-cart { opacity: 1; transform: none; }
    .gallery-nav { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
