/* ══════════════════════════════════════════════════════
   SHOP PAGE — Modern Upgrade
   ══════════════════════════════════════════════════════ */

/* ── Sidebar card ──────────────────────────────────────── */
.sp-sidebar {
    position: sticky;
    top: 76px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,.07);
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.sp-sidebar-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: linear-gradient(135deg,#f0fbff,#f8f9fa);
    border-bottom: 1px solid #eef0f4;
}

.sp-sidebar-head strong {
    font-size: .92rem;
    font-weight: 700;
    color: #222;
    letter-spacing: .2px;
}

.sp-clear-btn {
    font-size: .75rem;
    font-weight: 600;
    color: #e53935;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    transition: color .15s;
}
.sp-clear-btn:hover { color: #b71c1c; text-decoration: underline; }

/* Filter section accordion */
.sp-filter-section { border-bottom: 1px solid #f3f3f3; }
.sp-filter-section:last-child { border-bottom: none; }

.sp-filter-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 18px;
    background: none;
    border: none;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: #555;
    cursor: pointer;
    transition: background .15s;
}
.sp-filter-toggle:hover { background: #f8f9fa; }
.sp-filter-toggle .chevron {
    font-size: .6rem;
    color: #bbb;
    transition: transform .25s;
}
.sp-filter-toggle.collapsed .chevron { transform: rotate(-90deg); }

.sp-filter-body { padding: 2px 14px 12px; }
.sp-filter-body ul { list-style: none; padding: 0; margin: 0; }

/* Category links */
.sp-cat-link {
    display: block;
    font-size: .84rem;
    color: #555;
    padding: 5px 6px;
    border-radius: 7px;
    text-decoration: none;
    transition: background .15s, color .15s, padding-left .15s;
}
.sp-cat-link:hover { color: #00bfff; background: #f0fbff; padding-left: 12px; }

/* Checkboxes */
.sp-check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .84rem;
    color: #555;
    padding: 4px 6px;
    border-radius: 7px;
    cursor: pointer;
    transition: background .15s;
}
.sp-check-label:hover { background: #f5f5f5; }
.sp-check-label input[type="checkbox"] {
    accent-color: #00bfff;
    width: 14px; height: 14px;
    flex-shrink: 0;
    cursor: pointer;
}
.sp-color-dot {
    display: inline-block;
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,.12);
    flex-shrink: 0;
}

/* Mobile filter button */
.sp-filter-btn {
    display: none;
    align-items: center;
    gap: 7px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 7px 16px;
    font-size: .82rem;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    margin-bottom: 12px;
    transition: border-color .2s, color .2s;
}
.sp-filter-btn:hover { border-color: #00bfff; color: #00bfff; }

@media (max-width: 991.98px) {
    .sp-filter-btn { display: flex; }
    .sp-sidebar-wrap { display: none; }
    .sp-sidebar-wrap.open { display: block; margin-bottom: 16px; }
    .sp-sidebar { position: static; }
}

/* ── Toolbar ───────────────────────────────────────────── */
.sp-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 2px solid #f3f3f3;
    margin-bottom: 12px;
}
.sp-count {
    font-size: .8rem;
    color: #888;
    font-weight: 500;
}
.sp-count strong { color: #333; }
.sp-sort select {
    font-size: .8rem;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 5px 12px;
    min-width: 165px;
    background: #fff;
    color: #444;
    cursor: pointer;
    outline: none;
    transition: border-color .2s;
}
.sp-sort select:focus { border-color: #00bfff; }

/* ── Active filter tags ────────────────────────────────── */
.sp-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}
.sp-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fff3f3;
    border: 1px solid #ffcccc;
    color: #c62828;
    border-radius: 20px;
    padding: 3px 12px 3px 12px;
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.5;
}
.sp-tag i { cursor: pointer; opacity: .6; font-size: .65rem; }
.sp-tag i:hover { opacity: 1; }

/* ── Product card (override theme) ────────────────────── */
.sp-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.07);
    transition: transform .25s, box-shadow .25s;
    border: 1px solid #f0f0f0;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.sp-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 32px rgba(0,0,0,.13);
}

.sp-card-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #f8f8f8;
}
.sp-card-img a:first-child { display: block; height: 100%; }
.sp-card-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}
.sp-card:hover .sp-card-img img { transform: scale(1.08); }

/* Wishlist button over image */
.sp-wish {
    position: absolute;
    top: 9px; right: 9px;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    border: 1px solid #eee;
    display: flex; align-items: center; justify-content: center;
    font-size: .82rem; color: #ccc;
    cursor: pointer;
    z-index: 2;
    transition: color .2s, border-color .2s, background .2s;
    box-shadow: 0 1px 5px rgba(0,0,0,.1);
    text-decoration: none;
}
.sp-wish:hover, .sp-wish.wished { color: #f44336; border-color: #ffcdd2; background: #fff; }

/* Variant hover overlay */
.sp-card .sp-variants {
    position: absolute;
    bottom: -100px;
    left: 0; right: 0;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(6px);
    padding: 7px 10px 8px;
    border-top: 1px solid rgba(0,191,255,.1);
    transition: bottom .3s cubic-bezier(.25,.46,.45,.94);
    z-index: 1;
}
.sp-card:hover .sp-variants { bottom: 0; }

.sp-vchip {
    display: inline-flex; align-items: center;
    border: 1px solid rgba(0,191,255,.3);
    background: rgba(0,191,255,.06);
    color: #007fa3;
    padding: 1px 7px; margin: 2px 2px 0 0;
    font-size: 10px; font-weight: 600;
    border-radius: 5px;
}
.sp-vcolor {
    display: inline-block;
    width: 14px; height: 14px; border-radius: 50%;
    margin: 2px 2px 0 0;
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px #ddd;
    vertical-align: middle;
}

/* Card body */
.sp-card-body {
    padding: 11px 14px 13px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.sp-card-name {
    font-size: .87rem;
    font-weight: 600;
    color: #1a2332;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.45;
    margin-bottom: 7px;
    flex: 1;
    transition: color .15s;
}
.sp-card-name:hover { color: #00bfff; }

.sp-card-price {
    font-size: .95rem;
    font-weight: 800;
    color: var(--price-color, #FF7466);
    margin-bottom: 10px;
    letter-spacing: -.2px;
}
.sp-price-contact {
    color: #00bfff;
    font-style: italic;
    font-weight: 700;
    font-size: .88rem;
}
.sp-card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.sp-btn-buy {
    flex: 1;
    text-align: center;
    background: linear-gradient(135deg, #00bfff, #009fcc);
    color: #fff !important;
    border: none;
    border-radius: 9px;
    padding: 7px 10px;
    font-size: .8rem;
    font-weight: 700;
    text-decoration: none !important;
    letter-spacing: .2px;
    transition: opacity .2s, transform .15s;
    box-shadow: 0 3px 10px rgba(0,191,255,.3);
    display: block;
}
.sp-btn-buy:hover { opacity: .88; transform: translateY(-1px); }

/* ── Pagination override ───────────────────────────────── */
.sp-paging { margin-top: 24px; }
.sp-paging .pagination { justify-content: center; }
.sp-paging .pagination .page-link {
    border-radius: 9px !important;
    margin: 0 2px;
    min-width: 36px;
    text-align: center;
    font-size: .82rem;
    border-color: #e8e8e8;
    color: #555;
    transition: all .15s;
}
.sp-paging .page-item.active .page-link { background: #00bfff; border-color: #00bfff; color: #fff; }
.sp-paging .page-link:hover { background: #e8f8ff; border-color: #00bfff; color: #00bfff; }

/* ── Empty state ───────────────────────────────────────── */
.sp-empty { text-align: center; padding: 70px 20px; }
.sp-empty img { max-width: 170px; opacity: .35; margin-bottom: 20px; display: block; margin-inline: auto; }
