/* Hierarchical catalogue explorer. Load after styles.css. */
.header { position: sticky; top: 0; z-index: 10; background: var(--paper); box-shadow: 0 2px 12px #123c2e12; }
.home-button { position: fixed; left: 24px; bottom: 24px; z-index: 6; padding: 11px 17px; border: 1px solid #b8c8ab; border-radius: 30px; background: var(--paper); color: var(--green); box-shadow: 0 3px 18px #123c2e25; font-size: 12px; font-weight: 600; }
.drawer-navigation { display: flex; align-items: center; gap: 10px; }
.drawer-home { border: 1px solid #cbd4c6; border-radius: 5px; background: transparent; color: var(--green); padding: 8px 10px; font-size: 11px; }
@media(max-width:700px) { .home-button { left: 14px; bottom: 92px; padding: 10px 14px; font-size: 11px; } .drawer-navigation { gap: 7px; } .drawer-home { font-size: 10px; padding: 8px; } }
.header .brand { gap: 18px; }
.header .brand img.solanellas-logo { width: 195px; height: auto; max-height: 48px; object-fit: contain; }
.header .brand .collaboration { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding-left: 18px; border-left: 1px solid var(--line); }
.header .brand .collaboration small { font-size: 7px; letter-spacing: 1px; font-weight: 500; }
.header .brand img.manufacturer-logo { width: 68px; height: 30px; object-fit: contain; }
.access-card > img.solanellas-logo { width: 250px; max-width: 100%; margin-bottom: 12px; }
.access-partner { display: flex; align-items: center; gap: 14px; font-size: 10px; color: var(--muted); margin-bottom: 28px; }
.access-partner img { width: 65px; height: 30px; object-fit: contain; }
.footer-brands > img { width: 160px; height: auto; }
.footer-brands > div { display: flex; align-items: center; gap: 9px; font-size: 8px; margin-top: 7px; }
.footer-brands > div > img { width: 48px; height: 22px; object-fit: contain; }
@media(max-width:700px) {
 .header .brand { gap: 10px; }
 .header .brand img.solanellas-logo { width: 140px; max-height: 36px; }
 .header .brand .collaboration { padding-left: 10px; gap: 0; }
 .header .brand .collaboration small { display: none; }
 .header .brand img.manufacturer-logo { width: 46px; height: 25px; }
 .header { gap: 10px; }
 .header .cart-button { padding: 9px 10px; }
 .header .cart-button span { margin-left: 6px; }
 .footer-brands > img { margin-top: 0; }
 .footer-brands > div > img { margin-top: 0; }
}
@media(max-width:360px) { .header .brand img.solanellas-logo { width: 114px; } .header .brand img.manufacturer-logo { width: 38px; } .header .brand { gap: 7px; } }
.access-locked > :not(#access-screen):not(script):not(noscript) { display: none !important; }
body.access-locked { padding-bottom: 0; }
.access-screen { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: var(--green); }
.access-card { width: 100%; max-width: 430px; padding: 38px; background: var(--paper); border-radius: 12px; }
.access-card > img { width: 110px; margin-bottom: 28px; }
.access-card h1 { font-size: 30px; line-height: 1.15; letter-spacing: -1px; margin: 14px 0; }
.access-card > p { color: var(--muted); font-size: 13px; margin-bottom: 25px; }
.access-card input { letter-spacing: 8px; font-size: 22px !important; }
#access-error { color: #a04b31; font-size: 12px; min-height: 18px; }
.assigned-discount { background: var(--green); color: white; border-radius: 5px; padding: 10px 18px; font-size: 14px; font-weight: 600; white-space: nowrap; }
#logout { font-size: 11px; text-decoration: underline; }
.explorer-layout {
  display: flex;
  flex-direction: column;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 4.5% 42px;
  gap: 0;
}

.explorer-layout > .hero { display: none; }
.explorer-layout > .catalogue { order: 1; width: 100%; max-width: 1310px; padding: 34px 28px 42px; border: 0; }
.explorer-layout > .gift-section { order: 2; width: 100%; max-width: 1310px; padding: 24px 28px; border-top: 1px solid var(--line); }
.explorer-layout .closing { order: 3; width: calc(100% - 56px); }

#explorer { min-width: 0; }
.inline-order-summary { margin-top: 26px; padding: 20px; border: 1px solid #cad8bf; border-radius: 8px; background: #edf1e5; }
.inline-order-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 14px; }
.inline-order-heading h3 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.4px; }
.inline-order-heading p { margin: 4px 0 0; font-size: 11px; color: var(--muted); }
.inline-order-heading button { white-space: nowrap; }
.inline-order-table table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
.inline-order-table thead th { padding: 8px 10px; font-size: 10px; color: var(--muted); border-bottom: 1px solid #cbd6c1; }
.inline-order-table tbody th,.inline-order-table td { padding: 10px; border-bottom: 1px solid #dce3d4; vertical-align: top; }
.inline-order-table tbody th { font-size: 10px; font-weight: 500; white-space: nowrap; }
.inline-order-table th:last-child,.inline-order-qty { text-align: right; font-weight: 600; }
.inline-order-summary > .micro { margin: 12px 0 0; font-size: 10px; }
@media(max-width:700px) {
 .inline-order-summary { padding: 14px 10px; }
 .inline-order-heading { gap: 8px; }
 .inline-order-heading h3 { font-size: 16px; }
 .inline-order-heading button { padding: 8px; font-size: 10px; }
 .inline-order-table table { font-size: 10px; }
 .inline-order-table tbody th { font-size: 8px; white-space: normal; overflow-wrap: anywhere; }
 .inline-order-table tbody th,.inline-order-table td,.inline-order-table thead th { padding: 8px 5px; }
}
.family-group + .family-group { margin-top: 34px; padding-top: 28px; border-top: 1px solid var(--line); }
.family-group-heading { margin: 0 0 16px; }
.family-group-heading h3 { margin: 0 0 5px; font-size: 22px; font-weight: 600; letter-spacing: -.5px; }
.family-group-heading p { margin: 0; font-size: 12px; color: var(--muted); }
.explorer-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; color: var(--muted); font-size: 11px; }
.explorer-breadcrumb button { padding: 3px 0; border: 0; background: none; color: var(--green2); font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }
.explorer-breadcrumb button[aria-current="page"] { color: var(--ink); text-decoration: none; font-weight: 700; }
.explorer-breadcrumb .breadcrumb-separator { color: #aab4a7; }
.explorer-intro { max-width: 760px; margin: 0 0 27px; }
.explorer-intro h2 { margin: 0 0 8px; font-size: clamp(29px, 3.5vw, 42px); letter-spacing: -1.5px; }
.explorer-intro p { margin: 0; max-width: 660px; color: var(--muted); font-size: 14px; line-height: 1.7; }

.category-grid, .family-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.category-card, .family-card { min-width: 0; padding: 0; overflow: hidden; text-align: left; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 2px 8px #18362c08; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.category-card:hover, .family-card:hover { border-color: #9caf92; box-shadow: 0 8px 22px #18362c12; transform: translateY(-2px); }
.category-card:focus-visible, .family-card:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.category-picture { display: flex; align-items: center; justify-content: center; height: clamp(145px, 18vw, 225px); padding: 20px; background: #e9eddf; }
.category-picture img { width: 100%; height: 100%; object-fit: contain; }
.category-content { display: grid; gap: 6px; padding: 18px 20px 20px; }
.category-content small { color: var(--green2); font-size: 9px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; }
.category-content h3, .family-card h3 { margin: 0; color: var(--green); font-size: 20px; line-height: 1.25; font-weight: 600; }
.category-content p, .family-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.category-content span, .family-card span { display: inline-flex; align-items: center; gap: 8px; margin-top: 7px; color: var(--green2); font-size: 11px; font-weight: 700; }
.category-content span::after, .family-card span::after { content: none; }
.family-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); min-height: 145px; }
.family-card > img { width: 112px; height: 100%; min-height: 145px; padding: 12px; object-fit: contain; background: #f0f2ea; }
.family-card > div { display: flex; flex-direction: column; align-items: flex-start; padding: 17px 18px; }
.family-card h3 { font-size: 16px; }
.family-card p { margin-top: 6px; }
.family-card span { margin-top: auto; padding-top: 9px; }

.language-toggle { border: 1px solid #cbd4c6; border-radius: 5px; padding: 8px 10px; background: transparent; color: var(--green); font-size: 11px; font-weight: 700; white-space: nowrap; }
.language-toggle span { padding: 2px 3px; border-radius: 3px; opacity: .62; }
.language-toggle[data-language-current="ca"] span:first-child, .language-toggle[data-language-current="es"] span:last-child { background: #e9eddf; opacity: 1; }
.access-card { position: relative; }
.language-toggle.access-language { position: absolute; top: 20px; right: 20px; }
.gift-photo { display: block; width: 100%; height: 78px; margin: 8px 0 10px; border-radius: 5px; background: #fff; object-fit: contain; }
.gift-card { min-height: 200px; }
@media(max-width:700px) { .header .language-toggle { padding: 7px 8px; font-size: 10px; } .gift-card { min-height: 190px; } .gift-photo { height: 68px; margin: 6px 0 8px; } }

.family-heading { display: flex; align-items: center; gap: 19px; padding: 17px 20px; margin: 0 0 20px; background: #e9eddf; border: 1px solid #d9e0cd; border-radius: 8px; }
.family-heading > img { flex: 0 0 76px; width: 76px; height: 64px; object-fit: contain; background: #fff; border-radius: 5px; }
.family-heading > div { min-width: 0; }
.family-heading h3 { margin: 0 0 3px; color: var(--green); font-size: 19px; line-height: 1.3; }
.family-heading p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }

#catalogue-controls { margin-top: 26px; }
#catalogue-controls[hidden] { display: none !important; }
#catalogue-controls .tools { margin-bottom: 7px; }
.quick-search { display: flex; flex: 1; align-items: center; gap: 11px; min-height: 49px; padding: 0 15px; background: white; border: 1px solid var(--line); border-radius: 6px; }
.quick-search label.search { flex: 1; min-width: 0; border: 0; padding: 0; color: var(--muted); font-size: 11px; font-weight: 400; }
.quick-search input { width: 100%; min-width: 0; padding: 12px 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.quick-search input::placeholder { color: #9aa398; }
#catalogue-controls .advanced { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#catalogue-controls .price-note { margin: 10px 0 14px; }

#catalogue .section-top { margin-bottom: 19px; }
#catalogue .section-top h2 { font-size: 25px; }
#products.variant-list { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: white; }
.variant-row { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(90px, .6fr) minmax(130px, .8fr) minmax(110px, .6fr); align-items: center; gap: 18px; min-width: 0; padding: 16px 19px; border-bottom: 1px solid #e9ede5; }
.variant-row:last-child { border-bottom: 0; }
.variant-row:hover { background: #fbfcf8; }
.variant-description { min-width: 0; }
.variant-description .sku { display: block; margin-bottom: 4px; }
.variant-description h3 { margin: 0 0 6px; font-size: 13px; line-height: 1.4; font-weight: 600; }
.variant-details { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; color: var(--muted); font-size: 10px; }
.variant-details > span, .variant-details summary { display: inline-flex; padding: 3px 7px; border-radius: 3px; background: #f0f2ea; color: #586852; }
.variant-details details { margin: 0; }
.variant-details summary { cursor: pointer; }
.variant-details details > div { position: absolute; z-index: 2; max-width: 320px; padding: 12px; margin-top: 5px; border: 1px solid var(--line); border-radius: 5px; background: white; box-shadow: 0 5px 20px #18362c18; }
.variant-pack { color: var(--muted); font-size: 11px; line-height: 1.45; }
.variant-pack b { display: block; color: var(--ink); font-size: 12px; font-weight: 600; }
.variant-pack small { display: block; font-size: 9px; }
#products.variant-list:empty { display: none; }
.variant-action .add-variant { white-space: nowrap; padding: 10px 13px; min-height: 40px; }
.variant-price { min-width: 0; }
.variant-price .old-price { display: block; }
.variant-price .price { display: block; line-height: 1.2; }
.variant-price .price-caption { display: block; margin-top: 3px; }
.variant-action { display: flex; align-items: center; justify-content: flex-end; }
.variant-action .quantity { flex: 0 0 auto; }
.variant-action .add-button { flex: 0 0 42px; }
#products.variant-list .empty { margin: 12px; }

.explorer-layout .gift-section { background: transparent; }
.explorer-layout .gift-section .section-top { align-items: baseline; margin-bottom: 15px; }
.explorer-layout .gift-section .section-top h2 { font-size: 21px; }
.explorer-layout .gift-section .gift-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.explorer-layout .gift-section .gift-card { min-height: 130px; padding: 12px; }
.explorer-layout .gift-section .gift-icon { width: 28px; height: 30px; margin: 7px 0; }
.explorer-layout .gift-section .gift-card strong { font-size: 10px; min-height: 0; }
.explorer-layout .gift-section .gift-card small { font-size: 9px; }
.explorer-layout .gift-section > .micro { margin-top: 8px; }

@media (max-width: 1000px) {
  .explorer-layout { padding-right: 3%; padding-left: 3%; }
  .explorer-layout > .catalogue, .explorer-layout > .gift-section { padding-right: 20px; padding-left: 20px; }
  .category-grid, .family-grid { gap: 12px; }
  .family-card { grid-template-columns: 88px minmax(0, 1fr); }
  .family-card > img { width: 88px; }
  .variant-row { grid-template-columns: minmax(0, 1.7fr) minmax(70px, .5fr) minmax(110px, .7fr) 100px; gap: 12px; padding: 14px; }
  .variant-action .quantity button { min-width: 27px; }
  #catalogue-controls .advanced { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .explorer-layout .gift-section .gift-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .explorer-layout { padding: 0 0 28px; }
  .explorer-layout > .catalogue, .explorer-layout > .gift-section { padding: 25px 18px; }
  .explorer-layout > .gift-section { padding-top: 20px; }
  .explorer-layout .closing { width: calc(100% - 36px); margin: 0 18px 25px; }
  .explorer-breadcrumb { gap: 6px; margin-bottom: 15px; font-size: 10px; }
  .explorer-intro { margin-bottom: 20px; }
  .explorer-intro h2 { font-size: 30px; letter-spacing: -1px; }
  .explorer-intro p { font-size: 12px; }
  .category-grid, .family-grid { grid-template-columns: 1fr; gap: 10px; }
  .category-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); min-height: 118px; }
  .category-picture { height: 100%; min-height: 118px; padding: 11px; }
  .category-content { align-content: center; gap: 4px; padding: 12px 14px; }
  .category-content small { font-size: 8px; }
  .category-content h3 { font-size: 16px; }
  .category-content p { font-size: 10px; line-height: 1.45; }
  .category-content span { margin-top: 3px; font-size: 10px; }
  .family-card { grid-template-columns: 88px minmax(0, 1fr); min-height: 116px; }
  .family-card > img { width: 88px; min-height: 116px; padding: 10px; }
  .family-card > div { padding: 12px 14px; }
  .family-card h3 { font-size: 14px; }
  .family-card p { font-size: 10px; }
  .family-card span { padding-top: 5px; font-size: 9px; }
  .family-heading { gap: 12px; padding: 12px; margin-bottom: 14px; }
  .family-heading > img { flex-basis: 58px; width: 58px; height: 54px; }
  .family-heading h3 { font-size: 15px; }
  .family-heading p { font-size: 10px; }
  #catalogue-controls { margin-top: 20px; }
  #catalogue-controls .tools { align-items: stretch; }
  .quick-search { flex: 1 1 100%; min-height: 44px; padding: 0 10px; }
  .quick-search label { font-size: 10px; }
  .quick-search input { font-size: 11px; }
  #catalogue-controls .advanced { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; padding: 12px; }
  #catalogue-controls .advanced label { font-size: 10px; }
  #catalogue .section-top h2 { font-size: 21px; }
  .variant-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px 10px; padding: 13px 12px; }
  .variant-description { grid-column: 1 / -1; }
  .variant-description h3 { margin-bottom: 5px; font-size: 12px; }
  .variant-details { gap: 4px; font-size: 9px; }
  .variant-details > span, .variant-details summary { padding: 2px 5px; }
  .variant-pack { align-self: center; font-size: 9px; }
  .variant-pack strong { font-size: 10px; }
  .variant-price { align-self: center; }
  .variant-price .price { font-size: 18px; letter-spacing: -.4px; }
  .variant-price .old-price, .variant-price .price-caption { font-size: 8px; }
  .variant-action { align-self: center; }
  .variant-action .add-button { flex-basis: 34px; width: 34px; height: 34px; font-size: 20px; }
  .variant-action .quantity { height: 32px; }
  .variant-action .quantity button { min-width: 24px; height: 30px; font-size: 16px; }
  .variant-action .quantity input { width: 29px; font-size: 11px; }
  #products.variant-list .empty { margin: 8px; padding: 42px 14px; }
  .explorer-layout .gift-section .section-top { gap: 5px; }
  .explorer-layout .gift-section .section-top h2 { font-size: 19px; }
  .explorer-layout .gift-section .gift-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .explorer-layout .gift-section .gift-card { min-height: 128px; padding: 10px; }
}

@media (max-width: 360px) {
  .category-card { grid-template-columns: 92px minmax(0, 1fr); }
  .variant-row { gap: 7px; padding: 11px 9px; }
  .variant-price .price { font-size: 16px; }
  .variant-action .quantity button { min-width: 21px; }
  .variant-action .quantity input { width: 25px; }
}

@media (prefers-reduced-motion: reduce) {
  .category-card, .family-card { transition: none; }
}
