/* Algarve Bau's Mediterranean palette, adapted to the BlocoCelular catalogue.
   The production stylesheet supplies the existing product grids and controls. */
:root {
  color-scheme: light;
  --bc-paper: #fffefb;
  --bc-white: #fff;
  --bc-sand: #f4efe5;
  --bc-mist: #faf9f5;
  --bc-sage: #ecf4e5;
  --bc-line: #dce2d4;
  --bc-ink: #273227;
  --bc-text: #3d4a3b;
  --bc-muted: #566456;
  --bc-green: #4f7837;
  --bc-link: #41672e;
  --bc-deep-green: #36582a;
  --bc-rule: #8eaa7c;
  --bc-control-line: #788a71;
  --bc-shadow: 0 9px 24px rgba(52, 68, 44, .065);
}

body { background: var(--bc-paper); color: var(--bc-text); }
::selection { background: #d7e9c9; color: var(--bc-ink); }
body :is(a, button, summary, input, textarea, select):focus-visible {
  outline: 3px solid var(--bc-link);
  outline-offset: 3px;
}
button, input, select, textarea { accent-color: var(--bc-green); }

/* Navigation and the original BlocoCelular identity. */
.topbar { background: #f8f9f4; color: var(--bc-muted); border-bottom: 1px solid var(--bc-line); }
.site-header { background: rgba(255, 255, 255, .98); border-color: var(--bc-line); }
.brand strong, .footer-brand strong { color: var(--bc-ink); }
.brand small { color: var(--bc-link); }
.toplinks a, .toplinks a:hover { color: var(--bc-link); text-decoration-color: var(--bc-rule); }
.main-nav > a, .lang a { color: var(--bc-text); }
.main-nav > a:hover, .lang a:hover { color: var(--bc-deep-green); background: #f1f5ec; }
.main-nav > a.active {
  background: var(--bc-sage) !important;
  color: var(--bc-deep-green) !important;
  box-shadow: inset 0 -2px 0 var(--bc-rule);
}
.lang { border-color: var(--bc-line); }
.lang a.active, .lang a[aria-current="page"] { background: #e3eedc; color: var(--bc-deep-green); }
.cart-count { background: var(--bc-green); color: white; }
.menu-btn { background: var(--bc-white); color: var(--bc-link); border-color: var(--bc-control-line); }
.menu-btn:hover { background: var(--bc-sage); }
@media (max-width: 1240px) {
  .main-nav { background: var(--bc-paper) !important; border-top-color: var(--bc-line) !important; box-shadow: 0 18px 24px rgba(50, 65, 44, .1); }
  .main-nav .lang { border-top-color: var(--bc-line) !important; }
}

/* Retain the entire architectural photograph and its manufacturer credit. */
.hero, .page-hero {
  color: var(--bc-ink);
  background: linear-gradient(145deg, var(--bc-paper) 12%, #f9f7f1 69%, var(--bc-sand));
  border-bottom: 1px solid var(--bc-line);
}
.hero-grid {
  padding-block: clamp(2.8rem, 4.1vw, 4rem);
  gap: clamp(2rem, 5vw, 5rem);
}
.hero-grid > *, .product-detail > * { min-width: 0; }
.hero h1, .page-hero h1 {
  color: var(--bc-ink);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.039em;
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: auto;
}
.hero h1 { font-size: clamp(2.4rem, 4.45vw, 4.55rem); }
.page-hero { padding-block: clamp(2.7rem, 4.5vw, 4.7rem); }
.page-hero h1 { font-size: clamp(2.45rem, 4vw, 4.2rem); }
.hero p, .page-hero p { color: var(--bc-muted); }
.hero p { line-height: 1.65; }
.hero p.site-context, .page-hero .site-context { color: var(--bc-muted) !important; }
.hero p.site-context { border-left: 2px solid #b6c9a5; padding-left: 1rem; }
.eyebrow, .hero .eyebrow, .article-kicker, .portal-phase { color: var(--bc-link); }
.hero-photo {
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  background: var(--bc-white);
  border: 1px solid #e4e5d9;
  padding: 6px;
  border-radius: 8px;
  box-shadow: 0 16px 42px rgba(48, 64, 43, .12);
}
.hero-photo img {
  max-height: clamp(27rem, 39vw, 35rem);
  border-radius: 4px;
  background: var(--bc-mist);
  filter: none;
  box-shadow: none;
}
.hero-photo::after {
  inset: auto 15px 15px auto;
  width: 104px;
  height: 39px;
  border-radius: 3px;
  box-shadow: 0 3px 9px rgba(48, 64, 43, .12);
}
@media (max-width: 1020px) {
  .hero-photo img { max-height: 29rem; }
}
@media (max-width: 650px) {
  .hero-photo img { max-height: min(108vw, 26rem) !important; }
  .hero-photo::after { width: 84px; height: 32px; inset: auto 12px 12px auto; }
  .hero-grid { gap: 1.6rem; }
}
.breadcrumbs, .breadcrumbs a { color: var(--bc-muted); }
.breadcrumbs a:hover { color: var(--bc-link); text-decoration: underline; }

.section { background: var(--bc-paper); }
.section.alt { background: var(--bc-mist); }
.section.dark, .section.alt.yard-section { background: var(--bc-sage); color: var(--bc-ink); }
.hero + .section { background: var(--bc-white); }
.section h2, .section-head h2, .prose h2, .guide-hub-heading, .catalog-section-title {
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.024em;
  color: var(--bc-ink);
}
:is(h3, h4, .price, .section-title-compact), .prose h3 { color: var(--bc-ink); }
.prose, .article-list li, .policy-list, .policy-list li,
.workflow-arrow div, .family-card, .guide-card, .product-card,
.benefit-copy strong, .v417-flow-copy strong { color: var(--bc-text); }
.section-head p, .section.dark .section-head p, .trust-item span, .product-body p,
.category-card p, .guide-card p, .policy-card p, .doc-card p, .faq p, .prose .lead,
.quickfact span, .portal-tile small, .family-card span, .photo-card figcaption,
.benefit-copy span, .article-links, .guide-source-note, .lang-context, .field .hint,
.small-note, .image-caption, .indexing-note, .contact-method span, .v417-benefits-list,
.v417-flow-copy span, .v416-dimension-card p, .v417-tech-panel p, .v417-tech-panel > p,
.family-data-panel .small-note, .v418-current-stock figcaption, .v418-zoom-hint,
.order-qty-note, .v51-machine-drawings figcaption, .v423-family-spec b { color: var(--bc-muted); }
.family-card-size { color: var(--bc-muted) !important; }
.trust-item strong, .benefit-language, .v423-family-spec span { color: var(--bc-deep-green); }

/* White product and editorial surfaces over warm paper and pale sage. */
:is(.card, .product-card, .photo-card, .trust-grid, .category-card, .family-card,
    .guide-card, .benefit-item, .quickfact, .portal-tile, .flow-step, .panel,
    .doc-card, .policy-card, .sidebar-card, .profile-card, .about-point,
    .technical-drawing, .v416-dimension-card, .v416-supply-card, .v417-tech-panel,
    .v416-technical-drawing, .family-data-panel, .yard-location-card),
.workflow-arrow div, .faq details, .faq details.guide-faq, .v51-machine-drawings figure {
  border-color: var(--bc-line);
  border-radius: 8px;
  background: var(--bc-white);
}
:is(.benefit-item, .contact-grid .panel, .yard-location-card) { box-shadow: var(--bc-shadow); }
.family-card:hover, .guide-card:hover, .category-card:hover {
  border-color: #b4c7a9; box-shadow: 0 8px 22px rgba(54, 72, 44, .10);
}
.trust-item, .family-card .family-thumb, .v423-family-spec, .v418-current-stock,
.about-point-image, .guide-source-note, .history-item, .totals-box,
.totals-box .total-row:last-child, .contact-method, .v416-create-account-cta {
  border-color: var(--bc-line);
}
.product-photo, .detail-image, .family-card .family-thumb, .guide-card .guide-thumb,
.v418-dim-thumb, .v418-sidebar-family, .family-product-card-img { background-color: #f5f2eb; }
.benefit-icon, .v418-supply-icon, .contact-method > div:first-child {
  background: #f1f6ed; color: var(--bc-link); border-color: #dce8d7; border-radius: 8px;
}
.pill, .status-badge, .primary-market, .category-card .num, .guide-card .guide-topic,
.v418-stock-badge { background: var(--bc-sage); color: var(--bc-link); }
.status-badge.current, .pdf-icon { background: #657d43; color: white; }
.pdf-icon { box-shadow: none; }
.generic-label, .family-visual-note {
  background: rgba(255, 254, 251, .97); color: var(--bc-text); border: 1px solid var(--bc-line);
}
.notice, .section .site-context, .policy-meta, .cross-site-box, .account-help,
.v417-account-note, .profile-card .saved-profile, .last-submission {
  background: #f1f6ed; border-color: var(--bc-line); color: var(--bc-text) !important; border-radius: 5px;
}
.notice, .section .site-context, .policy-meta, .cross-site-box, .profile-card .saved-profile {
  border-left-color: var(--bc-rule);
}
.notice.account-required, .policy-meta { background: var(--bc-sand); border-left-color: #ab8a55; }
.business-backing {
  background: linear-gradient(115deg, var(--bc-sage), #f7f8ef);
  color: var(--bc-text); border-color: var(--bc-line); border-radius: 8px;
}
.business-backing p { color: var(--bc-muted); }
.article-table th { background: #f1f5ec; color: var(--bc-text); }
.spec-table, .spec-table td, .cart-table :is(th, td) { border-color: var(--bc-line); }
.spec-table td:first-child, .family-data-table td:first-child { color: var(--bc-text); }
.spec-table { border-radius: 8px; }
.price-panel {
  background: var(--bc-sage); border: 1px solid #d7e2cf; color: var(--bc-ink); border-radius: 8px;
}
.price-panel .price, .price .price-gross { color: var(--bc-ink); }
.price small, .price .price-net, .price-panel .price .price-net { color: var(--bc-muted); }
.flow-step b, .workflow-arrow b { background: var(--bc-green); color: white; }

/* Keep links and controls recognisable on light surfaces in every language. */
.link-arrow, .tech-doc-link, .tech-doc-link:hover, .inline-action-link, .yard-meta-link,
.inline-action-link:hover, .yard-meta-link:hover, .contact-method span a,
.contact-method a, .v417-terms a { color: var(--bc-link); }
.inline-action-link, .yard-meta-link, .contact-method a, .contact-method span { text-decoration-color: var(--bc-rule); }
.section-head .link-arrow:hover { background: var(--bc-sage); }
a.link-arrow:hover, a.tech-doc-link:hover { text-decoration: underline; text-underline-offset: .22em; }
.btn, .add-order, .filter-chip, .menu-btn, .tech-lightbox__close { border-radius: 5px; }
.btn { box-shadow: none; }
.btn:hover { transform: none; filter: none; box-shadow: var(--bc-shadow); }
.btn-primary, .btn-dark, .add-order, .filter-chip.active {
  background: var(--bc-green); color: white; border-color: var(--bc-green);
}
.btn-primary:hover, .btn-dark:hover, .add-order:hover, .filter-chip.active:hover {
  background: var(--bc-deep-green); color: white; border-color: var(--bc-deep-green);
}
.btn-gold, .btn-light, .btn-outline, .filter-chip {
  background: var(--bc-white); color: var(--bc-link); border-color: var(--bc-control-line);
}
.btn-gold:hover, .btn-light:hover, .btn-outline:hover, .filter-chip:hover {
  background: var(--bc-sage); color: var(--bc-deep-green); border-color: var(--bc-rule);
}
.section:not(.dark) .actions .btn-outline, .prose .actions .btn-outline,
.section:not(.dark) .btn-outline, .prose .btn-outline, .cross-site-box .btn-outline {
  color: var(--bc-link) !important; border-color: var(--bc-control-line) !important; background: var(--bc-white) !important;
}
.section:not(.dark) .actions .btn-outline:hover, .prose .actions .btn-outline:hover,
.section:not(.dark) .btn-outline:hover, .prose .btn-outline:hover, .cross-site-box .btn-outline:hover {
  color: var(--bc-deep-green) !important; border-color: var(--bc-rule) !important; background: var(--bc-sage) !important;
}
.field :is(input, select, textarea), .filterbar input, .cart-table input,
.order-qty-controls :is(input, select), .bc-fulfilment-choice select, .auth-preview .card form input {
  background: var(--bc-white); border-color: var(--bc-control-line); color: var(--bc-ink); border-radius: 5px;
}
.field :is(input, select):required { border-left-color: var(--bc-rule); }
.order-qty-controls label { color: var(--bc-text); }
button:disabled, input:disabled, select:disabled { cursor: not-allowed; }
.whatsapp-float { background: #33744b; color: white; box-shadow: 0 5px 16px rgba(39, 68, 46, .20); }
.whatsapp-float:hover { background: #285f3b; }

/* Technical drawings stay white and visually distinct in the expanded viewer. */
.tech-lightbox { background: rgba(46, 59, 45, .66); }
.tech-lightbox__stage { background: var(--bc-white); border-color: var(--bc-line); border-radius: 8px; }
.tech-lightbox__bar { background: var(--bc-mist); color: var(--bc-ink); border-color: var(--bc-line); }
.tech-lightbox__bar span { color: var(--bc-muted); }
.tech-lightbox__close { border-color: var(--bc-control-line); color: var(--bc-link); }
.tech-lightbox__close:hover { background: var(--bc-sage); }

.footer { background: #f8f7f1; border-top: 1px solid var(--bc-line); color: var(--bc-text); }
.footer h4, .footer-backing strong { color: var(--bc-deep-green); }
.footer :is(p, a), .footer-brand p, .footer-bottom { color: var(--bc-muted); }
.footer a:hover, .footer .footer-action-link:hover { color: var(--bc-deep-green); }
.footer .footer-action-link, .footer .contact-link { color: var(--bc-link); text-decoration-color: var(--bc-rule); }
.footer-yard-note { color: var(--bc-text); }
.footer-bottom, .footer-backing { border-color: var(--bc-line); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}
