/* ============================================
   MOBILE SPECIFIC OVERRIDES (≤768px)
============================================ */
@media (max-width: 768px) {
    .woocommerce ul.products {
        display: grid !important;
        grid-template-columns: repeat(2,1fr) !important;
        gap: 16px !important;
        padding: 0 12px !important;
    }
    .sago-product-card {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden;
    }
    .sago-product-image {
        aspect-ratio: 1/1;
        width: 100%;
    }
    .sago-product-content {
        padding: 12px !important;
        flex: 1;
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
    }
    .sago-product-content .title {
        font-size: 14px !important;
        font-weight: 600 !important;
        line-height: 1.3 !important;
        margin: 0 0 4px !important;
        word-break: break-word;
    }
    .sago-product-content .meta {
        font-size: 10px !important;
        color: #6b7280 !important;
        margin-bottom: 4px !important;
    }
    .sago-product-content .price {
        font-size: 15px !important;
        font-weight: 700 !important;
        margin: 4px 0 !important;
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
    }
    .sago-product-buttons {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        margin-top: 8px !important;
    }
    .sago-product-buttons .button,
    .sago-product-buttons .sago-wa {
        width: 100% !important;
        text-align: center !important;
        padding: 8px 4px !important;
        font-size: 11px !important;
        border-radius: 30px !important;
    }
    .sago-badges {
        top: 8px !important;
        left: 8px !important;
    }
    .badge {
        font-size: 9px !important;
        padding: 3px 8px !important;
    }
    .sago-actions {
        top: 8px !important;
        right: 8px !important;
        gap: 6px !important;
    }
    .sago-actions a {
        width: 30px !important;
        height: 30px !important;
        font-size: 12px !important;
    }
}

@media (max-width: 480px) {
    .woocommerce ul.products {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    .sago-product-content .title {
        font-size: 16px !important;
    }
    .sago-product-buttons {
        flex-direction: row !important;
    }
    .sago-product-buttons .button,
    .sago-product-buttons .sago-wa {
        font-size: 13px !important;
    }
}

/* ============================================
   BOTTOM NAVIGATION (mobile & desktop pill)
============================================ */
.sago-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 12px;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.08);
    z-index: 99999;
    border-top: 1px solid rgba(0,0,0,0.05);
    animation: slideUp 0.3s ease-out;
}
.sago-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.2s;
    padding: 4px 8px;
    border-radius: 30px;
}
.sago-bottom-nav a i {
    font-size: 20px;
}
.sago-bottom-nav a.active {
    color: var(--sago-primary);
    font-weight: 600;
}
.sago-bottom-nav a.active i {
    transform: translateY(-2px);
    color: var(--sago-primary);
}
@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Desktop floating pill */
@media (min-width: 769px) {
    .sago-bottom-nav {
        display: flex !important;
        width: auto;
        max-width: 500px;
        left: 50%;
        transform: translateX(-50%);
        bottom: 20px;
        border-radius: 50px;
        background: rgba(255,255,255,0.96);
        backdrop-filter: blur(12px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.15);
        padding: 6px 16px;
        border: 1px solid rgba(0,0,0,0.08);
    }
    .sago-bottom-nav a {
        flex-direction: row;
        gap: 8px;
        padding: 8px 14px;
        font-size: 13px;
    }
    .sago-bottom-nav a i {
        font-size: 18px;
    }
    .sago-bottom-nav a:hover {
        background: var(--sago-light-bg);
    }
}

/* ============================================
   CATEGORIES DRAWER
============================================ */
.categories-drawer {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    background: var(--sago-white);
    border-radius: 24px 24px 0 0;
    z-index: 100001;
    transition: bottom 0.3s;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
}
.categories-drawer.open {
    bottom: 0;
}
.categories-drawer .drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--sago-border);
}
.categories-drawer .category-list {
    padding: 12px 20px 30px;
    max-height: 60vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.categories-drawer .category-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    color: var(--sago-text);
    text-decoration: none;
    border-radius: 12px;
    transition: background 0.2s;
}
.categories-drawer .category-list a:hover {
    background: var(--sago-light-bg);
}
.categories-drawer .category-list i {
    width: 24px;
    color: var(--sago-primary);
}

/* Home category strip (2-3 rows on mobile) */
@media (max-width: 768px) {
    .sago-category-strip .ast-container {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(100px, auto));
        gap: 10px;
        justify-content: center;
    }
    .cat-chip {
        text-align: center;
    }
}