/*
 * Kian Studio Overrides
 * One stylesheet for the site: local fonts first, custom CSS after.
 *
 * 1. Local fonts (SIL Open Font License, see assets/fonts/<family>/OFL.txt)
 *    - Tenor Sans  -> headings      (replaces Aboreto, no Cyrillic)
 *    - Spectral    -> body / links  (replaces Antic Didone, no Cyrillic)
 *    - Manrope     -> buttons / UI  (replaces Niramit, no Cyrillic)
 *    Subsets: latin, latin-ext, cyrillic. Browsers download only the subsets a page needs.
 * 2. Design tokens
 * 3. Overrides
 */

/* ==========================================================================
   1. Local fonts
   ========================================================================== */

/* tenor-sans-cyrillic-400-normal */
@font-face {
  font-family: 'Tenor Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('../fonts/tenor-sans/tenor-sans-cyrillic-400-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* tenor-sans-latin-ext-400-normal */
@font-face {
  font-family: 'Tenor Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('../fonts/tenor-sans/tenor-sans-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* tenor-sans-latin-400-normal */
@font-face {
  font-family: 'Tenor Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('../fonts/tenor-sans/tenor-sans-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* spectral-cyrillic-300-normal */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-display: swap;
  font-weight: 300;
  src: url('../fonts/spectral/spectral-cyrillic-300-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* spectral-latin-ext-300-normal */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-display: swap;
  font-weight: 300;
  src: url('../fonts/spectral/spectral-latin-ext-300-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* spectral-latin-300-normal */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-display: swap;
  font-weight: 300;
  src: url('../fonts/spectral/spectral-latin-300-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* spectral-cyrillic-300-italic */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-display: swap;
  font-weight: 300;
  src: url('../fonts/spectral/spectral-cyrillic-300-italic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* spectral-latin-ext-300-italic */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-display: swap;
  font-weight: 300;
  src: url('../fonts/spectral/spectral-latin-ext-300-italic.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* spectral-latin-300-italic */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-display: swap;
  font-weight: 300;
  src: url('../fonts/spectral/spectral-latin-300-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* spectral-cyrillic-400-normal */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('../fonts/spectral/spectral-cyrillic-400-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* spectral-latin-ext-400-normal */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('../fonts/spectral/spectral-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* spectral-latin-400-normal */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('../fonts/spectral/spectral-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* spectral-cyrillic-400-italic */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-display: swap;
  font-weight: 400;
  src: url('../fonts/spectral/spectral-cyrillic-400-italic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* spectral-latin-ext-400-italic */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-display: swap;
  font-weight: 400;
  src: url('../fonts/spectral/spectral-latin-ext-400-italic.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* spectral-latin-400-italic */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-display: swap;
  font-weight: 400;
  src: url('../fonts/spectral/spectral-latin-400-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* spectral-cyrillic-600-normal */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url('../fonts/spectral/spectral-cyrillic-600-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* spectral-latin-ext-600-normal */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url('../fonts/spectral/spectral-latin-ext-600-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* spectral-latin-600-normal */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url('../fonts/spectral/spectral-latin-600-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* manrope-cyrillic-wght-normal */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('../fonts/manrope/manrope-cyrillic-wght-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* manrope-latin-ext-wght-normal */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('../fonts/manrope/manrope-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* manrope-latin-wght-normal */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('../fonts/manrope/manrope-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   2. Design tokens
   Use these in your own rules below; set the same families in Kubio's
   typography settings so the builder and this file stay in sync.
   ========================================================================== */

:root {
  --kso-font-heading: 'Tenor Sans', 'Helvetica Neue', Arial, sans-serif;
  --kso-font-body: 'Spectral', Georgia, 'Times New Roman', serif;
  --kso-font-ui: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* Consistent font rendering across browsers/OS */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
  /* no fake bold/italic for weights we don't ship */
}

/* ==========================================================================
   3. Overrides
   ========================================================================== */

.wp-block-kubio-hero>.background-wrapper {
  background: #0000006b;
}

.wp-block-kubio-footer>.wp-block-navigation {
  padding: 10px 0;
}

body #cmplz-manage-consent>.cmplz-btn.cmplz-manage-consent.manage-consent-1.cmplz-show {
  padding: 0 10px;
  --cmplz-manage-consent-offset: -5px;
  bottom: -5px;
}


/* Mobile, same as Kubio */
@media (max-width: 767px) {
  body.home .wp-block-kubio-hero .wp-block-heading {
    text-align: center;
    padding: 0 10px;
  }
}

/* Tablet, same as Kubio */
@media (min-width: 768px) and (max-width: 1023px) {}

/* Mobile + tablet together (treat tablet like mobile) */
@media (max-width: 1023px) {}

/* Desktop only */
@media (min-width: 1024px) {}

/* Desktop + Tablet */
@media (min-width: 768px) {
  body.home .wp-block-kubio-hero .wp-block-kubio-row__inner {
    flex-direction: column;
    align-items: flex-end !important;
  }

  body.home .wp-block-kubio-hero .wp-block-kubio-column {
    min-width: 60%;
    padding-right: 0 !important;
  }

  body.home .wp-block-kubio-hero .wp-block-kubio-column .wp-block-kubio-column__inner {
    padding-right: 0 !important;
  }
}

/* ==========================================================================
   4. WooCommerce
   ========================================================================== */

/* 4.1 Woo blocks (cart, checkout block, mini cart)
   Avantis defines the "small" font-size preset as 0.777em (≈12px), which Woo blocks
   use for most of their text. Raise the presets only inside Woo blocks. */
:where(.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout, .wp-block-woocommerce-mini-cart-contents, .wc-block-mini-cart__drawer) {
  --wp--preset--font-size--x-small: 0.875rem;
  --wp--preset--font-size--small: 0.9375rem;
  --wp--preset--font-size--medium: 1.0625rem;
}

/* 4.2 Cart */
.wp-block-woocommerce-cart {
  font-family: var(--kso-font-body);
  font-weight: 400;
  /* Spectral Light is too thin at small sizes */
  color: rgb(40, 40, 40);
}

.wp-block-woocommerce-cart .wc-block-cart-items__header,
.wp-block-woocommerce-cart .wc-block-cart__totals-title {
  font-family: var(--kso-font-ui);
  font-size: 0.8125rem !important;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name {
  font-size: 1.125rem;
  font-weight: 500;
}

.wp-block-woocommerce-cart :is(.wc-block-components-product-metadata, .wc-block-components-totals-item__description) {
  color: rgb(85, 85, 85);
}

.wp-block-woocommerce-cart :is(.wc-block-components-totals-coupon, .wc-block-components-panel__button) {
  font-size: 1rem;
}

.wp-block-woocommerce-cart .wc-block-components-totals-footer-item,
.wp-block-woocommerce-cart .wc-block-components-totals-footer-item :is(.wc-block-components-totals-item__label, .wc-block-components-totals-item__value) {
  font-size: 1.25rem;
  font-weight: 600;
}

/* Quantity +/- : undo Kubio's global button styles (light-blue disabled state) */
.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button,
.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:hover,
.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:focus,
.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:disabled {
  background: transparent;
  color: inherit;
  border: 0;
  box-shadow: none;
  padding: 0;
  min-width: 36px;
  font-size: 1.125rem;
}

.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.wp-block-woocommerce-cart .wc-block-cart-item__remove-link {
  background: transparent;
  color: inherit;
  box-shadow: none;
}

/* 4.3 Checkout (classic [woocommerce_checkout]) */

/* Two columns -> stacked rows */
.woocommerce-checkout #customer_details.col2-set .col-1,
.woocommerce-checkout #customer_details.col2-set .col-2 {
  float: none;
  width: 100%;
  max-width: none;
}

.woocommerce-checkout #customer_details .col-2 {
  margin-top: 1.5rem;
}

/* Billing fields (incl. Speedy's address fields) on one 12-column grid */
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 16px;
  row-gap: 4px;
  align-items: end;
}

.woocommerce-checkout .woocommerce-billing-fields__field-wrapper>* {
  grid-column: span 12;
  float: none !important;
  width: auto !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  clear: none;
}

.woocommerce-checkout .woocommerce-billing-fields__field-wrapper>.form-row-first,
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper>.form-row-last,
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper>#billing_neighborhood_field,
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper>#billing_street_field {
  grid-column: span 6;
}

/* Speedy: delivery type and office pickers full width */
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper>#billing_shipping_type_field,
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper>#billing_office_field,
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper>#billing_abroadoffice_field {
  grid-column: span 12;
}

/* Speedy: № + Бл. / Вх. / Ет. / Ап. on one row */
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper>#billing_street_number_field {
  grid-column: span 4;
}

.woocommerce-checkout .woocommerce-billing-fields__field-wrapper>.poledrugo {
  grid-column: span 2;
}

/* Same height and edges for every input / select (WooCommerce, select2, Speedy) */
.woocommerce-checkout .form-row :is(input.input-text, select, .select2-container .select2-selection--single) {
  box-sizing: border-box;
  height: 44px;
  min-height: 44px;
  border-radius: 4px;
  font-size: 1rem;
}

.woocommerce-checkout .form-row :is(input.input-text, select, textarea) {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.woocommerce-checkout .form-row select {
  padding-top: 0;
  padding-bottom: 0;
}

.woocommerce-checkout .form-row .select2-container .select2-selection--single .select2-selection__rendered {
  padding: 0 36px 0 8px;
  line-height: 42px;
}

.woocommerce-checkout .form-row .select2-container .select2-selection--single .select2-selection__arrow {
  height: 42px;
}

/* Speedy prints an inline margin-left on this field */
.woocommerce-checkout #billing_neighborhood {
  margin-left: 0;
}

.woocommerce-checkout .form-row label {
  font-size: 0.9375rem;
  margin-bottom: 4px;
}

/* Order review */
.woocommerce-checkout-review-order-table :is(th, td) {
  vertical-align: middle;
}

.woocommerce-checkout-review-order-table #shipping_method,
.woocommerce-checkout-review-order-table #shipping_method li {
  margin: 0;
  padding: 0;
}

/* Payment methods: align radio, title and card logos */
.woocommerce-checkout #payment .wc_payment_method>label {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  vertical-align: middle;
}

.woocommerce-checkout #payment .wc_payment_method>label img {
  max-width: 100%;
  height: auto;
  margin: 0;
}

/* Checkout on mobile: one field per row, Бл./Вх./Ет./Ап. two per row */
@media (max-width: 767px) {

  .woocommerce-checkout .woocommerce-billing-fields__field-wrapper>.form-row-first,
  .woocommerce-checkout .woocommerce-billing-fields__field-wrapper>.form-row-last,
  .woocommerce-checkout .woocommerce-billing-fields__field-wrapper>#billing_neighborhood_field,
  .woocommerce-checkout .woocommerce-billing-fields__field-wrapper>#billing_street_field,
  .woocommerce-checkout .woocommerce-billing-fields__field-wrapper>#billing_street_number_field {
    grid-column: span 12;
  }

  .woocommerce-checkout .woocommerce-billing-fields__field-wrapper>.poledrugo {
    grid-column: span 6;
  }
}

/* 4.4 Disabled submit buttons in Woo blocks (e.g. coupon "Apply")
   Kubio styles [data-kubio] button[type='submit']:disabled light blue,
   specificity (0,3,1). Higher specificity here, same dark style as
   "Proceed to Checkout", just faded. */
:is(.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout) button.wc-block-components-button[type='submit']:is(:disabled, [disabled]) {
  background-color: rgb(50, 55, 60);
  border-color: rgb(50, 55, 60);
  color: rgb(255, 255, 255);
  opacity: 0.45;
  cursor: not-allowed;
}

/* 4.5 Speedy mobile CSS forces #billing_street_number_field to 75px (id + !important) */
@media (max-width: 800px) {
  .woocommerce-checkout .woocommerce-billing-fields__field-wrapper>#billing_street_number_field {
    width: auto !important;
  }
}

/* 4.6 Speedy outside Bulgaria (delivery to an address)
   Speedy shows "Address line 2" (#billing_street2_field) only for addresses abroad,
   so it is used as the "abroad" switch. Speedy's inline CSS forces the State row
   visible with !important, hence !important below. */

/* Countries without regions: hide the empty "State / County" row */
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper>#billing_state_field:not(:has(select, input:not([type="hidden"]))) {
  display: none !important;
}

/* Abroad: State, Address line 1/2 full width */
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper:has(>#billing_street2_field:not([style*="none"]))>:is(#billing_state_field, #billing_street_field) {
  grid-column: span 12;
}

/* Abroad: Speedy turns "Address line 2" (billing_address_2) into the required postcode,
   but WooCommerce hides its label for screen readers only. Show it, with the required mark. */
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper:has(>#billing_street2_field:not([style*="none"]))>#billing_address_2_field label.screen-reader-text {
  position: static !important;
  width: auto;
  height: auto;
  margin: 0 0 4px;
  overflow: visible;
  clip: auto;
  clip-path: none;
}

.woocommerce-checkout .woocommerce-billing-fields__field-wrapper:has(>#billing_street2_field:not([style*="none"]))>#billing_address_2_field label.screen-reader-text::after {
  content: " *";
  color: rgb(170, 0, 0);
}
