/* ???????????????????????????????????????????????????????????
   SHOP CATEGORY PAGE  –  shop-category.css
??????????????????????????????????????????????????????????? */

/* ?? HERO ???????????????????????????????????????????????? */
.wc-shopcat-hero {
    position: relative;
    height: 200px;
    background: center/cover no-repeat;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* ensure hero is visible below fixed navbar on all viewports */
.wc-shopcat-hero { margin-top: 70px; }

.wc-shopcat-hero .wc-shop-hero__overlay {
    background: linear-gradient(to bottom, rgba(10,8,5,.82) 0%, rgba(10,8,5,.92) 100%);
}

.wc-shopcat-breadcrumb {
    font-size: .75rem;
    color: rgba(255,255,255,.5);
    margin-bottom: .5rem;
}

.wc-shopcat-breadcrumb a {
    color: rgba(255,255,255,.5);
    text-decoration: none;
    transition: color .2s;
}

.wc-shopcat-breadcrumb a:hover { color: var(--wc-gold, #c8a96e); }

.wc-shopcat-hero__title {
    font-size: clamp(1.6rem, 4vw, 2.8rem);
    font-weight: 800;
    color: #fff;
    margin: 0;
}

/* ?? TOOLBAR ?????????????????????????????????????????????? */
.wc-shopcat-toolbar {
    background: var(--wc-cream, #FAF6F0);
    border-bottom: 1px solid var(--wc-border, #E2D0BA);
    padding: .75rem 0;
    position: sticky;
    top: 0;
    z-index: 90;
}

.wc-shopcat-count {
    font-size: .8rem;
    color: var(--wc-muted, #7A6652);
}

.wc-shopcat-sort-label {
    font-size: .8rem;
    color: var(--wc-muted, #7A6652);
}

.wc-shopcat-sort {
    border: 1px solid var(--wc-border, #E2D0BA);
    border-radius: 4px;
    padding: .3rem .7rem;
    font-size: .82rem;
    color: var(--wc-dark, #1C1008);
    background: var(--wc-cream, #FAF6F0);
    cursor: pointer;
}

.wc-shop-search {
    position: relative;
    width: 100%;
    max-width: 500px;
}

.wc-shop-search__input {
    width: 100%;
    padding: .65rem 2.5rem .65rem 1rem;
    border: 2px solid var(--wc-border, #E2D0BA);
    border-radius: 8px;
    font-size: .9rem;
    background: #fff;
    color: var(--wc-dark, #1C1008);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.wc-shop-search__input:focus {
    outline: none;
    border-color: var(--wc-gold, #c8a96e);
    box-shadow: 0 0 0 3px rgba(200,169,110,0.1);
}

.wc-shop-search__icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--wc-muted, #7A6652);
    font-size: 1rem;
    pointer-events: none;
}

/* RTL Support for search icon */
[dir="rtl"] .wc-shop-search__input {
    padding: .65rem 1rem .65rem 2.5rem;
}

[dir="rtl"] .wc-shop-search__icon {
    left: 1rem;
    right: auto;
}

/* ?? LAYOUT ??????????????????????????????????????????????? */
.wc-shopcat-layout {
    background: var(--wc-cream, #FAF6F0);
    padding: 2.5rem 0 5rem;
}

/* ?? SIDEBAR FILTER ??????????????????????????????????????? */
.wc-shopcat-filter-box {
    background: var(--wc-cream, #FAF6F0);
    border-radius: 6px;
    padding: 1.1rem 1rem;
    box-shadow: 0 1px 5px rgba(107,58,42,.07);
    border: 1px solid var(--wc-border, #E2D0BA);
}

.wc-shopcat-filter-title {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--wc-dark, #1C1008);
    margin-bottom: .85rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--wc-gold, #C4973B);
}

.wc-shopcat-filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.wc-shopcat-filter-list a {
    display: flex;
    align-items: center;
    padding: .4rem .5rem;
    border-radius: 4px;
    font-size: .82rem;
    color: var(--wc-dark, #1C1008);
    text-decoration: none;
    transition: background .18s, color .18s;
}

/* Ensure icons and text spacing look correct (also fixes default blue link color) */
.wc-shopcat-filter-list a i {
    color: var(--wc-muted, #7A6652);
    font-size: 1.05rem;
    margin-inline-end: .5rem; /* respects RTL */
}

/* Make the sidebar box a consistent width and prevent links wrapping oddly */
.wc-shopcat-filter-box { box-sizing: border-box; }
.wc-shopcat-filter-list a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.wc-shopcat-filter-list a:hover,
.wc-shopcat-filter-list a.active {
    background: var(--wc-light, #F5EFE6);
    color: var(--wc-gold, #C4973B);
    font-weight: 600;
}

.wc-shopcat-check {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .82rem;
    color: var(--wc-muted, #7A6652);
    cursor: pointer;
}
.wc-filter-label-text { flex: 1; }
.wc-filter-count {
    font-size: .72rem;
    background: var(--wc-light, #F5EFE6);
    color: var(--wc-muted, #7A6652);
    border-radius: 10px;
    padding: 1px 7px;
    font-weight: 600;
}

/* ?? Color Filter Grid ???????????????????????????????????? */
.wc-color-filter-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0;
}
.wc-color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: none;
    position: relative;
    transition: transform .2s;
}
.wc-color-swatch img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #ddd;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    transition: border-color .2s;
}
.wc-color-swatch:hover { 
    transform: scale(1.18); 
}
.wc-color-swatch:hover img {
    border-color: var(--wc-gold, #c8a96e);
}
.wc-color-swatch.selected img {
    border-color: var(--wc-gold, #c8a96e);
}
.wc-color-swatch.selected {
    transform: scale(1.12);
}

/* ?? Apply / Reset Filter Buttons ???????????????????????? */
.wc-btn-apply-filter {
    background: var(--wc-gold, #C4973B);
    color: var(--wc-dark, #1C1008);
    border: none;
    border-radius: 6px;
    padding: 8px;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s;
}
.wc-btn-apply-filter:hover { opacity: .85; }
.wc-btn-reset-filter {
    background: transparent;
    color: var(--wc-muted, #7A6652);
    border: 1px solid var(--wc-border, #E2D0BA);
    border-radius: 6px;
    padding: 7px;
    font-size: .8rem;
    cursor: pointer;
    transition: background .2s;
}
.wc-btn-reset-filter:hover { background: var(--wc-light, #F5EFE6); }

/* ?? Product Card Extras ?????????????????????????????????? */
.wc-shop-card__colors {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 6px 0 4px;
    flex-wrap: wrap;
}
.wc-color-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,.12);
    display: inline-block;
    cursor: default;
}
.wc-color-more {
    font-size: .68rem;
    color: var(--wc-muted, #7A6652);
    background: var(--wc-light, #F5EFE6);
    border-radius: 8px;
    padding: 1px 5px;
}

.wc-shop-card__material,
.wc-shop-card__size {
    font-size: .72rem;
    color: #888;
    margin: 2px 0;
}

/* ?? Price Row ???????????????????????????????????????????? */
.wc-shop-card__price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin: 6px 0 4px;
}
.wc-shop-card__price {
    color: var(--wc-gold, #c8a96e);
    font-weight: 700;
    font-size: .92rem;
}
.wc-shop-card__old-price {
    color: #aaa;
    font-size: .78rem;
    text-decoration: line-through;
}

/* ?? Add to Cart Button ??????????????????????????????????? */
.wc-add-to-cart-btn {
    width: 100%;
    background: #1a1a1a;
    color: var(--wc-gold, #c8a96e);
    border: 1px solid rgba(200,169,110,.3);
    border-radius: 6px;
    padding: 7px 10px;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 6px;
    transition: background .2s, color .2s;
}
.wc-add-to-cart-btn:hover,
.wc-add-to-cart-btn--added {
    background: var(--wc-gold, #c8a96e);
    color: #1a1a1a;
    border-color: transparent;
}

/* ?? BADGE VARIANT: featured (dark) ??????????????????????? */
.wc-shop-card__badge--featured {
    background: #1a1a1a;
}

/* ?? RESPONSIVE ??????????????????????????????????????????? */
@media (max-width: 991px) {
    .wc-shopcat-layout aside { order: 2; }
    .wc-shopcat-layout .col-lg-9 { order: 1; }
    .wc-shopcat-filter-list { flex-direction: row; flex-wrap: wrap; }
    .wc-shopcat-filter-list a { padding: .3rem .75rem; border: 1px solid #eee; }
}

@media (max-width: 575px) {
    .wc-shopcat-hero { height: 150px; }
}
