/* =====================================================
   WIIZE Shop v2 — Sidebar filters + top bar
   ===================================================== */

/* ---------- Main title (lives at top of left column) ---------- */
.shop_v2 .filter_main_title {
    font-family: serif;
    font-style: italic;
    font-weight: 400;
    font-size: 46px;
    line-height: 1.2;
    margin: 60px 0 60px;
    min-height: 40px;
    display: flex;
    align-items: center;
    background: transparent;
}

/* ---------- Grid wrapper ---------- */
.shop_v2 .sp-wrapper {
    display: grid;
    grid-template-columns: 1fr 2fr;   /* было: 380px 1fr */
    gap: 30px;
    align-items: flex-start;
}

@media (max-width: 980px) {
    .shop_v2 .sp-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* ---------- Sidebar ---------- */
.filters-sidebar {
    /* no background here anymore — sits on white */
}

.shop_v2 .filters-box {
    background: #fbf8f5;
    padding: 24px 22px;
}

/* ---------- Filter section ---------- */
.filter-section {
    border-bottom: 1px solid #d8d8d8;
}

.filter-section:first-child {
    border-top: 1px solid #d8d8d8;
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    cursor: pointer;
}

.filter-title {
    font-family: serif;
    font-style: italic;
    font-weight: 400;
    font-size: 22px;
    margin: 0;
    color: #1a1a1a;
}

.filter-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    color: #AAA;
    transition: transform 0.25s ease;
    font-weight: 300;
}

.filter-toggle:hover {
    color: #8a1538;
}

/* ---------- Smooth slide reveal ---------- */
.filter-content {
    display: none;
    padding: 0 0 22px;
}

/* (jQuery .slideToggle handles the open/close animation
    via inline display:block; — no extra CSS needed) */

/* ---------- Chips ---------- */
.chips-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
align-items: center;
  padding: 8px 14px;
  background: #f1ece7;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #000;
  font-size: 12px;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  cursor: pointer;
  line-height: 1.4;
  font-weight: 600;
  font-family: "Work Sans", serif;
}

.chip:hover {
    background: #e7e0d6;
}

.chip.active {
    background: #1a1a1a;
    color: #fff;
}

.chip-multiline {
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 10px;
    min-width: 0;
}

.chip-multiline strong {
    font-weight: 700;
    font-size: 12px;
    margin-bottom: 2px;
}

.chip-multiline span {
    font-weight: 600;
    font-size: 10px;
}

/* Types of wine — 2-column grid */
.shop_v2 .colors.chips-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

/* ---------- Price range ---------- */
.range_wrap .price_box {
    position: relative;
    padding-top: 30px;
}

.price_box_desc {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.price_min, .price_max {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    font-size: 12px;
}

.price_min { float: left; }
.price_max { float: right; }

.price_currency { color: #777; }

/* ---------- Search bar inside filters ---------- */
.product_search_bar {
    position: relative;
    margin-bottom: 14px;
}

.product_search_input {
    width: 100%;
    border: 0;
    border-bottom: 1px solid #c0c0c0;
    background: transparent;
    padding: 6px 24px 6px 22px;
    font-size: 12px;
    outline: none;
}

.product_search_submit {
    position: absolute;
    left: 0;
    top: 6px;
    width: 14px;
    height: 14px;
    pointer-events: none;
}

.product_search_submit svg {
    width: 14px;
    height: 14px;
    fill: #1a1a1a;
}

.suggestions-container {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    z-index: 10;
    max-height: 220px;
    overflow-y: auto;
}

.suggestions-container ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.suggestions-container li,
.suggestions-container .sp-main-category {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 12px;
}

.suggestions-container li:hover,
.suggestions-container .sp-main-category:hover {
    background: #f3efe9;
}

/* ---------- Grape groups ---------- */
.grape-group {
    margin-top: 14px;
}

.grape-group-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    color: #1a1a1a;
}

/* ---------- Community rating ---------- */
.rating-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rating-item {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #1a1a1a;
    font-size: 12px;
    cursor: pointer;
}

.radio-circle {
    width: 14px;
    height: 14px;
    border: 1px solid #bbb;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
}

.rating-item.active .radio-circle {
    background: #1a1a1a;
    border-color: #1a1a1a;
    box-shadow: inset 0 0 0 3px #fff;
}

.stars {
    display: inline-flex;
    gap: 2px;
}

.star {
    color: #ddd;
    font-size: 24px;
    line-height: 20px;
}

.star.full { color: #A6032F; }
.star.half {
    background: linear-gradient(90deg, #A6032F 50%, #ddd 50%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.rating-value {
    font-weight: 600;
    margin-left: 4px;
    color: #707070;
}

.rating-label {
    color: #707070;
        font-size: 14px;
    line-height: 20px
}

/* ---------- Show all link ---------- */
.show-all-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 11px;
    color: #1a1a1a;
    text-decoration: underline;
    cursor: pointer;
}

/* ---------- Top bar (sort + active filters) ---------- */
.products-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin: 130px 0 5px;
    min-height: 38px;
    flex-wrap: wrap;
}

/* Kill any inherited padding/margin from theme .content wrapper inside right column */
.shop_v2 .sp-column-2 > .content,
.shop_v2 .sp-column-2 > .content > .content_wrap {
    margin-top: 0;
    padding-top: 0;
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.active-filter-btn,
.reset-selection-button {
    background: #FFF;
    border: none;
    padding: 6px 14px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 3px;
}

.active-filter-btn .close-icon,
.reset-selection-button .close-icon {
    font-size: 10px;
}

.active-filter-group {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ---------- Clear all (red/accent) ---------- */
.clear-all-btn {
    background: #8a1538;
    color: #fff;
    border: none;
    padding: 6px 14px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 3px;
}

.clear-all-btn .close-icon {
    font-size: 10px;
}

.clear-all-btn:hover {
    background: #6e1029;
}

/* ---------- Sort dropdown ---------- */
.sorting-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.sort-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #1a1a1a;
}

.sorting-wrap .orderby {
    border: 0;
    border-bottom: 1px solid #1a1a1a;
    background: transparent;
    padding: 4px 24px 4px 4px;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M0 0l5 6 5-6z' fill='%231a1a1a'/></svg>");
    background-repeat: no-repeat;
    background-position: right 4px center;
    height: 30px;
    line-height: 20px;
}

/* ---------- Pagination ---------- */
.pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.pagination .page-numbers {
    padding: 6px 12px;
    text-decoration: none;
    color: #1a1a1a;
    font-size: 12px;
}

.pagination .page-numbers.current {
    background: #1a1a1a;
    color: #fff;
}

/* Force 3-column grid on the shop page */
.shop_v2 .product-cards-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 980px) {
    .shop_v2 .product-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .shop_v2 .product-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* ============ Price range — dual-thumb on a single track ============ */
.shop_v2 .range_wrap .price_box {
    position: relative;
    height: 28px;
    padding-top: 0;
    margin-bottom: 28px;
}

/* Shared visible track */
.shop_v2 .range_wrap .price_box::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 0;
    right: 0;
    height: 4px;
    background: #d8d8d8;
    border-radius: 2px;
    z-index: 0;
}

/* Both inputs absolutely stacked on the same line; track hidden */
.shop_v2 .range_wrap .price_range {
    -webkit-appearance: none;
    appearance: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 28px;
    background: transparent;
    pointer-events: none; /* track clicks ignored, only thumbs catch */
    margin: 0;
    z-index: 1;
    outline: none;
}

/* Hide built-in tracks */
.shop_v2 .range_wrap .price_range::-webkit-slider-runnable-track {
    background: transparent;
    border: none;
    height: 4px;
}
.shop_v2 .range_wrap .price_range::-moz-range-track {
    background: transparent;
    border: none;
    height: 4px;
}

/* Thumbs — only these are interactive */
.shop_v2 .range_wrap .price_range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #8a8a8a;
    cursor: pointer;
    pointer-events: auto;
    border: none;
    margin-top: -7px; /* center on the 4px track */
}
.shop_v2 .range_wrap .price_range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #8a8a8a;
    cursor: pointer;
    pointer-events: auto;
    border: none;
}

/* Labels below */
.shop_v2 .range_wrap .price_min,
.shop_v2 .range_wrap .price_max {
    position: absolute;
    top: 32px;
    font-size: 12px;
    color: #555;
}
.shop_v2 .range_wrap .price_min { left: 0; float: none; }
.shop_v2 .range_wrap .price_max { right: 0; float: none; }

/* ============ Override Bricks/parent input styles for filter search ============ */
.shop_v2 .product_search_bar .product_search_input,
.shop_v2 input[type="text"].product_search_input {
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid #c0c0c0 !important;
    border-radius: 0 !important;
    height: auto !important;
    line-height: 1.4 !important;
    padding: 6px 24px 6px 42px !important;
    margin: 0 !important;
    float: none !important;
    width: 100% !important;
    font-size: 12px !important;
    font-family: inherit !important;
    font-weight: 400 !important;
    color: #1a1a1a !important;
    outline: none !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    transition: none !important;
}

.shop_v2 .product_search_bar .product_search_input::placeholder {
    color: #888;
    opacity: 1;
    font-size: 11px;
    letter-spacing: 0.04em;
}

.shop_v2 .product_search_bar .product_search_input:focus {
    border-bottom-color: #1a1a1a !important;
}

/* Search icon position */
.shop_v2 .product_search_bar .product_search_submit {
    left: 0 !important;
    top: 20% !important;
    transform: translateY(-50%);
}

.filter-content .product_search_bar {
    border-bottom:none !important;
}


.shop_v2 .filter-content .chips-wrapper {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.shop_v2 .filter-content a.chip,
.shop_v2 .filter-content .chip {
    display: inline-flex !important;
    float: none !important;
    clear: none !important;
    position: static !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
    text-decoration: none !important;
    align-self: flex-start;
}

/* ============ 3-column grid for all chip filters ============ */
.shop_v2 .filter-content .chips-wrapper {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
}

.shop_v2 .filter-content .chips-wrapper .chip {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    justify-content: center;
    text-align: center;
}

/* Multiline chips (Types of wine) keep text left-aligned inside the cell */
.shop_v2 .filter-content .colors.chips-wrapper .chip-multiline {
    justify-content: flex-start;
    text-align: left;
}
/* === Fix vertical alignment of stars in Community rating === */
.shop_v2 .rating-item {
    align-items: center;
}

.shop_v2 .rating-item .stars {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.shop_v2 .rating-item .star {
    font-size: 20px;
    line-height: 1;
}

.shop_v2 .sp-wrapper .sp-column-1,
.shop_v2 .sp-wrapper .sp-column-2 {
    width: auto !important;
    max-width: none !important;
    flex: none !important;
    min-width: 0;
}

.wine-style-group { width: 100%; }
.wine-style-options { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; padding-left: 12px; }
.chip-style-parent.open { background: #2a2a2a; color: #fff; }
.chip-style-option.selected { background: #2a2a2a; color: #fff; }

/* Parents row — 3 в ряд */
.wine-style-parents {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

/* Options panel — тоже 3 в ряд */
.wine-style-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.wine-style-options[hidden] {
    display: none;
}
/* Активный родитель — чёрный (как у вас уже работает на скрине) */
.chip-style-parent.open {
    background: #2a2a2a;
    color: #fff;
}

/* Опции по умолчанию — тоже чёрные, чтобы визуально «продолжали» родителя */
.chip-style-option {
    background: #2a2a2a;
    color: #fff  !important;
}

/* Выбранная опция — другой цвет, чтобы было видно, что отмечена.
   Здесь burgundy под винную тему — поменяйте на свой брендовый цвет. */
.chip-style-option.selected {
    background: #7a1f2b;
    color: #fff;
}

/* Hover — лёгкое осветление для обоих */
.chip-style-parent:hover,
.chip-style-option:hover {
    opacity: 0.9;
}

@media (max-width: 480px) {
    .wine-style-options {
        grid-template-columns: repeat(2, 1fr);
    }
}