/* Accessible blue from the shop palette for text links, leaving product action buttons intact. */
body :is(.entry-content, .page-content, .woocommerce-product-details__short-description, .woocommerce-Tabs-panel) :is(p, li) > a:not(.button) {
  color: #09d8d8;
  text-decoration: underline;
  text-underline-offset: .15em;
}
body :is(.entry-content, .page-content, .woocommerce-product-details__short-description, .woocommerce-Tabs-panel) :is(p, li) > a:not(.button):is(:hover, :focus-visible) {
  color: #111 !important;
  text-decoration: underline;
}
body .footer a:is(:hover, :focus-visible), body .secondary-top-bar a:is(:hover, :focus-visible) { color: #09d8d8 !important; }

/* CUBELAB cyan: bright surfaces with dark type; deeper teal for readable text. */
:root { --cl-cyan: #64ffff; --cl-cyan-hover: #adfff1; --cl-ink: #102b2b; --cl-link: #09d8d8; }
body :is(a.button:not(.add_to_cart_button):not(.modal-opener), button.button, input.button, .wp-block-button__link, .gform_button) {
  background: var(--cl-cyan) !important;
  color: var(--cl-ink) !important;
  border: 1px solid transparent !important;
  border-radius: 999px !important;
  padding: 10px 20px !important;
  min-height: 40px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  box-shadow: none;
  transition: background-color .18s ease, color .18s ease;
}
body :is(a.button:not(.add_to_cart_button):not(.modal-opener), button.button, input.button, .wp-block-button__link, .gform_button):is(:hover,:focus-visible) {
  background: var(--cl-cyan-hover) !important;
  color: var(--cl-ink) !important;
}
body :is(.woocommerce-loop-product__title, .woocommerce-loop-category__title) a:hover,
body .woocommerce-breadcrumb a:hover { color: #111 !important; }
body .latest-products-tabs .tabs-title > a { color: #09d8d8 !important; }
body .latest-products-tabs .tabs-title > a:hover { color: #111 !important; }

/* Main navigation: black labels with an animated cyan underline. */
body .dropdown.menu .menu-item-main-menu > a {
 color: #111 !important;
 transition: background-color .18s ease, color .18s ease;
}
body .dropdown.menu .menu-item-main-menu > a:is(:hover, :focus-visible),
body .dropdown.menu .menu-item-main-menu.is-active > a {
 color: #111 !important;
 background-color: transparent !important;
 border-radius: 5px;
}
body .dropdown.menu .menu-item-main-menu > a:focus-visible { outline: 2px solid #09d8d8; outline-offset: 2px; }
body .dropdown.menu .menu-item-main-menu > .is-dropdown-submenu {
 padding: 6px;
 border: 1px solid #edf1f1;
 border-radius: 8px;
 background: #fff;
 box-shadow: 0 8px 24px rgba(16,43,43,.08);
}
body .dropdown.menu .menu-item-main-menu .is-dropdown-submenu-item > a {
 padding: 10px 12px;
 font-size: 14px;
 line-height: 1.4;
}
body .dropdown.menu > .is-dropdown-submenu-parent > a::after { border-width: 4px 4px 0; border-top-color: #111 !important; margin-top: 0; }
body .dropdown.menu > .is-dropdown-submenu-parent:hover > a::after { border-top-color: #09d8d8 !important; }

/* Readable footer navigation on its dark surface. */
body .footer .menu a { color: #fff !important; opacity: .55 !important; font-size: 13px !important; transition: opacity .25s ease, color .2s ease; }
body .footer:is(:hover, :focus-within) .menu a { opacity: 1 !important; }
body .footer .menu a:is(:hover, :focus-visible) { color: #09d8d8 !important; opacity: 1 !important; background: transparent !important; }

body .dropdown.menu .menu-item-main-menu > a { position: relative; background-color: transparent !important; }
body .dropdown.menu .menu-item-main-menu > a::before {
 content: ''; position: absolute; left: 16px; right: 16px; bottom: 12px;
 height: 2px; background: #09d8d8; border-radius: 1px;
 transform: scaleX(0); transform-origin: left; transition: transform .22s ease;
}
body .dropdown.menu .menu-item-main-menu > a:is(:hover, :focus-visible)::before,
body .dropdown.menu .menu-item-main-menu.is-active > a::before { transform: scaleX(1); }
body .dropdown.menu .is-dropdown-submenu-item > a::before { left: 12px; right: 12px; bottom: 4px; }
@media (prefers-reduced-motion: reduce) {
 body .dropdown.menu .menu-item-main-menu > a::before { transition: none; }
}

@media (hover: none) { body .footer .menu a { opacity: 1 !important; } }
@media (prefers-reduced-motion: reduce) { body .footer .menu a { transition: none; } }

/* Keep the first dropdown close to its navigation label. */
body .dropdown.menu > .menu-item-main-menu > .is-dropdown-submenu { top: calc(100% - 10px); }

/* Compact footer links retain their geometry in every interaction state. */
body .footer .menu a,
body .footer .menu a:is(:hover, :focus, :focus-visible, :active) {
 font-size: 13px !important;
 font-weight: 400 !important;
 line-height: 1.4 !important;
 padding-top: 6px !important;
 padding-bottom: 6px !important;
 transform: none !important;
 letter-spacing: normal !important;
}

/* Newsletter stays inside the contact column; button covers the field end. */
body .footer #gform_1 { display: flex !important; align-items: flex-start; width: 100%; max-width: 360px; }
body .footer #gform_1 .gform_body.gform-body { flex: 1 1 0 !important; width: 0 !important; min-width: 0 !important; }
body .footer #gform_1 input[type=email] { width: 100% !important; padding-right: 30px !important; border-radius: 999px 0 0 999px !important; height: 44px !important; }
body .footer #gform_1 .gform_footer.top_label { flex: 0 0 auto !important; width: auto !important; margin: 0 0 0 -24px !important; padding: 0 !important; position: relative; }
body .footer #gform_1 .gform_footer .button { position: static !important; width: auto !important; max-width: none !important; height: 44px !important; min-height: 44px; margin: 0 !important; padding: 10px 20px !important; white-space: nowrap; }

/* Override the legacy parent-hover 1em rule as well as link hover. */
body .footer .footer-inner .menu a,
body .footer .footer-inner:is(:hover, :focus-within) .menu a,
body .footer .footer-inner .menu a:is(:hover, :focus, :active) {
 font-size: 13px !important;
 font-weight: 400 !important;
 line-height: 1.4 !important;
 transform: none !important;
 opacity: 1 !important;
}
body .footer .footer-right { color: #333; transition: color 1s ease-in; }
body .footer:is(:hover, :focus-within) .footer-right { color: #999; }
body .footer .footer-inner .menu a { color: inherit !important; transition: color .15s ease-out !important; }
body .footer .footer-inner .menu a:is(:hover, :focus-visible) { color: #09d8d8 !important; }
@media (hover: none) { body .footer .footer-inner .menu a { color: #999 !important; } }
@media (prefers-reduced-motion: reduce) { body .footer .footer-right, body .footer .footer-inner .menu a { transition: none !important; } }

/* Product purchase control follows the newsletter pill shape. */
body.single-product div.product form.cart .cl-purchase-control { display: inline-flex; align-items: center; max-width: 100%; }
body.single-product div.product form.cart .cl-purchase-control .quantity { float: none !important; margin: 0 -22px 0 0 !important; flex: 0 0 92px; }
body.single-product div.product form.cart .cl-purchase-control .qty { width: 92px !important; height: 44px !important; margin: 0 !important; padding: 0 28px 0 12px !important; border: 0 !important; border-radius: 999px 0 0 999px !important; background: #f2f5f5; color: #152b2b; box-shadow: none; font-size: 14px; }
body.single-product div.product form.cart .cl-purchase-control .single_add_to_cart_button { position: relative; float: none !important; margin: 0 !important; height: 44px !important; min-height: 44px; border-radius: 999px !important; }
body.single-product div.product form.cart .cl-purchase-control .qty:focus-visible { outline: 2px solid #09d8d8; outline-offset: 2px; }

body.single-product .product_meta > .posted_in { display: block; }
body.single-product .product_meta > .posted_in + .posted_in { margin-top: 5px; }

/* Brand accent with black hover and no background for editorial links. */
body :is(.entry-content, .page-content, .woocommerce-product-details__short-description, .woocommerce-Tabs-panel) :is(p, li) > a:not(.button),
body :is(.cl-blog-back, .cl-blog-read, .cl-article-footer a, .collection-back),
body .product_meta a { color: #09d8d8 !important; }
body :is(.entry-content, .page-content, .woocommerce-product-details__short-description, .woocommerce-Tabs-panel) :is(p, li) > a:not(.button):is(:hover, :focus-visible),
body :is(.cl-blog-back, .cl-blog-read, .cl-article-footer a, .collection-back):is(:hover, :focus-visible),
body .product_meta a:is(:hover, :focus-visible),
body #cubelab-contact a:is(:hover, :focus-visible) {
 color: #111 !important;
 background-color: transparent;
 text-decoration: underline;
 text-decoration-color: currentColor;
 text-decoration-thickness: 2px;
 text-underline-offset: .18em;
}

/* Quiet loading indicator centered near the bottom of 3D previews. */
model-viewer::part(default-progress-bar) {
  top: auto;
  bottom: 24px;
  left: calc(50% - 70px);
  width: 140px;
  height: 2px;
  border-radius: 999px;
  background-color: rgba(9, 216, 216, 0.65);
  transform-origin: center;
}

/* Compact footer: keep equal breathing room above and below its content. */
body .footer .footer-inner {
 padding-top: 40px !important;
 padding-bottom: 40px !important;
}

/* Poster remains visible while the 3D library/model is loading. */
.viewer-wrapper > .cl-model-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.viewer-wrapper > .cl-model-start { position: absolute; z-index: 2; bottom: 24px; left: 50%; transform: translateX(-50%); border: 0; border-radius: 999px; padding: 12px 20px; background: var(--cl-cyan); color: #111; cursor: pointer; }
/* Reserve the viewer's existing dimensions before its custom element upgrades. */
.viewer-wrapper { position: relative; }
.viewer-wrapper > model-viewer { display: block; }

/* Align the footer with the page content instead of the old 80% wrapper. */
body .footer .footer-inner {
 width: 100%;
 max-width: 1240px;
 padding-left: 32px;
 padding-right: 32px;
 margin-left: auto;
 margin-right: auto;
 box-sizing: border-box;
}
body .footer .footer-inner > .grid-x {
 display: grid;
 grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
 gap: 48px;
}
body .footer .footer-inner :is(.footer-contacts, .footer-right) {
 width: auto;
 min-width: 0;
 margin-top: 0;
}
body .footer .footer-right nav > ul.menu {
 display: grid;
 grid-template-columns: repeat(2, minmax(0, 1fr));
 gap: 32px;
 justify-content: start;
}
@media (max-width: 960px) {
 body .footer .footer-inner > .grid-x { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 700px) {
 body .footer .footer-inner { padding-left: 20px; padding-right: 20px; }
 body .footer .footer-right nav > ul.menu { gap: 20px; }
}
@media (max-width: 380px) {
 body .footer .footer-right nav > ul.menu { grid-template-columns: 1fr; }
}

/* Newsletter banner explains the subscription before the form in the footer. */
body.home .newsletter-part h2 { color: #152b2b; font-size: clamp(28px, 3vw, 38px); line-height: 1.2; margin-bottom: 16px; }
body.home .newsletter-part > p { color: #263e43; font-size: 17px; line-height: 1.6; max-width: 620px; margin: 0 auto 24px; }

/* Recommended products: avoid compounded 90% widths inside the home row. */
body.home .wp-block-group.featured > .wp-block-group__inner-container {
 width: calc(100% - 64px) !important;
 max-width: 1176px;
 margin-left: auto;
 margin-right: auto;
}
body.home .wp-block-group.featured .woocommerce,
body.home .wp-block-group.featured ul.products {
 width: 100% !important;
 max-width: none;
 margin-left: 0;
 margin-right: 0;
}
@media (max-width: 700px) {
 body.home .wp-block-group.featured > .wp-block-group__inner-container { width: calc(100% - 40px) !important; }
}

/* Quiet, consistent product metadata with breathing room below purchase. */
body.single-product div.product .summary form.cart { margin-bottom: 24px !important; }
body.single-product div.product .summary .product_meta,
body.single-product div.product .summary .product_meta :is(span, a) {
 font-size: 13px !important;
 font-weight: 400;
 line-height: 1.6;
}

/* Hero: never expose another slide or its badge during startup/crossfade. */
body .hp-slider { background: #f7f7f7; isolation: isolate; }
body .hp-slider .header-banner-block { background: #f7f7f7 !important; isolation: isolate; }
body .hp-slider:not(.slick-initialized) > .header-banner-block ~ .header-banner-block { display: none !important; }
body .hp-slider.slick-initialized .header-banner-block:not(.slick-active) {
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Discount tabs: center the complete text column against the model. */
body .discount-tabs .tab-inner { align-items: center; }

/* Hero model composition: villa extends beyond the oval; AQUATIC sits lower. */
body .hp-slider model-viewer[data-model-src*="Vila_MSXS.glb"],
body .hp-slider model-viewer[data-model-src*="Vila_MSXS.glb"] + .cl-model-poster {
  transform: scale(1.28);
  transform-origin: center;
}
body .hp-slider model-viewer[data-model-src*="aquatic-optimized.glb"],
body .hp-slider model-viewer[data-model-src*="aquatic-optimized.glb"] + .cl-model-poster {
  transform: translateY(28px) scale(1.20);
  transform-origin: center;
}

/* A little more breathing room between desktop navigation links. */
@media (min-width: 1024px) {
  body .dropdown.menu > .menu-item-main-menu + .menu-item-main-menu { margin-left: 8px; }
}

/* Keep the hero discount badge and label above the enlarged 3D model. */
body .hp-slider .sale-badge { z-index: 4; }
body .hp-slider .sale-text { z-index: 5; }

/* Unified footer social icons, matching Instagram. */
body .footer .footer-bottom .images-wrapper a svg circle {
 fill: #64ffff !important;
 transition: fill .18s ease;
}
body .footer .footer-bottom .images-wrapper a svg path { fill: #000 !important; }
body .footer .footer-bottom .images-wrapper a:is(:hover, :focus-visible) svg circle {
 fill: #009fa8 !important;
}

/* Cart removal lives at the right edge, with a consistent circular control. */
body.woocommerce-cart .woocommerce-cart-form .product-remove { width: 52px; text-align: right; }
body.woocommerce-cart .woocommerce-cart-form td.product-remove a.remove {
 display: inline-flex; align-items: center; justify-content: center;
 width: 28px; height: 28px; margin: 0 0 0 auto; padding: 0;
 border: 0; border-radius: 50%; background: #000 !important;
 color: #fff !important; font-size: 22px; font-weight: 400; line-height: 1;
 text-decoration: none !important; transition: background-color .18s ease;
}
body.woocommerce-cart .woocommerce-cart-form td.product-remove a.remove:is(:hover,:focus-visible) {
 background: #d71920 !important; color: #fff !important;
}
body.woocommerce-cart .woocommerce-cart-form td.product-remove a.remove:focus-visible { outline: 2px solid #d71920; outline-offset: 3px; }
@media (max-width: 768px) {
 body.woocommerce-cart .woocommerce-cart-form td.product-remove { width: auto; text-align: right !important; }
}

/* Hero CTA matches the corporate CUBELAB primary button. */
body .hp-slider .header-banner-text > a.button {
 display: inline-flex; align-items: center; justify-content: space-between;
 gap: 30px; padding: 16px 23px !important; min-height: 56px;
 background: #64ffff !important; color: #091c1d !important;
 font-size: 13px; font-weight: 600; line-height: 1.2;
 text-decoration: none !important; transition: background .2s, transform .2s;
}
body .hp-slider .header-banner-text > a.button:is(:hover,:focus-visible) { background: #adfff1 !important; transform: translateY(-2px); }
body .hp-slider .header-banner-text > a.button .cl-cta-arrow { display: block; width: 20px; height: 20px; flex-shrink: 0; }
@media(max-width:520px) { body .hp-slider .header-banner-text > a.button { min-height: 50px; padding: 15px 18px !important; font-size: 12px; } }
@media(prefers-reduced-motion:reduce) { body .hp-slider .header-banner-text > a.button { transition: none; } }

/* Corporate cyan on featured-card surfaces; dark text remains legible. */
body.home .featured .woocommerce ul.products li.product:is(:hover,:focus-within) :is(.woocommerce-loop-product__title,.price) {
 background-color: #64ffff !important;
}

body.home .featured .woocommerce ul.products li.product:is(:hover,:focus-within) {
 background-color: var(--cl-cyan) !important;
}
body.home .featured .woocommerce ul.products li.product:is(:hover,:focus-within) :is(.woocommerce-loop-product__title,.price,.price .amount) {
 color: #091c1d !important;
}

/* Fluid pagination, scoped to the hero carousel. */
body .hp-slider > .slick-dots {
 bottom: 26px;
 gap: 0;
 padding: 0;
 z-index: 6;
}
body .hp-slider > .slick-dots li {
 display: flex;
 align-items: center;
 justify-content: center;
 min-width: 36px;
 min-height: 44px;
 margin: 0;
}
body .hp-slider > .slick-dots li .dot {
 width: 6px;
 height: 6px;
 margin: 0 12px;
 border: 0;
 border-radius: 999px;
 background: #c5cccc;
 transition: width .55s cubic-bezier(.22,1,.36,1), background-color .3s ease, transform .3s ease;
}
body .hp-slider > .slick-dots li.slick-active { min-width: 56px; }
body .hp-slider > .slick-dots li.slick-active .dot {
 width: 28px;
 background: #102b2b;
}
body .hp-slider > .slick-dots li:not(.slick-active):hover .dot {
 background: #64ffff;
 transform: scale(1.2);
}
body .hp-slider > .slick-dots li:focus-visible {
 outline: 2px solid #009fa8;
 outline-offset: 0;
 border-radius: 999px;
}
@media (prefers-reduced-motion: reduce) {
 body .hp-slider > .slick-dots li .dot { transition: none; }
}

/* Keep service links in their column without a redundant heading. */
.footer .primary-navigation > ul.menu > li:nth-child(2) > a { display: none !important; }

/* Tightly cropped, transparent Brno model in the collection promo. */
.trending-column .cl-brno-cutout { margin: 0; }
.trending-column .cl-brno-cutout img { display: block; width: 100%; max-width: none; height: auto; background: transparent; }

/* Keep newsletter consent readable and available without conditional JS. */
body .footer #gform_1 { display: grid !important; grid-template-columns: minmax(0,1fr) auto; row-gap: 14px; }
body .footer #gform_1 .gform_body.gform-body,
body .footer #gform_1 .gform_fields { display: contents !important; }
body .footer #gform_1 #field_1_1 { grid-column: 1; grid-row: 1; min-width: 0; }
body .footer #gform_1 .gform_footer.top_label { grid-column: 2; grid-row: 1; }
body .footer #gform_1 #field_1_3 { grid-column: 1 / -1; grid-row: 2; margin: 0; }
body .footer #gform_1 .ginput_container_consent { display: flex; align-items: flex-start; gap: 8px; }
body .footer #gform_1 .ginput_container_consent input[type=checkbox] { flex: 0 0 auto; margin-top: 3px; }
body .footer #gform_1 .gfield_consent_label { font-size: 12px; line-height: 1.5; color: #b8c6c6; }

/* Product enquiry uses the same primary action treatment as purchase. */
body.single-product .cl-aquatic-enquiry.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px !important; text-decoration: none; margin: 0 0 16px; }
