/*
Theme Name: Barefoot Shop
Description: Minimal transactional theme for the Barefoot Clothing WooCommerce host. Styles cart, checkout, account and legal pages to match the Astro storefront at barefootclothing.com.au; the catalogue itself is served by the storefront.
Version: 1.0.0
Author: Ironbark Web
Requires PHP: 8.1
Requires at least: 6.5
Text Domain: barefoot-shop
*/

/* ── Brand tokens: keep in sync with src/config.ts colours ─────────────── */
:root {
  --brand-primary: #1f7a76;
  --brand-accent: #4bc0ba;
  --brand-text: #131615;
  --brand-muted: #5b6b6a;
  --brand-bg: #f7fafa;
  --brand-tint: color-mix(in srgb, var(--brand-primary) 5%, white);
  --radius: 1rem;
  --radius-pill: 9999px;
  --container: 72rem;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 5.25rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--brand-text);
  background: var(--brand-bg);
}
a { color: var(--brand-primary); }
a:hover { color: var(--brand-text); }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; color: var(--brand-text); margin: 0 0 0.75em; }
h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.5rem); letter-spacing: -0.01em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 640px) { .container { padding-inline: 1.5rem; } }

.skip-link { position: absolute; left: -999px; top: 0; }
.skip-link:focus { left: 0.75rem; top: 0.75rem; z-index: 100; background: var(--brand-primary); color: #fff; padding: 0.5rem 1rem; border-radius: 0.5rem; font-weight: 600; }

/* ── Header (mirrors the storefront header) ─────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1rem; }
.site-header .logo img { display: block; height: 3rem; width: auto; }
@media (min-width: 640px) { .site-header .logo img { height: 3.5rem; } }
.site-nav { display: none; align-items: center; gap: 1.5rem; }
.site-nav ul { display: flex; align-items: center; gap: 1.5rem; margin: 0; padding: 0; list-style: none; }
.site-nav a { font-size: 0.9rem; font-weight: 500; color: var(--brand-text); text-decoration: none; }
.site-nav a:hover { color: var(--brand-primary); }
.site-nav .cart-link { display: inline-flex; align-items: center; gap: 0.4rem; }
.site-nav .cart-count { min-width: 1.4em; padding: 0 0.4em; border-radius: var(--radius-pill); background: var(--brand-primary); color: #fff; font-size: 0.75rem; font-weight: 600; text-align: center; }
.btn, .site-nav .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.65rem 1.5rem; border: 0; border-radius: var(--radius-pill);
  background: var(--brand-primary); color: #fff; font: inherit; font-size: 0.9rem; font-weight: 600;
  text-decoration: none; cursor: pointer; transition: background 0.2s, color 0.2s;
}
.btn:hover, .site-nav .btn:hover { background: var(--brand-text); color: #fff; }
.btn.btn-outline { background: transparent; color: var(--brand-primary); box-shadow: inset 0 0 0 1px var(--brand-primary); }
.btn.btn-outline:hover { background: var(--brand-primary); color: #fff; }
@media (min-width: 900px) { .site-nav { display: flex; } .mobile-menu { display: none; } }

.mobile-menu summary { list-style: none; cursor: pointer; padding: 0.5rem; display: inline-flex; }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu[open] summary .icon-menu, .mobile-menu:not([open]) summary .icon-close { display: none; }
.mobile-menu .panel {
  position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; border-top: 1px solid rgba(19,22,21,0.1); box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  padding: 1.25rem 1rem;
}
.mobile-menu .panel ul { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; gap: 0.9rem; }
.mobile-menu .panel a { font-size: 1.1rem; font-weight: 500; color: var(--brand-text); text-decoration: none; }
.mobile-menu .panel .btn { width: 100%; padding-block: 0.9rem; }

/* ── Page shell ─────────────────────────────────────────────────────────── */
.site-main { padding-block: 2.5rem 4rem; }
@media (min-width: 768px) { .site-main { padding-block: 3.5rem 6rem; } }
.page-title { margin-bottom: 1.5rem; }
.card { background: #fff; border-radius: 1.25rem; box-shadow: 0 20px 40px -20px rgba(19,22,21,0.25); padding: 1.5rem; }
@media (min-width: 768px) { .card { padding: 2.5rem; } }
.entry-content > :first-child { margin-top: 0; }
.entry-content p, .entry-content li { color: var(--brand-muted); }
.back-link { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 500; text-decoration: none; margin-bottom: 1.5rem; }

/* ── Footer (mirrors the storefront footer) ─────────────────────────────── */
.site-footer { background: var(--brand-text); color: #fff; padding-block: 3rem; }
@media (min-width: 768px) { .site-footer { padding-block: 4rem; } }
.site-footer .grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .site-footer .grid { grid-template-columns: repeat(3, 1fr); } }
.site-footer .brand { font-size: 1.5rem; font-weight: 700; color: var(--brand-accent); margin: 0 0 1rem; }
.site-footer p, .site-footer li { color: rgba(255,255,255,0.6); }
.site-footer h3 { color: #fff; font-size: 1.1rem; margin-bottom: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.site-footer a { color: rgba(255,255,255,0.6); text-decoration: none; }
.site-footer a:hover { color: var(--brand-accent); }
.site-footer .credit { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.85rem; color: rgba(255,255,255,0.4); }
.site-footer small { display: block; font-size: 0.85rem; }

/* ── WooCommerce: classic templates ─────────────────────────────────────── */
.woocommerce .button, .woocommerce button.button, .woocommerce a.button, .woocommerce input.button,
.woocommerce #respond input#submit, .woocommerce button.button.alt, .woocommerce a.button.alt {
  border-radius: var(--radius-pill); background: var(--brand-primary); color: #fff; font-weight: 600; padding: 0.75rem 1.5rem;
}
.woocommerce .button:hover, .woocommerce button.button.alt:hover, .woocommerce a.button.alt:hover { background: var(--brand-text); color: #fff; }
.woocommerce .button:disabled, .woocommerce button.button:disabled[disabled] { background: var(--brand-primary); opacity: 0.5; }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select,
.woocommerce-page form .form-row .select2-container .select2-selection--single {
  width: 100%; padding: 0.75rem 1rem; border: 1px solid transparent; border-radius: 0.75rem; background: var(--brand-tint); font: inherit; color: var(--brand-text);
}
.woocommerce form .form-row input.input-text:focus, .woocommerce form .form-row textarea:focus { outline: none; background: #fff; border-color: var(--brand-primary); }
.woocommerce-message, .woocommerce-info, .woocommerce-error { border-radius: 0.75rem; border-top-color: var(--brand-primary); background: #fff; }
.woocommerce-message::before, .woocommerce-info::before { color: var(--brand-primary); }
.woocommerce-error { border-top-color: #b42318; }
.woocommerce-error::before { color: #b42318; }
.woocommerce table.shop_table { border-radius: var(--radius); border-color: rgba(19,22,21,0.08); background: #fff; }
.woocommerce table.shop_table th { color: var(--brand-muted); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }
.woocommerce-page table.shop_table { width: 100%; }
.woocommerce .cart-collaterals .cart_totals, .woocommerce-page .cart-collaterals .cart_totals { width: 100%; }
@media (min-width: 768px) { .woocommerce .cart-collaterals .cart_totals { width: 48%; } }
.woocommerce-MyAccount-navigation ul { list-style: none; padding: 0; }
.woocommerce-MyAccount-navigation a { display: block; padding: 0.6rem 0.9rem; border-radius: 0.75rem; text-decoration: none; color: var(--brand-text); }
.woocommerce-MyAccount-navigation li.is-active a, .woocommerce-MyAccount-navigation a:hover { background: var(--brand-tint); color: var(--brand-primary); }
.woocommerce-breadcrumb { display: none; }

/* ── WooCommerce: block cart / checkout (default on new installs) ───────── */
.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout, .wc-block-components-notice-banner { font-family: var(--font-sans); }
.wc-block-components-button:not(.is-link), .wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button {
  border-radius: var(--radius-pill) !important; background: var(--brand-primary) !important; color: #fff !important; font-weight: 600 !important;
}
.wc-block-components-button:not(.is-link):hover { background: var(--brand-text) !important; }
.wc-block-components-text-input input, .wc-block-components-select .components-custom-select-control__button, .wc-block-components-textarea textarea,
.wc-block-components-combobox .components-combobox-control__input {
  border-radius: 0.75rem !important; border-color: rgba(19,22,21,0.15) !important;
}
.wc-block-components-text-input input:focus, .wc-block-components-textarea textarea:focus { border-color: var(--brand-primary) !important; box-shadow: 0 0 0 1px var(--brand-primary) !important; }
.wc-block-components-checkout-step__title, .wc-block-components-title { color: var(--brand-text); }
.wc-block-components-product-name { color: var(--brand-text); text-decoration: none; font-weight: 600; }
.wc-block-components-totals-footer-item { color: var(--brand-text); }
.wc-block-components-radio-control__option--checked-option-label::before, .wc-block-components-radio-control__input:checked { border-color: var(--brand-primary) !important; }
.wc-block-components-radio-control__input:checked::before { background: var(--brand-primary) !important; }
.wc-block-cart, .wc-block-checkout { max-width: var(--container); margin-inline: auto; }
.wc-block-components-sidebar-layout .wc-block-components-sidebar { border-radius: var(--radius); }
.wc-block-cart__empty-cart__title { font-weight: 700; }
