/**
 * Sober-inspired minimal store — mobile-first
 */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;1,400&family=Inter:wght@400;500&display=swap');

:root {
  --tjs-bg: #ffffff;
  --tjs-surface: #f8f8f8;
  --tjs-text: #111111;
  --tjs-muted: #6b6b6b;
  --tjs-border: #e5e5e5;
  --tjs-accent: #111111;
  --tjs-max: 1140px;
  --tjs-content: 640px;
  --tjs-gap: clamp(1.25rem, 3vw, 2.5rem);
  --tjs-pad: clamp(1rem, 4vw, 1.5rem);
  --tjs-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --tjs-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --tjs-radius: 2px;
  --tjs-header-h: 3.75rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body.tjs-minimal {
  font-family: var(--tjs-sans);
  font-size: 15px;
  color: var(--tjs-text);
  background: var(--tjs-bg);
  -webkit-font-smoothing: antialiased;
  margin: 0;
  line-height: 1.6;
  overflow-x: hidden;
}

body.tjs-minimal .wp-site-blocks {
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
}

body.tjs-minimal .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  max-width: none !important;
  margin-inline: 0 !important;
}

body.tjs-minimal main.is-layout-constrained,
body.tjs-minimal .wp-block-group.is-layout-constrained {
  max-width: none !important;
}

body.tjs-minimal .wp-site-blocks > header,
body.tjs-minimal .wp-site-blocks > footer,
body.tjs-minimal header.wp-block-template-part,
body.tjs-minimal footer.wp-block-template-part,
body.tjs-minimal .wp-block-navigation,
body.tjs-minimal .wp-block-site-title,
body.tjs-minimal .wp-block-site-tagline,
body.tjs-minimal .wp-block-query-title,
body.tjs-minimal .woocommerce-breadcrumb,
body.tjs-minimal .woocommerce-result-count,
body.tjs-minimal .woocommerce-ordering,
body.tjs-minimal .tjs-cute-header,
body.tjs-minimal .tjs-cute-footer,
body.tjs-minimal .wp-block-group.alignfull:has(.wp-block-site-title) {
  display: none !important;
}

/* ── Layout ── */
.tjs-shell {
  max-width: var(--tjs-max);
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3rem) var(--tjs-pad) clamp(2.5rem, 6vw, 4rem);
}

.tjs-shell-inner {
  max-width: 100%;
}

.tjs-shell--page .tjs-shell-inner .wp-block-group,
.tjs-shell--page .tjs-shell-inner .entry-content,
.tjs-shell--page .tjs-shell-inner .wp-block-post-content {
  max-width: var(--tjs-content);
  margin-left: auto;
  margin-right: auto;
}

/* ── Typography ── */
.tjs-page-hero,
.tjs-shop-hero {
  text-align: center;
  margin: 0 auto clamp(2rem, 5vw, 3rem);
  max-width: var(--tjs-content);
}

.tjs-page-hero h1,
.tjs-shop-hero h1 {
  font-family: var(--tjs-serif);
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
  line-height: 1.15;
}

.tjs-shop-hero p {
  font-size: 0.875rem;
  color: var(--tjs-muted);
  margin: 0;
  letter-spacing: 0.01em;
}

body.tjs-minimal .tjs-shell-inner h1,
body.tjs-minimal .tjs-shell-inner h2,
body.tjs-minimal .tjs-shell-inner h3 {
  font-family: var(--tjs-serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--tjs-text);
}

body.tjs-minimal .tjs-shell--page .tjs-shell-inner p,
body.tjs-minimal .tjs-shell--page .tjs-shell-inner li {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--tjs-muted);
}

body.tjs-minimal .tjs-shell-inner a {
  color: var(--tjs-text);
  transition: opacity 0.2s ease;
}

body.tjs-minimal .tjs-shell-inner a:hover {
  opacity: 0.65;
}

/* ── Header ── */
.tjs-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--tjs-border);
}

.tjs-header-inner {
  max-width: var(--tjs-max);
  margin: 0 auto;
  padding: 0 var(--tjs-pad);
  min-height: var(--tjs-header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.tjs-logo {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--tjs-text);
  text-decoration: none;
  flex-shrink: 0;
  padding: 0.75rem 0;
}

.tjs-header-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.tjs-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tjs-header-actions a {
  font-size: 0.75rem;
  color: var(--tjs-text);
  text-decoration: none;
  letter-spacing: 0.04em;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.tjs-header-cart {
  position: relative;
}

.tjs-cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.125rem;
  height: 1.125rem;
  margin-left: 0.35rem;
  padding: 0 0.3rem;
  font-size: 0.625rem;
  font-weight: 500;
  background: var(--tjs-text);
  color: var(--tjs-bg);
  border-radius: 999px;
}

.tjs-menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.tjs-menu-toggle-bar {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--tjs-text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

body.tjs-nav-open .tjs-menu-toggle-bar:first-child {
  transform: translateY(3px) rotate(45deg);
}

body.tjs-nav-open .tjs-menu-toggle-bar:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

.tjs-nav-wrap {
  width: 100%;
  order: 3;
}

.tjs-nav {
  display: flex;
  gap: clamp(1.25rem, 4vw, 2rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.tjs-nav a {
  font-size: 0.8125rem;
  color: var(--tjs-muted);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s ease;
}

.tjs-nav a:hover,
.tjs-nav a.is-active {
  color: var(--tjs-text);
}

/* Mobile nav drawer */
@media (max-width: 767px) {
  body.tjs-nav-open {
    overflow: hidden;
  }

  .tjs-header-inner {
    flex-wrap: wrap;
  }

  .tjs-nav-wrap {
    display: none;
    position: fixed;
    inset: var(--tjs-header-h) 0 0 0;
    background: var(--tjs-bg);
    padding: 1.5rem var(--tjs-pad) 2rem;
    overflow-y: auto;
    border-top: 1px solid var(--tjs-border);
  }

  body.tjs-nav-open .tjs-nav-wrap {
    display: block;
  }

  .tjs-nav {
    flex-direction: column;
    gap: 0;
  }

  .tjs-nav a {
    font-size: 1.125rem;
    font-family: var(--tjs-serif);
    text-transform: none;
    letter-spacing: 0;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--tjs-border);
    width: 100%;
  }

  .tjs-header-account {
    display: none;
  }
}

/* Desktop header */
@media (min-width: 768px) {
  .tjs-header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    flex-wrap: nowrap;
  }

  .tjs-header-tools {
    order: 3;
    justify-self: end;
    margin-left: 0;
  }

  .tjs-nav-wrap {
    order: 0;
    justify-self: center;
    width: auto;
  }

  .tjs-menu-toggle {
    display: none;
  }

  .tjs-logo {
    justify-self: start;
  }
}

/* ── Shop grid ── */
body.tjs-minimal ul.products,
body.tjs-minimal .wp-block-woocommerce-product-template {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--tjs-gap);
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}

body.tjs-minimal ul.products::before,
body.tjs-minimal ul.products::after {
  display: none !important;
}

body.tjs-minimal ul.products li.product,
body.tjs-minimal .wp-block-woocommerce-product-template > li {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  float: none !important;
  display: flex;
  flex-direction: column;
}

body.tjs-minimal .wc-block-components-product-image,
body.tjs-minimal .wp-block-woocommerce-product-image {
  overflow: hidden;
  background: var(--tjs-surface);
}

body.tjs-minimal ul.products li.product img,
body.tjs-minimal .wc-block-components-product-image img,
body.tjs-minimal .wp-block-woocommerce-product-image img {
  width: 100% !important;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--tjs-surface);
  margin-bottom: 1rem;
  transition: transform 0.4s ease;
}

body.tjs-minimal .wc-block-components-product-image a:hover img,
body.tjs-minimal .wp-block-woocommerce-product-image a:hover img {
  transform: scale(1.03);
}

body.tjs-minimal .wc-block-grid__product-title,
body.tjs-minimal .wp-block-woocommerce-product-template h2,
body.tjs-minimal .wp-block-woocommerce-product-template h2 a,
body.tjs-minimal .wp-block-woocommerce-product-template .wp-block-post-title,
body.tjs-minimal .wp-block-woocommerce-product-template .wp-block-post-title a,
body.tjs-minimal ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--tjs-serif) !important;
  font-size: clamp(0.9375rem, 2.5vw, 1.0625rem) !important;
  font-weight: 400 !important;
  text-align: center;
  margin: 0 0 0.35rem !important;
  letter-spacing: 0;
  line-height: 1.35 !important;
  text-decoration: none;
}

body.tjs-minimal .wc-block-grid__product-price,
body.tjs-minimal .wp-block-woocommerce-product-price,
body.tjs-minimal ul.products li.product .price {
  font-size: 0.8125rem !important;
  color: var(--tjs-muted) !important;
  text-align: center;
  margin-bottom: 0.875rem !important;
}

body.tjs-minimal .wc-block-grid__product-add-to-cart,
body.tjs-minimal .wp-block-woocommerce-product-button {
  text-align: center;
  margin-top: auto;
}

body.tjs-minimal ul.products li.product .button,
body.tjs-minimal .wp-block-woocommerce-product-button .wp-block-button__link {
  background: transparent !important;
  color: var(--tjs-text) !important;
  border: 1px solid var(--tjs-text) !important;
  border-radius: 999px !important;
  padding: 0.75rem 1.25rem !important;
  font-size: 0.625rem !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  min-height: 44px;
  width: 100%;
  max-width: 200px;
  transition: background 0.2s ease, color 0.2s ease;
}

body.tjs-minimal ul.products li.product .button:hover,
body.tjs-minimal .wp-block-woocommerce-product-button .wp-block-button__link:hover {
  background: var(--tjs-text) !important;
  color: var(--tjs-bg) !important;
}

body.tjs-minimal .wp-block-woocommerce-product-collection {
  margin-bottom: 0;
}

body.tjs-minimal .wp-block-woocommerce-product-collection > h2 {
  display: none;
}

/* Shop / archive full width */
body.tjs-minimal.woocommerce-shop .tjs-shell-inner,
body.tjs-minimal.woocommerce-shop .wp-site-blocks,
body.tjs-minimal.woocommerce-shop main,
body.tjs-minimal.woocommerce-shop .wp-block-group,
body.tjs-minimal.woocommerce-shop .wp-block-woocommerce-product-collection,
body.tjs-minimal.woocommerce-shop .wp-block-woocommerce-product-template,
body.tjs-minimal.post-type-archive-product .tjs-shell-inner {
  max-width: 100% !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.tjs-minimal.woocommerce-shop .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  max-width: none !important;
}

/* ── Single product ── */
body.tjs-minimal.single-product .tjs-shell {
  padding-top: clamp(1rem, 3vw, 2rem);
}

body.tjs-minimal.single-product .tjs-shell-inner,
body.tjs-minimal.single-product .wp-site-blocks main,
body.tjs-minimal.single-product .wp-block-group.woocommerce.product,
body.tjs-minimal.single-product .wp-block-group.is-layout-constrained {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.tjs-minimal.single-product .wp-block-post-title {
  display: block !important;
  font-family: var(--tjs-serif);
  font-size: clamp(1.375rem, 4vw, 1.75rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
  line-height: 1.25;
}

body.tjs-minimal.single-product .wp-block-columns.alignwide {
  max-width: var(--tjs-max);
  margin: 0 auto;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: flex-start;
}

body.tjs-minimal.single-product .wp-block-column {
  min-width: 0;
  flex-basis: auto !important;
  flex-grow: 1;
}

body.tjs-minimal.single-product .wp-block-column:first-child {
  flex: 1 1 55%;
}

body.tjs-minimal.single-product .wp-block-column:last-child {
  flex: 1 1 45%;
}

body.tjs-minimal.single-product .woocommerce-product-gallery,
body.tjs-minimal.single-product .wp-block-woocommerce-product-image-gallery {
  width: 100%;
  max-width: none;
}

body.tjs-minimal.single-product .woocommerce-product-gallery__image img,
body.tjs-minimal.single-product .wp-post-image {
  width: 100% !important;
  height: auto !important;
  max-width: none !important;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--tjs-surface);
}

body.tjs-minimal.single-product .flex-control-thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

body.tjs-minimal.single-product .flex-control-thumbs::-webkit-scrollbar {
  display: none;
}

body.tjs-minimal.single-product .flex-control-thumbs li {
  width: 64px !important;
  flex: 0 0 64px;
}

body.tjs-minimal.single-product .flex-control-thumbs img {
  opacity: 0.45;
  border: 1px solid transparent;
  border-radius: var(--tjs-radius);
}

body.tjs-minimal.single-product .flex-control-thumbs .flex-active img {
  opacity: 1;
  border-color: var(--tjs-text);
}

body.tjs-minimal.single-product .wp-block-woocommerce-product-price .woocommerce-Price-amount {
  font-size: 1rem;
  color: var(--tjs-muted);
}

body.tjs-minimal.single-product .tjs-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

body.tjs-minimal .tjs-badge {
  font-size: 0.5625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tjs-muted);
  border: 1px solid var(--tjs-border);
  padding: 0.35rem 0.6rem;
  border-radius: var(--tjs-radius);
}

body.tjs-minimal.single-product .wp-block-post-excerpt__excerpt {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--tjs-muted);
  margin-bottom: 1.25rem;
}

body.tjs-minimal.single-product .wp-block-woocommerce-add-to-cart-form form.cart {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

body.tjs-minimal.single-product .quantity .qty {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem;
  border: 1px solid var(--tjs-border);
  text-align: center;
  font-size: 1rem;
  border-radius: var(--tjs-radius);
  -webkit-appearance: none;
  appearance: none;
}

body.tjs-minimal.single-product .quantity {
  flex: 0 0 80px;
}

body.tjs-minimal.single-product .single_add_to_cart_button {
  background: var(--tjs-accent) !important;
  color: var(--tjs-bg) !important;
  border-radius: 999px !important;
  padding: 0.875rem 1.5rem !important;
  font-size: 0.625rem !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  border: 1px solid var(--tjs-accent) !important;
  flex: 1 1 auto;
  min-height: 48px;
  transition: opacity 0.2s ease;
}

body.tjs-minimal.single-product .single_add_to_cart_button:hover {
  opacity: 0.85;
}

body.tjs-minimal.single-product .wp-block-woocommerce-product-details {
  max-width: var(--tjs-max);
  margin: 2rem auto 0;
  border-top: 1px solid var(--tjs-border);
  padding-top: 1.5rem;
}

body.tjs-minimal.single-product .woocommerce-tabs .tabs {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

body.tjs-minimal.single-product .woocommerce-tabs .tabs a {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tjs-muted);
  text-decoration: none;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
}

body.tjs-minimal.single-product .woocommerce-tabs .tabs li.active a {
  color: var(--tjs-text);
  border-bottom-color: var(--tjs-text);
}

body.tjs-minimal.single-product .wp-block-woocommerce-product-collection {
  max-width: var(--tjs-max);
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--tjs-border);
}

/* ── Cart / checkout / account ── */
body.tjs-minimal.woocommerce-cart .tjs-shell-inner,
body.tjs-minimal.woocommerce-checkout .tjs-shell-inner,
body.tjs-minimal.woocommerce-account .tjs-shell-inner {
  max-width: var(--tjs-max);
}

body.tjs-minimal table.shop_table {
  border: none;
  width: 100%;
  font-size: 0.875rem;
}

body.tjs-minimal table.shop_table th,
body.tjs-minimal table.shop_table td {
  border-bottom: 1px solid var(--tjs-border);
  padding: 0.875rem 0;
  font-weight: 400;
}

body.tjs-minimal .woocommerce a.button,
body.tjs-minimal .woocommerce button.button,
body.tjs-minimal .woocommerce input.button {
  background: var(--tjs-accent) !important;
  color: var(--tjs-bg) !important;
  border-radius: 999px !important;
  font-size: 0.625rem !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  border: 1px solid var(--tjs-accent) !important;
  min-height: 48px;
  padding: 0.875rem 1.5rem !important;
}

body.tjs-minimal .woocommerce form .form-row input.input-text,
body.tjs-minimal .woocommerce form .form-row textarea,
body.tjs-minimal .woocommerce form .form-row select {
  min-height: 48px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--tjs-border);
  border-radius: var(--tjs-radius);
  font-size: 16px;
  width: 100%;
}

/* ── Footer ── */
.tjs-footer {
  border-top: 1px solid var(--tjs-border);
  padding: clamp(1.5rem, 4vw, 2rem) var(--tjs-pad);
  padding-bottom: calc(clamp(1.5rem, 4vw, 2rem) + env(safe-area-inset-bottom, 0px));
  margin-top: auto;
}

.tjs-footer-inner {
  max-width: var(--tjs-max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.tjs-footer-copy {
  font-size: 0.6875rem;
  color: var(--tjs-muted);
  margin: 0;
  letter-spacing: 0.04em;
}

.tjs-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tjs-footer-links a {
  font-size: 0.6875rem;
  color: var(--tjs-muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.tjs-footer-links a:hover {
  color: var(--tjs-text);
}

/* ── Mobile breakpoints ── */
@media (max-width: 479px) {
  body.tjs-minimal ul.products,
  body.tjs-minimal .wp-block-woocommerce-product-template {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  body.tjs-minimal .wp-block-woocommerce-product-button .wp-block-button__link {
    max-width: none;
    width: 100%;
  }
}

@media (max-width: 767px) {
  body.tjs-minimal.single-product .wp-block-columns.alignwide {
    flex-direction: column !important;
    gap: 1.5rem;
  }

  body.tjs-minimal.single-product .wp-block-column:first-child,
  body.tjs-minimal.single-product .wp-block-column:last-child {
    flex: 1 1 100%;
  }

  body.tjs-minimal.single-product .single_add_to_cart_button {
    width: 100%;
    max-width: none;
  }

  body.tjs-minimal.single-product .wp-block-woocommerce-add-to-cart-form form.cart {
    flex-direction: column;
  }

  body.tjs-minimal.single-product .quantity {
    flex: 1 1 100%;
  }

  .tjs-footer-inner {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }

  .tjs-footer-links {
    justify-content: center;
  }

  /* WooCommerce cart table mobile */
  body.tjs-minimal.woocommerce-cart table.shop_table_responsive tr {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--tjs-border);
  }
}

@media (min-width: 768px) {
  body.tjs-minimal.single-product .wp-block-woocommerce-add-to-cart-form form.cart {
    flex-wrap: nowrap;
  }

  body.tjs-minimal.single-product .single_add_to_cart_button {
    max-width: 260px;
  }
}
