/* Bollaert watersilo configurator — 3 dropdowns layout, bigger dark text */
:root {
  --bw-blue: #39c;
  --bw-blue-dark: #1d6f9a;
  --bw-blue-light: #e4f2fb;
  --bw-yellow: #ffd54a;
  --bw-yellow-light: #fffbe6;
  --bw-green: #4CAF50;
  --bw-text: #0a0a0a;             /* near black */
  --bw-text-2: #1a1a1a;
  --bw-border: #d0d7e0;
  --bw-radius: 10px;
}

.bw-cfg, .bw-cfg * { color: var(--bw-text) !important; box-sizing: border-box; }
/* Typography aligned to the standard product page (bovengrondse-rechthoekige-…) — 16px body / 24px line-height. */
.bw-cfg { font-family: inherit !important; font-size: 16px !important; line-height: 1.5 !important; }
.bw-cfg h3 {
  font-size: 19px !important;
  font-weight: 600 !important;
  color: var(--bw-text-2) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  margin: 1.6rem 0 .7rem !important;
}

/* Short product subtitle right below the H1 (matches reference page short-description style) */
.bw-subtitle {
  margin: -.4rem 0 1.4rem !important;
  font-size: 16px !important;
  line-height: 1.5 !important;
  color: #474747 !important;
  font-weight: 400 !important;
}

/* Loader — visible immediately on page load (HTML present before Alpine boots),
   then x-show="loading" hides it once the REST payload is fetched. */
.bw-loader {
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  color: #474747 !important;
  font-size: 15px;
}
.bw-loader[style*="display: none"] { display: none !important; }
.bw-loader-text { margin: 0 !important; }
.bw-spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 3px solid var(--bw-blue-light);
  border-top-color: var(--bw-blue);
  border-radius: 50%;
  animation: bw-spin .8s linear infinite;
  flex: 0 0 auto;
}
@keyframes bw-spin {
  to { transform: rotate(360deg); }
}

/* Dynamic Specificaties panel (updates as user picks a silo) */
.bw-specs {
  margin-top: 1rem;
}
.bw-specs-table {
  width: 100% !important;
  border-collapse: collapse !important;
  background: #fff !important;
  border: 1px solid var(--bw-border) !important;
  border-radius: var(--bw-radius) !important;
  overflow: hidden !important;
  font-size: 15px !important;
}
.bw-specs-table th,
.bw-specs-table td {
  padding: 11px 16px !important;
  text-align: left !important;
  vertical-align: middle !important;
  border-bottom: 1px solid #eef2f5 !important;
  line-height: 1.45 !important;
}
.bw-specs-table tr:last-child th,
.bw-specs-table tr:last-child td { border-bottom: 0 !important; }
.bw-specs-table th {
  width: 38%;
  background: #f3f9fd !important;
  color: var(--bw-blue-dark) !important;
  font-weight: 600 !important;
  font-size: 14px !important;
}
.bw-specs-table td { color: #1a1a1a !important; font-size: 15px !important; }
.bw-specs-table td code {
  background: #eef4fa !important;
  padding: 2px 7px !important;
  border-radius: 3px !important;
  font-size: 13px !important;
  color: var(--bw-blue-dark) !important;
}
/* (old uppercase mini-label h3 rule replaced by the bigger one near top of file) */
.bw-cfg h4 { margin: 1rem 0 .35rem !important; font-size: 16px !important; font-weight: 700 !important; }

/* Bigger product title */
.product_title.entry-title,
h1.product_title,
.single-product .summary h1 {
  font-size: 42px !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
  margin: 0 0 .75rem !important;
  color: var(--bw-text) !important;
}

/* ───── 3 dropdowns side by side, but open menu spans full width ───── */
.bw-dd-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .85rem;
  margin: 1rem 0 1.75rem;
  position: relative;   /* anchor for the wide popup menu */
}
.bw-dd { position: static; width: 100%; }

.bw-dd-btn {
  width: 100%;
  background: #fff !important;
  border: 2px solid var(--bw-border) !important;
  border-radius: var(--bw-radius);
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  font: inherit;
  text-align: left;
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem;
  transition: border-color .15s, box-shadow .15s;
  color: var(--bw-text) !important;
}
.bw-dd-btn:hover { border-color: var(--bw-blue) !important; }
.bw-dd.open .bw-dd-btn,
.bw-dd.active .bw-dd-btn {
  border-color: var(--bw-blue) !important;
  background: var(--bw-blue-light) !important;
  box-shadow: 0 0 0 3px rgba(51, 153, 204, 0.18);
}

.bw-dd-btn-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.bw-dd-label {
  font-size: 17px !important; font-weight: 600 !important; color: var(--bw-text) !important;
  line-height: 1.25;
}
.bw-dd-chosen {
  font-size: 15px !important; font-weight: 600 !important;
  color: var(--bw-blue-dark) !important;
  line-height: 1.25;
}
.bw-dd.active .bw-dd-chosen { color: var(--bw-blue-dark) !important; }
.bw-dd-caret {
  color: var(--bw-blue);
  flex-shrink: 0;
  transition: transform .2s;
  width: 18px; height: 18px;
}
.bw-dd-caret.open { transform: rotate(180deg); }

/* Dropdown menu */
.bw-dd-menu {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  max-height: 450px; overflow-y: auto;
  background: #fff;
  border: 2px solid var(--bw-blue);
  border-radius: var(--bw-radius);
  box-shadow: 0 12px 36px rgba(0,0,0,.18), 0 4px 8px rgba(0,0,0,.06);
  z-index: 60;
  padding: .35rem 0;
}
.bw-dd-item {
  width: 100%;
  display: flex; align-items: center; gap: 1rem;
  background: transparent !important;
  border: none !important;
  padding: 1rem 1.25rem;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--bw-text) !important;
  border-radius: 0;
  border-bottom: 1px solid #f0f3f7 !important;
  transition: background .12s;
}
.bw-dd-item:last-child { border-bottom: none !important; }
.bw-dd-item:hover { background: var(--bw-blue-light) !important; }
.bw-dd-item.active {
  background: var(--bw-blue) !important;
}
.bw-dd-item.active * { color: #fff !important; }

/* Left side : volume big + diam×height small below */
.bw-dd-item-info {
  flex: 1; display: flex; flex-direction: column; gap: 2px;
}
.bw-dd-vol {
  font-weight: 700 !important; font-size: 18px !important;
  color: var(--bw-text) !important; white-space: nowrap; line-height: 1.2;
}
.bw-dd-dim {
  font-size: 14px !important; color: #474747 !important; font-weight: 500 !important;
  line-height: 1.3;
}
.bw-dd-price {
  font-weight: 700 !important; font-size: 17px !important; color: var(--bw-text) !important; white-space: nowrap;
  flex-shrink: 0;
}
.bw-dd-item.active .bw-dd-vol, .bw-dd-item.active .bw-dd-dim, .bw-dd-item.active .bw-dd-price { color: #fff !important; }

/* Sky-blue scrollbar */
.bw-dd-menu::-webkit-scrollbar { width: 12px; }
.bw-dd-menu::-webkit-scrollbar-track { background: #eaf3fa; border-radius: 6px; }
.bw-dd-menu::-webkit-scrollbar-thumb {
  background: var(--bw-blue); border-radius: 6px;
  border: 2px solid #eaf3fa;
}
.bw-dd-menu::-webkit-scrollbar-thumb:hover { background: var(--bw-blue-dark); }
.bw-dd-menu { scrollbar-color: var(--bw-blue) #eaf3fa; scrollbar-width: thin; }

/* ───── Summary ───── */
.bw-summary {
  padding: 14px 18px;
  background: var(--bw-blue-light);
  border-left: 4px solid var(--bw-blue);
  margin: 18px 0;
  border-radius: var(--bw-radius);
  color: var(--bw-text);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 500;
}
.bw-summary strong { font-weight: 700; color: var(--bw-text); }
.bw-summary code {
  background: rgba(51, 153, 204, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 14px;
  color: var(--bw-blue-dark);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-weight: 600;
}

/* ───── Accessories : 2-column rows aligned with dropdowns ───── */
.bw-acc-list {
  display: flex; flex-direction: column;
  gap: .65rem;
  margin-top: .5rem;
}
.bw-acc {
  display: flex !important; align-items: center;
  gap: 22px; cursor: pointer;
  padding: 20px 22px !important;
  background: transparent;
  border: none !important;
  border-bottom: 1px solid var(--bw-border) !important;
  border-radius: 0;
  color: var(--bw-text) !important;
  font-size: 18px !important;
  line-height: 1.5 !important;
  font-weight: 400 !important;
  width: 100%;
  transition: none;
}
.bw-acc-list .bw-acc:last-child { border-bottom: none !important; }
.bw-acc.checked .bw-acc-name { color: var(--bw-blue-dark) !important; }
.bw-acc input[type=checkbox] {
  width: 28px !important; height: 28px !important;
  cursor: pointer;
  accent-color: var(--bw-blue);
  flex-shrink: 0;
  margin: 0 !important;
}
.bw-acc-img-wrap {
  width: 104px; height: 104px;
  border-radius: 50% !important;
  border: 3px solid var(--bw-blue) !important;
  overflow: hidden !important;
  flex-shrink: 0;
  background: transparent !important;
  display: inline-block;
  position: relative;
}
.bw-acc-img {
  width: 100% !important; height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  border: 0 !important; border-radius: 0 !important;
  background: transparent !important;
  transform: scale(1.5);
  transform-origin: center;
  display: block;
}
.bw-acc-name {
  flex: 1;
  font-size: 20px !important;
  font-weight: 500 !important;
  color: var(--bw-text) !important;
  line-height: 1.4 !important;
}
.bw-acc-price {
  font-size: 22px !important;
  font-weight: 600 !important;
  color: var(--bw-text) !important;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ───── Total + add to cart ───── */
.bw-total {
  padding: 1rem 0;
  background: transparent;
  border: none;
  margin: 1rem 0 .5rem;
  text-align: right;
  color: var(--bw-text) !important;
  display: flex; flex-direction: column; align-items: flex-end; gap: .1rem;
}
.bw-total-incl, .bw-total-excl {
  display: flex; align-items: baseline; gap: .65rem;
}
/* Excl. BTW : top, light grey, less prominent */
.bw-total-excl .bw-total-label {
  font-size: 15px !important; font-weight: 500 !important;
  color: #9aa3ad !important;
}
.bw-total-excl .bw-total-value {
  font-size: 17px !important; font-weight: 600 !important;
  color: #9aa3ad !important;
}
/* Incl. BTW : bottom, big, prominent blue */
.bw-total-incl .bw-total-label {
  font-size: 18px !important; font-weight: 700 !important;
  color: var(--bw-text) !important;
}
.bw-total-incl .bw-total-value {
  font-size: 38px !important; font-weight: 900 !important;
  color: var(--bw-blue-dark) !important;
}

.bw-add {
  font-size: 17px !important; padding: 14px 22px; font-weight: 500 !important;
  background: var(--bw-green) !important; color: #fff !important;
  border: none !important;
  border-radius: var(--bw-radius);
  cursor: pointer;
  display: inline-flex !important; align-items: center; justify-content: center;
  gap: 10px;
  min-width: 100%;
  line-height: 1.5 !important;
  transition: background .15s, transform .1s;
  box-shadow: 0 2px 8px rgba(76, 175, 80, .3);
}
.bw-add-icon { flex-shrink: 0; color: #fff; }
.bw-add:hover { background: #43a047 !important; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(76, 175, 80, .4); }
.bw-add:active { transform: translateY(0); }
.bw-add:disabled { background: #999 !important; cursor: not-allowed; transform: none; box-shadow: none; }
.bw-add-msg {
  margin-top: .8rem !important;
  padding: 12px 16px !important;
  background: #e7f7ea !important;
  border-left: 4px solid #4CAF50 !important;
  border-radius: 6px;
  color: #1a1a1a !important; font-size: 16px !important; font-weight: 600 !important;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.bw-add-cart-link {
  color: var(--bw-blue-dark) !important; text-decoration: none !important;
  font-weight: 700 !important; font-size: 15px !important;
}
.bw-add-cart-link:hover { text-decoration: underline !important; }

/* ───── Add-to-cart toast notification ───── */
.bw-toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 99999;
  display: flex; align-items: center; gap: 14px;
  background: #fff; color: #1a1a1a;
  padding: 16px 18px; padding-right: 12px;
  border-radius: 12px;
  border-left: 5px solid #4CAF50;
  box-shadow: 0 10px 35px rgba(0,0,0,.18), 0 4px 8px rgba(0,0,0,.06);
  max-width: 380px; min-width: 280px;
  opacity: 0; transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease;
  font-size: 15px; line-height: 1.35;
}
.bw-toast.show { opacity: 1; transform: translateY(0); }
.bw-toast-icon {
  width: 32px; height: 32px; flex-shrink: 0;
  background: #4CAF50; color: #fff;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px;
}
.bw-toast-body { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.bw-toast-body strong { color: #1a1a1a; font-size: 15px; }
.bw-toast-link { color: #39c; text-decoration: none; font-weight: 600; font-size: 13.5px; }
.bw-toast-link:hover { text-decoration: underline; }
.bw-toast-close {
  background: transparent !important; border: none !important; color: #9aa3ad !important;
  font-size: 22px !important; line-height: 1 !important; cursor: pointer;
  padding: 0 6px !important; margin: 0 !important;
  align-self: flex-start;
}
.bw-toast-close:hover { color: #1a1a1a !important; }
.bw-error {
  color: #b32d2e; background: #fdecea;
  padding: .85rem 1.1rem;
  border-left: 4px solid #b32d2e;
  border-radius: 6px;
  font-size: 1.1rem;
  font-weight: 600;
}

@media (max-width: 900px) {
  .bw-dd-grid { grid-template-columns: 1fr; }
  .bw-total { font-size: 1.9rem; }
}
