/*
Theme Name: Yakokawa
Theme URI: https://yakokawa.pl
Author: Kompiler / Yakokawa project
Description: Custom theme for Yakokawa D2C WooCommerce. Layout from ui_kits/design-v2 (D-008). Subs/payments via Rytm (D-009).
Version: 0.2.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.1
Text Domain: yakokawa
*/

/* Layout tokens + sections live in assets/css/site.css and ui.css. */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Sprite icons: never inherit huge SVG intrinsic size from the sprite sheet */
.site-header svg.ic,
.site-footer svg.ic,
.header-tools svg,
.cart svg,
.socials svg,
.secure svg {
  width: 1.125rem;
  height: 1.125rem;
  flex: none;
  display: block;
  overflow: hidden;
}

.cart svg {
  width: 18px;
  height: 18px;
  color: #fff;
  fill: currentColor;
}

/* Woo mini-cart inside drawer → design-v2 .line */
#miniCart .woocommerce-mini-cart {
  list-style: none;
  margin: 0;
  padding: 0;
}

#miniCart .woocommerce-mini-cart-item.line {
  list-style: none;
}

#miniCart .line-img,
#miniCart .line-img-link .line-img {
  width: 64px;
  height: 76px;
  padding: 6px;
  display: block;
  object-fit: contain;
  background: var(--mist);
  border-radius: var(--r-sm);
}

#miniCart .line-info h3 {
  font-size: 16px;
  margin: 0;
  line-height: 1.25;
}

#miniCart .line-info h3 a {
  color: inherit;
  text-decoration: none;
}

#miniCart .line-info h3 a:hover {
  text-decoration: underline;
}

#miniCart .line-actions {
  margin-top: 10px;
  flex-wrap: wrap;
  gap: 10px 16px;
}

#miniCart .qty {
  min-height: 36px;
}

#miniCart .qty button {
  width: 36px;
  height: 36px;
}

#miniCart .qty .ic {
  width: 16px;
  height: 16px;
}

#miniCart .line-actions .remove,
#miniCart .line-actions .link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 500 14px var(--display);
  color: var(--muted);
  text-decoration: none;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 0;
}

#miniCart .line-actions .remove:hover,
#miniCart .line-actions .link-btn:hover {
  color: var(--error, #b42318);
}

#miniCart .line-price b {
  font-size: 16px;
  white-space: nowrap;
}

#miniCart .woocommerce-mini-cart__buttons,
#miniCart .woocommerce-mini-cart__buttons[hidden] {
  display: none !important;
}

#miniCart .sum-note {
  color: var(--muted);
  font-size: 14px;
}

/* Full cart page: keep pouch/product thumbs in the .line grid */
.line-img-link {
  display: block;
  width: 88px;
}

.line > .line-img,
.line-img-link .line-img {
  width: 88px;
  height: 104px;
  display: block;
  object-fit: contain;
  background: var(--mist);
  border-radius: var(--r-sm);
  padding: 8px;
}

.drawer .line > .line-img,
.drawer .line-img-link {
  width: 64px;
}

.drawer .line-img-link .line-img,
.drawer .line > .line-img {
  width: 64px;
  height: 76px;
  padding: 6px;
}

/* Woo checkout fields → design-v2 form chrome */
.woocommerce-checkout .co-stack {
  display: grid;
  gap: 16px;
}

.woocommerce-checkout .col2-set,
.woocommerce-checkout .col-1,
.woocommerce-checkout .col-2 {
  width: 100%;
  float: none;
}

.woocommerce-checkout .form-row {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0;
  display: grid;
  gap: 6px;
  align-content: start;
}

.woocommerce-checkout .form-row-wide,
.woocommerce-checkout .notes-field {
  grid-column: 1 / -1;
}

.woocommerce-checkout .form-row-first {
  grid-column: 1;
}

.woocommerce-checkout .form-row-last {
  grid-column: 2;
}

.woocommerce-checkout .form-row label {
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.3;
}

.woocommerce-checkout .form-row .required {
  color: var(--error);
  text-decoration: none;
}

.woocommerce-checkout .form-row .input-text,
.woocommerce-checkout .form-row select,
.woocommerce-checkout .form-row textarea,
.woocommerce-checkout .select2-container .select2-selection--single {
  width: 100%;
  min-height: 52px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--line);
  background: var(--surface);
  padding: 0 16px;
  font: 400 17px var(--display);
  color: var(--ink);
  box-shadow: none;
}

.woocommerce-checkout .form-row textarea.input-text {
  min-height: 96px;
  max-height: 140px;
  height: 96px;
  padding: 14px 16px;
  resize: vertical;
  line-height: 1.4;
}

.woocommerce-checkout .form-row .input-text:focus,
.woocommerce-checkout .form-row select:focus,
.woocommerce-checkout .form-row textarea:focus {
  outline: 3px solid rgba(63, 198, 182, 0.45);
  outline-offset: 0;
  border-color: var(--teal-700);
}

.woocommerce-checkout .select2-container .select2-selection--single {
  display: flex;
  align-items: center;
}

.woocommerce-checkout .select2-container .select2-selection__rendered {
  padding: 0;
  line-height: 1.3;
  color: var(--ink);
}

.woocommerce-checkout .select2-container .select2-selection__arrow {
  height: 100%;
}

.woocommerce-checkout .woocommerce-billing-fields__field-wrapper.clear::before,
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper.clear::after,
.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper.clear::before,
.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper.clear::after,
.woocommerce-checkout .woocommerce-additional-fields__field-wrapper.clear::before,
.woocommerce-checkout .woocommerce-additional-fields__field-wrapper.clear::after,
.woocommerce-checkout .clear {
  display: none;
}

.woocommerce-checkout .woocommerce-additional-fields > h3 {
  display: none;
}

.woocommerce-checkout .second-coffee .line {
  border-bottom: 0;
  padding-bottom: 0;
}

.woocommerce-checkout .co-section h2 .num {
  display: none;
}

@media (max-width: 720px) {
  .woocommerce-checkout .form-row-first,
  .woocommerce-checkout .form-row-last {
    grid-column: 1 / -1;
  }
}

/* Hide mock-only tooling if any slips in */
.mock-bar,
.mock-pages,
.todo-toggle {
  display: none !important;
}

