/*
Theme Name: Cun Style Woostify Child
Description: Update-safe global shop frame and accessibility layer for store.cun.cc.
Author: Cun Style
Template: woostify
Version: 1.0.50
Text Domain: cun-style-woostify-child
*/

:root {
  --cs-frame-dark: #111111;
  --cs-frame-raised: #1a1a1a;
  --cs-frame-cream: #e8e0ce;
  --cs-frame-warm: #f4f0e8;
  --cs-frame-orange: #e05c00;
  --cs-frame-muted: #a39b8d;
  --cs-frame-border: #2a2a2a;
}

.topbar {
  color: var(--cs-frame-cream);
  background: var(--cs-frame-dark);
  border-bottom: 1px solid var(--cs-frame-border);
}

#masthead,
#masthead .site-header-inner {
  color: var(--cs-frame-cream);
  background: rgb(17 17 17 / 96%);
  border-bottom: 1px solid var(--cs-frame-border);
}

#masthead .custom-logo {
  content: url("assets/images/cun-style-primary-dark.svg");
  width: auto;
  height: 48px;
  max-width: min(100%, 220px);
  object-fit: contain;
  filter: none;
  opacity: 1;
}

#masthead .custom-mobile-logo {
  content: url("assets/images/cun-style-symbol-dark.svg");
  width: 48px;
  height: auto;
  max-height: 40px;
  object-fit: contain;
  filter: none;
  opacity: 1;
}

#masthead .main-navigation a,
#masthead .site-tools a,
#masthead .toggle-sidebar-menu-btn,
.sidebar-menu a {
  color: var(--cs-frame-cream);
}

#masthead .main-navigation a:hover,
#masthead .main-navigation a:focus-visible,
#masthead .site-tools a:hover,
#masthead .site-tools a:focus-visible,
.sidebar-menu a:hover,
.sidebar-menu a:focus-visible {
  color: var(--cs-frame-warm);
}

#masthead .current-menu-item > a,
#masthead .current_page_item > a {
  color: var(--cs-frame-cream);
  box-shadow: inset 0 -3px var(--cs-frame-orange);
}

#masthead a:focus-visible,
#masthead [role="button"]:focus-visible,
#colophon a:focus-visible,
.sidebar-menu a:focus-visible {
  outline: 3px solid var(--cs-frame-orange);
  outline-offset: 3px;
}

#masthead .theme-item-count,
#masthead .shop-cart-count {
  color: var(--cs-frame-dark);
  background: var(--cs-frame-orange);
  font-weight: 800;
}

.sidebar-menu {
  color: var(--cs-frame-cream);
  background: var(--cs-frame-dark);
}

.sidebar-menu .main-navigation,
.sidebar-menu .sidebar-menu-bottom {
  border-color: var(--cs-frame-border);
}

#colophon,
#colophon .site-footer-widget,
#colophon .site-info {
  color: var(--cs-frame-muted);
  background: var(--cs-frame-dark);
}

#colophon {
  border-top: 1px solid var(--cs-frame-border);
}

#colophon .widget-title {
  color: var(--cs-frame-cream);
  font-size: 16px;
  font-weight: 800;
}

#colophon a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--cs-frame-muted);
  text-underline-offset: 4px;
}

#colophon a:hover,
#colophon a:focus-visible {
  color: var(--cs-frame-cream);
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  #masthead *,
  .sidebar-menu *,
  #colophon * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}


/* Product pages: full-width footer with the existing 1200px content measure. */
body.single-product.site-boxed-container #view {
  width: 100%;
  max-width: none;
}
body.single-product.site-boxed-container #view > #content {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
}

/* Match the description panel to the product page content container. */
body.single-product .woocommerce-tabs #tab-description {
  width: 100%;
  max-width: none;
}

/* Keep the Type-I hero heading on one line at desktop and mobile widths. */
body.single-product .cs-type-i .cs-type-i__headline {
  max-width: none;
  font-size: clamp(18px, 5vw, 64px) !important;
  white-space: nowrap;
}

/* Readable subheadings on the dark connection-guide background. */
body.single-product .cs-type-i__manual .cs-type-i__reading > h3 {
  color: #e8e0ce;
}

/* Extend every product gallery/purchase background to the viewport edges. */
body.single-product #content > .content-top,
body.single-product .product-page-container {
  position: relative;
}
body.single-product #content > .content-top::before,
body.single-product .product-page-container::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: #f4f0e8;
  box-shadow: 0 0 0 100vmax #f4f0e8;
  clip-path: inset(0 -100vmax);
}

/* Wider feature cards and a separate connection warning. */
body.single-product .cs-type-i__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
body.single-product .cs-type-i__card:last-child {
  grid-column: 1 / -1;
}
body.single-product .cs-type-i p.cs-type-i__notice {
  margin-top: 24px;
}

/* SHOP-15: keep Type-I eyebrow text legible on dark and light sections. */
body.single-product .cs-type-i__eyebrow {
  color: #f4f0e8 !important;
}

body.single-product .cs-type-i__section.cs-type-i__light .cs-type-i__eyebrow {
  color: #a34100 !important;
}

body.single-product .woocommerce-tabs .tabs [role="tab"][aria-selected="true"] {
  color: #a34100 !important;
}

/* SHOP-15: distinguish the short-description policy link without color alone. */
body.single-product .woocommerce-product-details__short-description a,
body.single-product .product_meta a {
  text-decoration-line: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.15em;
}
@media (max-width: 680px) {
  body.single-product .cs-type-i__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Keep mobile navigation readable against the dark drawer. */
#cs-mobile-navigation .main-navigation a {
  color: var(--cs-frame-cream);
}
#cs-mobile-navigation .main-navigation a .menu-item-text {
  color: inherit;
}
#cs-mobile-navigation .main-navigation a:hover,
#cs-mobile-navigation .main-navigation a:focus-visible {
  color: var(--cs-frame-warm);
}

/* Brand checkout: visual styling only; WooCommerce owns form and payment behavior. */
body.woocommerce-checkout:not(.woocommerce-order-received),
body.woocommerce-checkout:not(.woocommerce-order-received) #view {
  background: #f4f0e8;
  color: #111111;
}
body.woocommerce-checkout .multi-step-checkout {
  background: #e8e0ce;
  border-bottom: 1px solid #d5cbb7;
  padding: 22px 12px;
}
body.woocommerce-checkout .multi-step-item { color: #595348; }
body.woocommerce-checkout .multi-step-item.active { color: #111111; font-weight: 700; }
body.woocommerce-checkout .wc-block-checkout { padding-top: 36px; padding-bottom: 56px; }
body.woocommerce-checkout .wc-block-checkout__main,
body.woocommerce-checkout .wc-block-checkout__sidebar { min-width: 0; }
body.woocommerce-checkout .wc-block-components-checkout-step {
  background: #fffdf8;
  border: 1px solid #d5cbb7;
  border-radius: 12px;
  padding: 26px;
  margin-bottom: 22px;
  box-shadow: 0 4px 16px rgb(17 17 17 / 3%);
}
body.woocommerce-checkout .wc-block-components-checkout-step__title {
  color: #111111;
  font-weight: 700;
  border-left: 4px solid #e05c00;
  padding-left: 12px;
  line-height: 1.5;
}
body.woocommerce-checkout .wc-block-components-text-input input,
body.woocommerce-checkout .wc-block-components-combobox .components-combobox-control__input,
body.woocommerce-checkout .wc-block-components-textarea {
  background: #ffffff;
  color: #111111;
  border-color: #9b9281;
  border-radius: 6px;
  font-size: 16px;
}
body.woocommerce-checkout .wc-block-checkout input:focus,
body.woocommerce-checkout .wc-block-checkout select:focus,
body.woocommerce-checkout .wc-block-checkout textarea:focus {
  outline: 2px solid #e05c00;
  outline-offset: 2px;
}
body.woocommerce-checkout .wp-block-woocommerce-checkout-order-summary-block {
  background: #fffdf8;
  border: 1px solid #d5cbb7;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgb(17 17 17 / 5%);
}
body.woocommerce-checkout .wc-block-components-checkout-order-summary__title {
  background: #111111;
  color: #e8e0ce;
  padding: 20px 24px;
  border-bottom: 4px solid #e05c00;
}
body.woocommerce-checkout .wc-block-components-checkout-order-summary__title-text {
  color: #e8e0ce;
  font-weight: 700;
}
body.woocommerce-checkout .wc-block-components-totals-footer-item {
  background: #e8e0ce;
  color: #111111;
}
body.woocommerce-checkout .wc-block-components-checkout-place-order-button {
  background: #e05c00 !important;
  color: #111111 !important;
  border: 2px solid #e05c00;
  border-radius: 8px;
  min-height: 54px;
  font-weight: 700;
}
body.woocommerce-checkout .wc-block-components-checkout-place-order-button:hover {
  background: #f07824 !important;
  border-color: #f07824;
}
body.woocommerce-checkout .wc-block-components-checkout-place-order-button:focus-visible {
  outline: 3px solid #111111;
  outline-offset: 3px;
}
body.woocommerce-checkout .wc-block-checkout__terms { color: #39352f; line-height: 1.8; }
body.woocommerce-checkout .wc-block-checkout a { text-underline-offset: 3px; }
@media (max-width: 680px) {
  body.woocommerce-checkout .wc-block-checkout { padding-top: 20px; padding-bottom: 32px; }
  body.woocommerce-checkout .wc-block-components-checkout-step { padding: 18px 14px; border-radius: 8px; margin-bottom: 16px; }
  body.woocommerce-checkout .wc-block-components-checkout-order-summary__title { padding: 18px 16px; }
  body.woocommerce-checkout .wc-block-components-checkout-step__title { font-size: 20px; }
}

/* Checkout refinement: full-width step band, unified summary and strong action contrast. */
body.woocommerce-checkout #view { width: 100%; max-width: none; margin-inline: 0; }
body.woocommerce-checkout #content { width: 100%; max-width: 1200px; margin-inline: auto; }
body.woocommerce-checkout .multi-step-checkout { width: 100%; }
body.woocommerce-checkout .wc-block-components-checkout-order-summary__title { margin: 0; }
body.woocommerce-checkout .wc-block-components-checkout-order-summary__title-text { margin: 0; font-size: 20px; line-height: 1.5; }
body.woocommerce-checkout .wc-block-components-checkout-order-summary__content > .wc-block-components-totals-wrapper:has(> .wc-block-components-totals-footer-item) {
  margin: 0;
  padding: 22px 20px;
  background: #e8e0ce;
  border-top: 1px solid #c9bfa9;
}
body.woocommerce-checkout .wc-block-components-totals-footer-item {
  padding: 0;
  gap: 8px;
  align-items: baseline;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
}
body.woocommerce-checkout .wc-block-components-totals-footer-item__description:empty { display: none; }
body.woocommerce-checkout .wc-block-components-checkout-place-order-button {
  background: #111111 !important;
  color: #f4f0e8 !important;
  border: 2px solid #e05c00;
  min-height: 60px;
  font-size: 17px;
  line-height: 1.5;
  box-shadow: 0 4px 12px rgb(17 17 17 / 12%);
}
body.woocommerce-checkout .wc-block-components-checkout-place-order-button .wc-block-components-button__text,
body.woocommerce-checkout .wc-block-components-checkout-place-order-button__text { color: inherit; font-size: inherit; font-weight: 700; }
body.woocommerce-checkout .wc-block-components-checkout-place-order-button:hover { background: #2a2a2a !important; color: #ffffff !important; border-color: #e05c00; }

/* WooCommerce moves the summary into a separate wrapper on small screens. */
body.woocommerce-checkout .checkout-order-summary-block-fill-wrapper { padding: 0; margin-bottom: 24px; }
body.woocommerce-checkout .checkout-order-summary-block-fill { border: 0; border-radius: 0; }
body.woocommerce-checkout .checkout-order-summary-block-fill-wrapper > .wc-block-components-checkout-step__heading {
  margin: 0; padding: 18px 20px; background: #111111; border-bottom: 4px solid #e05c00;
}
body.woocommerce-checkout .checkout-order-summary-block-fill-wrapper .wc-block-components-checkout-step__title {
  margin: 0; padding: 0; border: 0; color: #e8e0ce; font-size: 20px; line-height: 1.5;
}
body.woocommerce-checkout .checkout-order-summary-block-fill > .wc-block-components-totals-wrapper:has(> .wc-block-components-totals-footer-item) {
  margin: 0; padding: 22px 20px; background: #e8e0ce; border-top: 1px solid #c9bfa9;
}
body.woocommerce-checkout .wc-block-components-totals-footer-item > .wc-block-components-totals-item__description:empty { display: none; }

/* Keep WooCommerce's sidebar summary at the top; hide the extra fill copy. */
@media (max-width: 782px) {
  body.woocommerce-checkout .wc-block-checkout__main .wp-block-woocommerce-checkout-order-summary-block.checkout-order-summary-block-fill-wrapper {
    display: none !important;
  }
}

/* Mobile sidebar summary: keep the card inside the viewport and pad its rows. */
@media (max-width: 680px) {
  body.woocommerce-checkout .wc-block-checkout__sidebar .wp-block-woocommerce-checkout-order-summary-block {
    box-sizing: border-box;
    min-width: 0;
    width: auto;
    max-width: calc(100% - 14px);
    margin-inline-end: 14px;
  }
  body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-order-summary,
  body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-totals-coupon,
  body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-totals-item {
    padding-inline: 16px;
  }
}

/* Shared full-width footer; retain the established content measure on boxed pages. */
body.site-boxed-container #view { width: 100%; max-width: none; margin-inline: 0; }
body.site-boxed-container #view > #content { width: 100%; max-width: 1200px; margin-inline: auto; }
#colophon { width: 100%; max-width: none; }
body.home #colophon { margin-top: 0; }
/* Account dropdown uses dark text on a warm light panel. */
#masthead .my-account .subbox { background: #f4f0e8; color: #111111; border: 1px solid #d5cbb7; }
#masthead .my-account .subbox a { color: #111111; font-weight: 600; }
#masthead .my-account .subbox a:hover,
#masthead .my-account .subbox a:focus-visible { background: #e8e0ce; color: #111111; text-decoration: underline; }

/* Keep the account panel inside the viewport at narrower desktop widths. */
#masthead .my-account .subbox { left: auto; right: 0; }

/* Keep the account submenu available to keyboard users as focus enters it. */
#masthead .my-account:focus-within .subbox {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* Keep the cart CTA legible when the parent theme changes link hover colors. */
body.woocommerce-cart .wc-block-cart__submit-button {
  background: #32373c;
  color: #ffffff;
}
body.woocommerce-cart .wc-block-cart__submit-button:hover,
body.woocommerce-cart .wc-block-cart__submit-button:focus-visible {
  background: #a84300;
  color: #ffffff;
}
body.woocommerce-cart .wc-block-cart__submit-button .wc-block-components-button__text {
  color: inherit;
}
body.woocommerce-cart .wc-block-cart__submit-button:focus-visible {
  outline: 3px solid #111111;
  outline-offset: 3px;
}
