/* ============================================================
   Brandstore Blocks — Global CSS
   Applies to all reusable Brandstore blocks.
   Namespace: .bs-{block-name}
   ============================================================ */

/* ------------------------------------------------------------
   TEXT SECTION BLOCK
   ------------------------------------------------------------ */
.bs-text-section,
.bs-text-section h1,
.bs-text-section h2,
.bs-text-section h3,
.bs-text-section h4,
.bs-text-section h5,
.bs-text-section h6,
.bs-text-section p {
    color: inherit;
}

/* ========================
   USP BLOCK
   ======================== */
/* Remove THEME PALETTE backgrounds only */
.wp-block-acf-bs-usp.has-background[class*="has-palette-"] {
    background-color: transparent !important;
}

/* Allow custom color (inline style) to pass through */
.wp-block-acf-bs-usp.has-background[style*="background-color"] {
    background-color: transparent !important;
}

.bs-usp {
    display: grid;
    gap: 1.5em;
}

.bs-usp--grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Tablet */
/* Max 2 cards per row on tablet portrait */
@media (max-width: 900px) {
    .bs-usp--grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 1 column on mobile */
@media (max-width: 600px) {
    .bs-usp--grid {
        grid-template-columns: 1fr;
    }
}

/* Cards */
.bs-usp-item {
    padding: 1.5em;
    display: flex;
    flex-direction: column;
    gap: .4em;
}

/* Plain version overrides */
.bs-usp-item--plain {
    padding: 0 !important;
    background: none !important;
}

.bs-usp-icon {
    display: inline-block;
    margin-bottom: 1em;
}

.bs-usp-icon img {
    width: 2.5em;
    height: auto;
    display: block;
}

/* Text */
.bs-usp-title,
.bs-usp-desc,
.bs-usp-item * {
    color: inherit;
    margin: 0;
}

.bs-usp-link {
    margin-top: 4px;
    color: var(--bs-primary, #000);
    text-decoration: underline;
}

.bs-usp.has-text-color,
.bs-usp.has-background {
    transition: background-color .2s ease, color .2s ease;
}

/* Make title inherit color inside Gutenberg editor */
.editor-styles-wrapper .bs-usp-item,
.editor-styles-wrapper .bs-usp-item * {
    color: inherit;
}

/* ---------------------------------------------
   USP Design Variables
   --------------------------------------------- */

.bs-usp {
  --usp-card-bg: #ffffff;
  --usp-card-border: none;
  --usp-card-radius: 8px;
  --usp-card-shadow: none;
  --usp-title-size: 1.125rem;
  --usp-title-weight: 600;
  --usp-desc-size: 0.95rem;
  --usp-desc-lineheight: 1.55;
  --usp-gap: 1.5rem;
}

.bs-usp {
  gap: var(--usp-gap);
}

.bs-usp-item {
  background: var(--usp-card-bg, inherit);
  border: var(--usp-card-border, none);
  border-radius: var(--usp-card-radius, 0);
  box-shadow: var(--usp-card-shadow, none);
  padding: var(--usp-card-padding, 1.5em); /* fallback to your default */
}

/* Title */
.bs-usp-title {
  //font-size: var(--usp-title-font-size, inherit);
  //color: var(--usp-title-color, inherit);
}

/* Description */
.bs-usp-desc {
  font-size: var(--usp-desc-size, inherit);
  line-height: var(--usp-desc-lineheight, inherit);
  color: var(--usp-desc-color, inherit);
}

.bs-usp-desc p {
  margin: 0 0 0.5rem;
}

/* Icon */
.bs-usp-icon img {
  width: var(--usp-icon-size, 2.5em); /* your default = 2.5em */
}


/* ============================================================
   Category Tags
   ============================================================ */

.bs-category-tags {
    display: flex;
    flex-wrap: wrap;
}

/* Base tag */
.bs-category-tags .bs-tag {
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    transition: all 0.15s ease;

    margin: var(--bs-tag-gap);
    padding: var(--bs-tag-pad-y) var(--bs-tag-pad-x);
    border-radius: var(--bs-tag-radius);

    /* Text color comes from the container (theme / Blocksy) */
    color: inherit;
    background: transparent;
    border: none;
}

/* Variants */
/* 1. Filled – neutral pill-ish background */
.bs-category-tags.variant-filled .bs-tag {
    background-color: rgba(0, 0, 0, 0.06);
}
.bs-category-tags.variant-filled .bs-tag:hover {
    background-color: rgba(0, 0, 0, 0.12);
}

/* 2. Outline – border only, text color from theme */
.bs-category-tags.variant-outline .bs-tag {
    background: transparent;
    border: 2px solid currentColor;
}
.bs-category-tags.variant-outline .bs-tag:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

/* 3. Minimal – just text, underline on hover */
.bs-category-tags.variant-minimal .bs-tag {
    background: transparent;
    border: none;
}
.bs-category-tags.variant-minimal .bs-tag:hover {
    text-decoration: underline;
}

/* 4. Pill – soft pill shape, neutral background */
.bs-category-tags.variant-pill .bs-tag {
    background-color: rgba(0, 0, 0, 0.06);
    border-radius: 9999px;
}
.bs-category-tags.variant-pill .bs-tag:hover {
    background-color: rgba(0, 0, 0, 0.12);
}

/* 5. Soft – very light background tint */
.bs-category-tags.variant-soft .bs-tag {
    background-color: rgba(0, 0, 0, 0.03);
}
.bs-category-tags.variant-soft .bs-tag:hover {
    background-color: rgba(0, 0, 0, 0.08);
}

/* ===============================
   FAQ Block
================================== */

.bs-faq-block {
    width: 100%;
}

.bs-faq-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bs-faq-item {
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding-bottom: 12px;
}

.bs-faq-question {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.1em;
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.bs-faq-icon {
    transition: transform 0.2s ease;
}

.bs-faq-item.open .bs-faq-icon {
    transform: rotate(45deg);
}

.bs-faq-answer {
    margin-top: 10px;
    font-size: 0.95em;
    line-height: 1.6;
}


/* -------------------------------
   Base Accordion Styling
------------------------------- */
.bs-faq-list, 
.bs-legal-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bs-faq-item, 
.bs-legal-item {
    border-bottom: 1px solid var(--wp--preset--color--contrast-100, #ddd);
    padding-bottom: 8px;
}

.bs-faq-item .button, 
.bs-legal-item .button {
    color: var(--bde-headings-color);
}

/* -------------------------------
   Trigger (question)
------------------------------- */
.bs-faq-question,
.bs-legal-question {
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    font-size: 1.05rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

/* Caret icon */
.bs-faq-icon,
.bs-accordion-icon {
    display: inline-block;
    transition: transform 0.25s ease;
    font-weight: bold;
    font-size: 1.25em;
}

.bs-faq-icon.is-open,
.bs-accordion-icon.is-open {
    transform: rotate(45deg); /* from + to × */
}

/* -------------------------------
   Content animation
------------------------------- */
[data-bs-accordion-content] {
    overflow: hidden;
    height: 0;
    transition: height 0.30s ease;
}

/* Inner answer text */
.bs-faq-answer,
.bs-legal-answer {
    padding-top: 8px;
    font-size: .95rem;
    line-height: 1.55;
}

/* -------------------------------
   Master Toggle
------------------------------- */
.bs-accordion-master {
    background: none;
    border: none;
    color: var(--theme-palette-color-1, #272727);
    cursor: pointer;
    font-size: .9rem;
    margin-bottom: 1em;
    text-align: right;
    transition: opacity 0.2s ease;
    width: 100%;
}

.bs-accordion-master:hover {
    opacity: 0.85;
}

/* ==========================================================
   CHIP LAYOUT — Make the UL behave like a chip container
   ========================================================== */

.woocommerce-widget-layered-nav-list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Make LI behave like an inline chip container */
.woocommerce-widget-layered-nav-list__item.wc-layered-nav-term {
    display: inline-flex !important;
    align-items: center;
    width: fit-content !important; /* Prevent full-width expansion */
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 999px !important;
    background: #F7F3F0 !important;
    border: 1px solid #ECE2D8 !important;
    color: #7E6C6C !important;
    font-size: 0.875rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    cursor: pointer;
    position: relative; /* needed for count positioning */
}

/* Internal link inherits styling, not applies it */
.woocommerce-widget-layered-nav-list__item.wc-layered-nav-term a {
    display: inline-flex !important;
    align-items: center !important;
    width: 100% !important;
    height: 100% !important;
    padding: 4px 10px !important;
    color: inherit !important;
    text-decoration: none !important;
    background: transparent !important;
}

/* Count label — ensure no overlap */
.woocommerce-widget-layered-nav-list__item.wc-layered-nav-term .count {
    position: relative !important;  /* override theme's absolute */
    margin-left: 6px !important;
    opacity: 0.6 !important;
    font-size: 0.75rem !important;
    line-height: 1 !important;
    top: unset !important;
    transform: unset !important;
    color: unset !important;
    background-color: unset !important;
}

/* Hover */
.woocommerce-widget-layered-nav-list__item.wc-layered-nav-term:hover {
    border-color: #7E6C6C !important;
}

/* ==========================================================
   ACTIVE CHIP
   ========================================================== */

.woocommerce-widget-layered-nav-list__item.wc-layered-nav-term.chosen,
.woocommerce-widget-layered-nav-list__item.wc-layered-nav-term.woocommerce-widget-layered-nav-list__item--chosen {
    background: transparent !important;
    border-color: #7E6C6C !important;
    color: #333 !important;
    font-weight: 600 !important;
}

/* ==========================================================
   "+X MORE" CHIP
   ========================================================== */

.bs-chip-more {
    display: inline-flex !important;
    align-items: center;
    width: fit-content !important;
    padding: 4px 10px !important;
    border-radius: 999px !important;
    background: #F7F3F0 !important;
    border: 1px dashed #ECE2D8 !important;
    color: #7E6C6C !important;
    font-size: 0.875rem !important;
    cursor: pointer;
}

.bs-chip-more__button {
    background: transparent !important;
    border: none !important;
    margin: 0 !important;
    color: inherit !important;
    cursor: pointer;
    font-size: inherit !important;
    line-height: inherit !important;
}

/* ==========================================================
   HIDDEN CHIP STATE
   ========================================================== */

.bs-chip--hidden {
    display: none !important;
}
