/* ==============================================
   shop.css  —  Crown Gem Shop Page
   Uses global.css tokens — nothing re-declared.
   ============================================== */

/* ================================================
   HERO
   ================================================ */
.sh-hero {
    position: relative;
    height: 420px;
    overflow: hidden;
    background: url('../img/shop/1.png') center / cover no-repeat;
    background-color: var(--navy-mid);
}

.sh-hero_overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #2D2D43 0%, rgba(102, 102, 102, 0) 100%);

}

.sh-hero_content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    padding-bottom: 48px;
}

.sh-hero_content .section-label { color: var(--gold-light); }

.sh-hero_title {
    font-family: var(--serif);
    font-size: clamp(36px, 5vw, 58px);
    font-weight: 600;
    color: var(--white);
    line-height: 1.1;
    margin-top: 6px;
}

/* ================================================
   SHOP BODY LAYOUT
   ================================================ */
.sh-body { padding: 48px 0 80px; background: var(--white); }

.sh-body_inner {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 36px;
    align-items: start;
}

/* ================================================
   SIDEBAR
   ================================================ */
.sh-sidebar {
    border: 1px solid var(--border);
    padding: 0;
    position: sticky;
    top: 100px;
}

/* ---- filter block ---- */
.sh-filter-block {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border);
}

.sh-filter-block_head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.sh-filter-block_title {
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.sh-filter-icon {
    color: var(--text-light);
    display: flex;
    align-items: center;
    transition: color var(--transition);
}
.sh-filter-icon:hover { color: var(--gold); }

/* ---- price range ---- */
.sh-price-range {
    position: relative;
    height: 24px;
    margin-bottom: 10px;
}

.sh-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 3px;
    background: var(--border);
    outline: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.sh-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--navy);
    cursor: pointer;
    pointer-events: all;
    border: 2px solid var(--white);
    box-shadow: 0 0 0 1px var(--navy);
}

.sh-range::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--navy);
    cursor: pointer;
    pointer-events: all;
    border: 2px solid var(--white);
    box-shadow: 0 0 0 1px var(--navy);
}

.sh-price-display {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--sans);
    font-size: 11.5px;
    color: var(--text-light);
    margin-bottom: 14px;
}

.sh-filter-btn {
    display: block;
    width: 100%;
    padding: 9px 0;
    background: var(--navy);
    color: var(--white);
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-align: center;
    transition: background var(--transition);
}
.sh-filter-btn:hover { background: var(--navy-mid); }

/* ---- checkboxes ---- */
.sh-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    cursor: pointer;
}

.sh-check input { display: none; }

.sh-check_box {
    width: 14px;
    height: 14px;
    border: 1.5px solid var(--border);
    flex-shrink: 0;
    background: var(--white);
    transition: border-color var(--transition), background var(--transition);
}

.sh-check input:checked + .sh-check_box {
    background: var(--gold);
    border-color: var(--gold);
}

.sh-check_label {
    font-family: var(--sans);
    font-size: 13px;
    color: var(--text-mid);
    flex: 1;
}

.sh-check_count {
    font-family: var(--sans);
    font-size: 12px;
    color: var(--text-light);
}

/* ---- reset button ---- */
.sh-reset-btn {
    display: block;
    width: calc(100% - 40px);
    margin: 16px 20px;
    padding: 10px 0;
    border: 1.5px solid var(--gold);
    color: var(--gold);
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-align: center;
    transition: all var(--transition);
    background: transparent;
}
.sh-reset-btn:hover { background: var(--gold); color: var(--white); }

/* ================================================
   ACTIVE FILTER TAGS
   ================================================ */
.sh-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.sh-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--navy);
    color: var(--white);
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.5px;
    padding: 6px 12px;
    transition: background var(--transition);
}
.sh-tag:hover { background: var(--navy-mid); }

/* ================================================
   TOOLBAR
   ================================================ */
.sh-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.sh-toolbar_count {
    font-family: var(--sans);
    font-size: 13px;
    color: var(--text-light);
}

.sh-toolbar_right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sh-select-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--sans);
    font-size: 12px;
    color: var(--text-light);
}

.sh-select {
    font-family: var(--sans);
    font-size: 12px;
    color: var(--text-dark);
    border: 1px solid var(--border);
    padding: 5px 28px 5px 8px;
    background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E") no-repeat right 8px center;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    outline: none;
}

/* view toggle */
.sh-view-toggle { display: flex; gap: 4px; }

.sh-view-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    color: var(--text-light);
    transition: all var(--transition);
    background: var(--white);
}
.sh-view-btn:hover,
.sh-view-btn--active {
    border-color: var(--gold);
    color: var(--gold);
}

/* ================================================
   PRODUCT GRID
   ================================================ */
.sh-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

/* ---- product card ---- */
.sh-product {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: box-shadow var(--transition);
}
.sh-product:hover { box-shadow: var(--shadow-md); }

.sh-product_img-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--off-white);
}

.sh-product_img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.sh-product:hover .sh-product_img-wrap img { transform: scale(1.05); }

.sh-product_wish {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.90);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: color var(--transition), background var(--transition);
    border: none;
    cursor: pointer;
}
.sh-product_wish:hover { color: var(--gold); background: var(--white); }

.sh-product_body { padding: 14px 14px 16px; flex: 1; display: flex; flex-direction: column; gap: 4px; }

.sh-product_top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.sh-product_name {
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 600;
    color: var(--gold);
}

.sh-product_price {
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
}

.sh-product_sub {
    font-family: var(--sans);
    font-size: 12.5px;
    color: var(--text-mid);
}

.sh-product_detail {
    font-family: var(--sans);
    font-size: 11.5px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.sh-product_actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: auto;
    padding-top: 10px;
}

.sh-btn-cart {
    padding: 9px 0;
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    border: 1.5px solid var(--border);
    color: var(--text-dark);
    background: var(--white);
    transition: border-color var(--transition), color var(--transition);
    cursor: pointer;
}
.sh-btn-cart:hover { border-color: var(--gold); color: var(--gold); }

.sh-btn-buy {
    padding: 9px 0;
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    background: var(--gold);
    color: var(--white);
    border: 1.5px solid var(--gold);
    transition: background var(--transition);
    cursor: pointer;
}
.sh-btn-buy:hover { background: var(--gold-dark); border-color: var(--gold-dark); }

/* ---- list view ---- */
.sh-grid--list { grid-template-columns: 1fr; }

.sh-grid--list .sh-product {
    flex-direction: row;
    max-height: 180px;
}

.sh-grid--list .sh-product_img-wrap {
    width: 180px;
    flex-shrink: 0;
    aspect-ratio: auto;
}

.sh-grid--list .sh-product_actions {
    grid-template-columns: 1fr 1fr;
    max-width: 260px;
}

/* ================================================
   PAGINATION
   ================================================ */
.sh-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.sh-page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 6px;
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-mid);
    border: 1px solid var(--border);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    cursor: pointer;
}

.sh-page-btn:hover { border-color: var(--gold); color: var(--gold); }

.sh-page-btn--active {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--white);
}

.sh-page-btn--nav { font-size: 18px; }

.sh-page-dots {
    font-size: 14px;
    color: var(--text-light);
    padding: 0 4px;
    line-height: 36px;
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 1024px) {
    .sh-body_inner { grid-template-columns: 220px 1fr; gap: 24px; }
    .sh-grid        { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .sh-body_inner { grid-template-columns: 1fr; }
    .sh-sidebar     { position: static; }
    .sh-grid        { grid-template-columns: repeat(2, 1fr); }
    .sh-toolbar     { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 520px) {
    .sh-hero        { height: 240px; }
    .sh-grid        { grid-template-columns: 1fr; }
    .sh-grid--list .sh-product { flex-direction: column; max-height: none; }
    .sh-grid--list .sh-product_img-wrap { width: 100%; aspect-ratio: 1/1; }
    .sh-toolbar_right { flex-wrap: wrap; gap: 10px; }
}