/* ══════════════════════════════════════
   ALL COLLECTIONS - PREFIXED CLASSES (ac-)
   Using Global Root Variables
══════════════════════════════════════ */

/* Container adjustments */
#ac-wrap {
    min-height: 100vh;
    background: var(--bg);
}

/* ===== FULL SCREEN SKELETON ===== */
#ac-skeleton {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    transition: opacity .3s ease;
}
#ac-skeleton.hide { opacity: 0; pointer-events: none; }
#ac-skeleton.done { display: none; }

/* ===== SHIMMER ===== */
.ac-sk {
    background: linear-gradient(90deg, var(--bg-alt) 25%, var(--border) 50%, var(--bg-alt) 75%);
    background-size: 200% 100%;
    animation: ac-shimmer 1.4s infinite;
    border-radius: 6px;
}
@keyframes ac-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ===== NAVBAR SKELETON ===== */
/* ===== NAVBAR SKELETON (SIMPLE) ===== */
.ac-sk-nav {
    height: 70px;
    width: 100%;
    border-bottom: 1px solid var(--border);
}
/* ===== BODY WRAPPER ===== */
.ac-sk-body {
    display: flex;
    gap: 20px;
    padding: 20px;
    flex: 1;
}

/* ===== SIDEBAR ===== */
.ac-sk-sidebar {
    width: 260px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.ac-sk-filter-title { height: 18px; width: 120px; }
.ac-sk-filter-box { height: 14px; width: 80%; }
.ac-sk-filter-line { height: 10px; width: 100%; }
.ac-sk-slider { height: 6px; width: 100%; border-radius: 10px; }

/* ===== CONTENT ===== */
.ac-sk-content {
    flex: 1;
}

/* breadcrumb */
.ac-sk-breadcrumb {
    width: 180px;
    height: 10px;
    margin-bottom: 10px;
}

/* title */
.ac-sk-title {
    width: 320px;
    height: 34px;
    margin-bottom: 10px;
}

/* subtitle */
.ac-sk-sub {
    width: 380px;
    height: 12px;
    margin-bottom: 25px;
}

/* toolbar */
.ac-sk-toolbar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}
.ac-sk-btn { width: 110px; height: 36px; }
.ac-sk-count { width: 100px; height: 12px; }

/* ===== GRID ===== */
.ac-sk-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
@media(max-width:900px){ .ac-sk-grid { grid-template-columns: repeat(3,1fr); } }
@media(max-width:640px){ .ac-sk-grid { grid-template-columns: repeat(2,1fr); } }

/* ===== CARD ===== */
.ac-sk-card {
    border-radius: 14px;
}
.ac-sk-img {
    height: 180px;
    width: 100%;
    border-radius: 12px;
}
.ac-sk-text {
    height: 12px;
    margin: 10px 0;
    width: 80%;
}
.ac-sk-price {
    height: 14px;
    width: 60%;
}
/* ══════════════════════════════════════
   SIDEBAR
══════════════════════════════════════ */
.ac-sidebar {
    position: fixed;
    width: 272px;
    height: 100vh;
    overflow-y: auto;
    background: var(--card);
    z-index: 200;
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid var(--border);
    /* Default desktop position */
    top: var(--nav-total-h, 80px); 
    left: 0;
}
.ac-sb-outer{
    height:70px !important;
}
/* Desktop: Open by default */
@media (min-width: 769px) {
    .ac-sidebar { transform: translateX(0); }
    .ac-sidebar.ac-closed { transform: translateX(-100%); }
}

/* Mobile: Drawer from right */
@media (max-width: 768px) {
    .ac-sidebar {
        top: var(--nav-total-h, 100px); 
        left: auto; right: 0;
        border-left: 1px solid var(--border);
        border-right: none;
        transform: translateX(110%);
        padding-top: 0;
    }
    .ac-sidebar.ac-open { transform: translateX(0); }
    .ac-sb-inner { padding-top: calc(var(--nav-total-h, 80px) + 15px); }
}

.ac-sb-inner { padding: 20px 18px 60px; }
.ac-sb-head {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 14px; margin-bottom: 2px;
    border-bottom: 1px solid var(--border);
}
.ac-sb-head h3 { font-size: 18px; color: var(--text); font-family: var(--font-heading); }
.ac-sb-close {
    background: none; border: none; cursor: pointer;
    padding: 5px; border-radius: 6px; display: flex;
    color: var(--muted); transition: color 0.2s, background 0.2s;
}
.ac-sb-close:hover { color: var(--text); background: var(--bg-alt); }

.ac-fsec { border-bottom: 1px solid var(--border); }
.ac-fsec-title {
    display: flex; align-items: center; justify-content: space-between;
    padding: 13px 0; cursor: pointer; user-select: none;
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 1px; color: var(--muted);
}
.ac-fsec-chev { transition: transform 0.2s; }
.ac-fsec-title.closed .ac-fsec-chev { transform: rotate(-90deg); }
.ac-fsec-body { padding-bottom: 12px; }
.ac-fsec-body.hidden { display: none; }

.ac-search-wrap { position: relative; margin-bottom: 9px; }
.ac-search-wrap svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.ac-search {
    width: 100%; padding: 7px 10px 7px 30px;
    border: 1px solid var(--border); border-radius: 8px;
    font-size: 12px; font-family: var(--font-body);
    background: var(--bg); outline: none; color: var(--text);
}
.ac-search:focus { border-color: var(--accent); }

.ac-list-scroll { max-height: 185px; overflow-y: auto; padding-right: 2px; }
.ac-flabel {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 4px; font-size: 13px; cursor: pointer; color: var(--text);
    border-radius: 6px; transition: background 0.2s;
}
.ac-flabel:hover { background: var(--bg-alt); }
.ac-fchk {
    appearance: none; width: 16px; height: 16px;
    border: 1.5px solid var(--border); border-radius: 4px;
    cursor: pointer; flex-shrink: 0; position: relative; background: var(--card);
    transition: all 0.16s;
}
.ac-fchk:checked { background: var(--accent); border-color: var(--accent); }
.ac-fchk:checked::after {
    content: ''; position: absolute; left: 3.5px; top: 1px;
    width: 5px; height: 9px; border: 2px solid #fff; border-top: none; border-left: none;
    transform: rotate(40deg);
}

.ac-sort-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.ac-sort-chip {
    padding: 5px 11px; border: 1px solid var(--border);
    border-radius: 99px; font-size: 12px; cursor: pointer;
    background: var(--bg); font-family: var(--font-body); color: var(--text);
    transition: all 0.18s;
}
.ac-sort-chip:hover { border-color: var(--accent); }
.ac-sort-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Price Range */
.ac-price-wrap { padding: 4px 2px 2px; position: relative; height: 50px; }
.ac-price-track { position: absolute; width: 100%; height: 4px; background: var(--border); border-radius: 99px; top: 22px; left: 0; }
.ac-price-fill { position: absolute; height: 100%; background: var(--accent); border-radius: 99px; }
.ac-price-wrap input[type=range] {
    position: absolute; width: 100%; height: 4px;
    appearance: none; background: transparent; outline: none; top: 22px; left: 0; pointer-events: none;
}
.ac-price-wrap input[type=range]::-webkit-slider-thumb {
    appearance: none; width: 18px; height: 18px;
    background: var(--card); border: 2px solid var(--accent);
    border-radius: 50%; cursor: pointer; pointer-events: all;
    box-shadow: var(--sh-sm); margin-top: -7px;
}
.ac-price-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 20px; }

.ac-btn-apply {
    width: 100%; margin-top: 18px; padding: 11px;
    background: var(--accent); color: #fff;
    border: none; border-radius: 8px;
    font-family: var(--font-body); font-size: 13px;
    font-weight: 600; cursor: pointer; transition: background 0.2s;
}
.ac-btn-apply:hover { background: var(--accent-h); }
.ac-btn-clear { display: block; width: 100%; margin-top: 8px; font-size: 12px; color: var(--danger); border: none; background: none; cursor: pointer; }

/* ══════════════════════════════════════
   OVERLAY (Mobile)
══════════════════════════════════════ */
.ac-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.48); z-index: 199; backdrop-filter: blur(2px);
}
.ac-overlay.show { display: block; }

/* ══════════════════════════════════════
   MAIN CONTENT WRAPPER
══════════════════════════════════════ */
.ac-col-wrap {
    transition: margin-left 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100vh;
}
@media (min-width: 769px) {
    .ac-col-wrap { margin-left: 272px; }
    .ac-col-wrap.ac-gone { margin-left: 0; }
}
@media (max-width: 768px) { .ac-col-wrap { margin-left: 0 !important; } }

/* ══════════════════════════════════════
   HEADER & TOPBAR
══════════════════════════════════════ */
.ac-header {
    background: var(--card); border-bottom: 1px solid var(--border);
    padding: 24px 28px 20px;
}
.ac-breadcrumb { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.ac-breadcrumb a { color: inherit; text-decoration: none; }
.ac-breadcrumb a:hover { color: var(--accent); }
.ac-title { font-size: clamp(26px, 3.5vw, 40px); letter-spacing: -0.5px; color: var(--text); font-family: var(--font-heading); }
.ac-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* TOPBAR: Sticky below Navbar */
.ac-topbar {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 28px; background: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 100px;
    z-index: 30; flex-wrap: wrap;
}
@media (max-width: 768px) { 
    .ac-topbar { 
        padding: 10px 12px;
        top: 95px; 
    } 
}

.ac-topbar-l { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; flex-wrap: wrap; }
.ac-topbar-r { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.ac-btn-filter {
    display: flex; align-items: center; gap: 6px;
    padding: 7px 13px; border: 1px solid var(--border);
    border-radius: 8px; background: var(--card);
    font-size: 12px; font-family: var(--font-body); font-weight: 500; color: var(--text);
    cursor: pointer; transition: all 0.2s;
}
.ac-btn-filter:hover { border-color: var(--accent); }
.ac-btn-filter.on { background: var(--accent); color: #fff; border-color: var(--accent); }

.ac-count-badge { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ac-active-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ac-atag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px; background: var(--accent); color: #fff;
    border-radius: 99px; font-size: 11px; font-weight: 500; cursor: pointer;
}
.ac-atag:hover { background: var(--accent-h); }
.ac-btn-clear-tags { font-size: 11px; color: var(--danger); border: none; background: none; cursor: pointer; text-decoration: underline; }

/* Grid Buttons */
.ac-grid-opts { display: flex; gap: 4px; }
.ac-gb {
    min-width: 30px; height: 30px; padding: 0 7px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); border-radius: 6px;
    background: var(--card); cursor: pointer; color: var(--muted);
    transition: all 0.2s; font-size: 11px; font-weight: 600; font-family: var(--font-body);
}
.ac-gb:hover { border-color: var(--accent); color: var(--accent); }
.ac-gb.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Display Logic */
.ac-desk-only { display: flex; }
.ac-tab-only  { display: none; }
.ac-mob-only  { display: none; }
@media (min-width: 1025px) { .ac-tab-only { display: none; } }
@media (min-width: 769px) and (max-width: 1024px) { .ac-desk-only { display: none; } .ac-tab-only { display: flex; } .ac-mob-only { display: none; } }
@media (max-width: 768px) { .ac-desk-only { display: none; } .ac-tab-only { display: none; } .ac-mob-only { display: flex; } .ac-header { padding: 18px 14px 14px; } }

/* ══════════════════════════════════════
   PRODUCTS GRID
══════════════════════════════════════ */
.ac-products-area { padding: 20px 28px 60px; }
#ac-pGrid { display: grid; gap: 18px; grid-template-columns: repeat(5, 1fr); }

/* Grid Classes */
#ac-pGrid.g3  { grid-template-columns: repeat(3, 1fr); }
#ac-pGrid.g4  { grid-template-columns: repeat(4, 1fr); }
#ac-pGrid.g5  { grid-template-columns: repeat(5, 1fr); }
#ac-pGrid.g6  { grid-template-columns: repeat(6, 1fr); }
#ac-pGrid.g8  { grid-template-columns: repeat(8, 1fr); gap: 1px; }

/* Mosaic tweaks */
#ac-pGrid.g8 .ac-pc { border-radius: 0; border: none; box-shadow: none; }
#ac-pGrid.g8 .ac-pc-img { aspect-ratio: 1/1; }
#ac-pGrid.g8 .ac-pc-info { display: none; }
#ac-pGrid.g8 .ac-b-disc { top: auto; bottom: 8px; right: 8px; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); }
#ac-pGrid.g8 .ac-pc-overlay { transform: translateY(0); opacity: 0; background: rgba(255,255,255,0.9); color: #000; height: 100%; font-weight: 600; }
#ac-pGrid.g8 .ac-pc:hover .ac-pc-overlay { opacity: 1; }
#ac-pGrid.g8 .ac-pc:hover { transform: none; }

/* Responsive Grid */
@media (min-width: 769px) and (max-width: 1100px) { #ac-pGrid.g6 { grid-template-columns: repeat(4, 1fr); } #ac-pGrid.g8 { grid-template-columns: repeat(6, 1fr); } }
@media (min-width: 769px) and (max-width: 900px) { #ac-pGrid.g5 { grid-template-columns: repeat(3, 1fr); } #ac-pGrid.g6 { grid-template-columns: repeat(3, 1fr); } #ac-pGrid.g8 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 769px) and (max-width: 1024px) { .ac-products-area { padding: 16px 20px 60px; } #ac-pGrid { gap: 14px; } #ac-pGrid, #ac-pGrid.g4, #ac-pGrid.g5, #ac-pGrid.g6 { grid-template-columns: repeat(3, 1fr); } #ac-pGrid.g8 { grid-template-columns: repeat(4, 1fr); gap: 1px; } }
@media (max-width: 768px) { .ac-products-area { padding: 14px 12px 60px; } #ac-pGrid, #ac-pGrid.g3, #ac-pGrid.g4, #ac-pGrid.g5, #ac-pGrid.g6, #ac-pGrid.g8 { grid-template-columns: repeat(2, 1fr); gap: 10px; } #ac-pGrid.g8 .ac-pc-info { display: block; } #ac-pGrid.g8 .ac-pc { border-radius: 12px; border: 1px solid var(--border); } #ac-pGrid.g8 .ac-b-disc { top: 8px; bottom: auto; background: var(--success); backdrop-filter: none; } #ac-pGrid.m-zen { grid-template-columns: repeat(2, 1fr); } #ac-pGrid.m-zen .ac-pc:nth-child(3n+1) { grid-column: 1 / -1; } #ac-pGrid.m-1 { grid-template-columns: 1fr; gap: 12px; } #ac-pGrid.m-2 { grid-template-columns: repeat(2, 1fr); } }

/* ══════════════════════════════════════
   PRODUCT CARD
══════════════════════════════════════ */
.ac-pc {
    background: var(--card); border-radius: 12px; overflow: hidden;
    border: 1px solid var(--border); box-shadow: var(--sh-xs);
    transition: transform 0.2s, box-shadow 0.2s;
}
.ac-pc:hover { transform: translateY(-4px); box-shadow: var(--sh-md); }

.ac-pc-img { position: relative; aspect-ratio: 4/5; overflow: hidden; background: var(--bg-alt); }
.ac-pc-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.46s ease; }
.ac-pc:hover .ac-pc-img img { transform: scale(1.07); }

.ac-pc-badge { position: absolute; top: 8px; left: 8px; padding: 3px 8px; font-size: 10px; font-weight: 600; text-transform: uppercase; border-radius: 3px; }
.ac-b-oos { background: var(--muted); color: #fff; }
.ac-b-disc { position: absolute; top: 8px; right: 8px; background: var(--success); color: #fff; padding: 3px 8px; font-size: 10px; font-weight: 600; border-radius: 3px; }

.ac-pc-overlay {
    position: absolute; bottom: 0; left: 0; right: 0; padding: 10px;
    background: var(--card); transform: translateY(100%); transition: transform 0.22s ease;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 500; text-decoration: none; color: var(--text);
}
.ac-pc:hover .ac-pc-overlay { transform: translateY(0); }

.ac-pc-info { padding: 11px 12px 13px; }
.ac-pc-brand { font-size: 10px; text-transform: uppercase; letter-spacing: 0.7px; color: var(--muted); margin-bottom: 3px; }
.ac-pc-name { font-family: var(--font-heading); font-size: 14px; font-weight: 500; line-height: 1.3; margin-bottom: 7px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ac-pc-name a { text-decoration: none; color: inherit; }
.ac-pc-price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.ac-pc-offer { font-size: 14px; font-weight: 600; color: var(--text); }
.ac-pc-orig  { font-size: 12px; color: var(--muted); text-decoration: line-through; }

/* Loaders */
#ac-loadSpinner { display: none; justify-content: center; align-items: center; gap: 10px; padding: 24px 0; color: var(--muted); font-size: 13px; }
#ac-loadSpinner.on { display: flex; }
.ac-spin-svg { animation: ac-spin 0.75s linear infinite; }
@keyframes ac-spin { to { transform: rotate(360deg); } }

#ac-endMsg { display: none; text-align: center; padding: 40px 0; color: var(--muted); font-size: 12px; }
#ac-noResults { display: none; text-align: center; padding: 60px 0; }
#ac-sentinel { height: 1px; margin-top: 32px; }