/* ═══════════════════════════════════════════════════════════════════════
   Osnatmaor — WooCommerce. WooCommerce keeps its markup; the design here
   is the theme's own: neumorphic cards, pill buttons, brand colours.
   ═══════════════════════════════════════════════════════════════════════ */

.om-woo {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 4px 16px 40px;
  /* Guard: WooCommerce and payment/shipping plugins inject markup the theme
     doesn't control (tables, iframes, float-based notices). Clipping here
     keeps a stray wide element from pushing the whole RTL page sideways.
     `clip` doesn't create a scroll container, so nothing inside is trapped;
     `hidden` is the fallback for older Safari. */
  overflow-x: hidden;
  overflow-x: clip;
}

/* Anything WooCommerce renders wide (tables, gallery, embeds) stays inside. */
.om-woo img,
.om-woo iframe,
.om-woo table { max-width: 100%; }

.om-woo .woocommerce-breadcrumb { display: none; }

.om-woo a { text-decoration: none; }
.om-woo ul.products li.product a { color: inherit; }

/* ── Product grid ───────────────────────────────────────────────────── */

.om-woo ul.products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.om-woo ul.products::before,
.om-woo ul.products::after { content: none; }

.om-woo ul.products li.product {
  float: none;
  width: auto;
  margin: 0;
  padding: 0 0 14px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-out);
  overflow: hidden;
  text-align: center;
}

.om-woo ul.products li.product a img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  margin: 0 0 12px;
  border-radius: 0;
}

.om-woo ul.products li.product .woocommerce-loop-product__title {
  padding: 0 14px;
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
}

.om-woo ul.products li.product .price {
  display: block;
  margin-bottom: 10px;
  color: var(--brown);
  font-weight: 700;
  font-size: 1rem;
}

.om-woo ul.products li.product .price del { opacity: .55; font-weight: 400; }
.om-woo ul.products li.product .price ins { text-decoration: none; }

.om-woo ul.products li.product .onsale {
  position: absolute;
  margin: 10px;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  min-height: 0;
  line-height: 1.6;
}

@media (min-width: 900px) {
  .om-woo ul.products { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}

@media (max-width: 559px) {
  .om-woo { padding-inline: 12px; }
  .om-woo ul.products { gap: 12px; }
  .om-woo ul.products li.product .woocommerce-loop-product__title { font-size: .92rem; }
}

/* ── Buttons ────────────────────────────────────────────────────────── */

.om-woo .button,
.om-woo button.button,
.om-woo input.button,
.om-woo a.button,
.om-woo .button.alt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 26px;
  border: none;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--beige), var(--accent));
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.2;
  box-shadow: var(--shadow-btn);
  transition: transform .15s ease, box-shadow .15s ease;
}

.om-woo .button:hover,
.om-woo button.button:hover,
.om-woo a.button:hover,
.om-woo .button.alt:hover {
  background: linear-gradient(135deg, var(--beige), var(--accent));
  color: #fff;
  transform: translateY(-2px);
}

.om-woo .button:active { box-shadow: var(--shadow-in); transform: none; }

/* ── Single product ─────────────────────────────────────────────────── */

.om-woo div.product {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.om-woo div.product .woocommerce-product-gallery,
.om-woo div.product .summary {
  float: none;
  width: auto;
  margin: 0;
}

.om-woo div.product .woocommerce-product-gallery img { border-radius: var(--radius); }

.om-woo div.product .product_title {
  font-size: var(--fs-h2);
  font-weight: 800;
  margin: 0 0 8px;
}

.om-woo div.product p.price,
.om-woo div.product span.price {
  color: var(--brown);
  font-size: 1.3rem;
  font-weight: 700;
}

.om-woo div.product form.cart { margin: 18px 0; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.om-woo div.product form.cart .quantity input {
  width: 72px;
  padding: 10px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--cream);
  text-align: center;
}

.om-woo div.product .product_meta { font-size: var(--fs-sm); color: var(--text-muted); }

/* Tabs and related products: quiet, card-free, on-brand */
.om-woo .woocommerce-tabs ul.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.om-woo .woocommerce-tabs ul.tabs::before { border: none; }

.om-woo .woocommerce-tabs ul.tabs li {
  margin: 0;
  padding: 0;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--cream);
}

.om-woo .woocommerce-tabs ul.tabs li::before,
.om-woo .woocommerce-tabs ul.tabs li::after { content: none; }

.om-woo .woocommerce-tabs ul.tabs li a {
  padding: 8px 18px;
  color: var(--brown);
  font-weight: 600;
}

.om-woo .woocommerce-tabs ul.tabs li.active { box-shadow: var(--shadow-in); }

.om-woo .related > h2,
.om-woo .upsells > h2 {
  font-size: var(--fs-h3);
  text-align: center;
  margin: 24px 0 14px;
}

@media (min-width: 800px) {
  .om-woo div.product { grid-template-columns: 1fr 1fr; align-items: start; }
  .om-woo div.product .woocommerce-tabs,
  .om-woo div.product .related,
  .om-woo div.product .upsells { grid-column: 1 / -1; }
}

/* ── Notices, cart, checkout ────────────────────────────────────────── */

.om-woo .woocommerce-message,
.om-woo .woocommerce-info,
.om-woo .woocommerce-error {
  border-top-color: var(--accent);
  background: var(--cream);
  border-radius: var(--radius-sm);
}

.om-woo table.shop_table {
  border-radius: var(--radius);
  border-color: var(--border-soft);
}

/* ── My Account ─────────────────────────────────────────────────────── */

.om-woo .woocommerce-MyAccount-navigation ul {
  display: grid;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.om-woo .woocommerce-MyAccount-navigation li a {
  display: block;
  padding: 13px 20px;
  border-radius: var(--radius-pill);
  background: var(--cream);
  color: var(--brown);
  font-weight: 600;
  box-shadow: var(--shadow-btn);
  transition: transform .15s ease, box-shadow .15s ease;
}

.om-woo .woocommerce-MyAccount-navigation li a:hover { transform: translateY(-2px); }

.om-woo .woocommerce-MyAccount-navigation li.is-active a {
  background: linear-gradient(135deg, var(--beige), var(--accent));
  color: #fff;
  box-shadow: var(--shadow-in);
}

.om-woo .woocommerce-MyAccount-content { color: var(--text-primary); }

.om-woo .woocommerce-MyAccount-content > p:first-child {
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-out);
}

/* Nav beside the content once there's room. */
@media (min-width: 800px) {
  body.woocommerce-account .om-woo .woocommerce {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
  }

  /* The shortcode prints a notices wrapper before the nav; without explicit
     placement it would claim the first cell and push the columns out. */
  body.woocommerce-account .om-woo .woocommerce > .woocommerce-notices-wrapper { grid-column: 1 / -1; }
  body.woocommerce-account .om-woo .woocommerce-MyAccount-navigation { grid-column: 1; margin: 0; }
  body.woocommerce-account .om-woo .woocommerce-MyAccount-content { grid-column: 2; }

  .om-woo .woocommerce-MyAccount-navigation ul { margin: 0; }
}

/* ── Forms (login, register, addresses, checkout) ───────────────────── */

.om-woo .form-row { margin: 0 0 14px; }

.om-woo .input-text,
.om-woo select,
.om-woo textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-primary);
  font: inherit;
}

.om-woo .input-text:focus,
.om-woo select:focus,
.om-woo textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--shadow-in);
}

.om-woo label { font-weight: 600; font-size: var(--fs-sm); }

.om-woo form.login,
.om-woo form.register,
.om-woo form.woocommerce-EditAccountForm {
  padding: 20px;
  border: none;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-out);
}

/* ── Account tables (orders, downloads) ─────────────────────────────── */

.om-woo table.shop_table {
  width: 100%;
  border: none;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-out);
  overflow: hidden;
}

.om-woo table.shop_table th {
  padding: 14px 16px;
  background: var(--cream);
  color: var(--brown);
  font-size: var(--fs-sm);
  font-weight: 700;
  border: none;
}

.om-woo table.shop_table td {
  padding: 14px 16px;
  border: none;
  border-top: 1px solid var(--border-soft);
  font-size: .95rem;
}

.om-woo table.shop_table .button {
  padding: 8px 18px;
  font-size: .85rem;
}

/* Order/download tables become stacked cards on phones. */
@media (max-width: 559px) {
  .om-woo table.shop_table,
  .om-woo table.shop_table tbody,
  .om-woo table.shop_table tr,
  .om-woo table.shop_table td { display: block; width: 100%; }

  .om-woo table.shop_table thead { display: none; }

  .om-woo table.shop_table tr {
    margin-bottom: 12px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-out);
    overflow: hidden;
  }

  .om-woo table.shop_table td { border-top: 1px solid var(--border-soft); }
  .om-woo table.shop_table tr td:first-child { border-top: none; }

  .om-woo table.shop_table td::before {
    content: attr(data-title) ": ";
    font-weight: 700;
    color: var(--brown);
  }

  .om-woo table.shop_table td.woocommerce-orders-table__cell-order-actions::before { content: none; }
}

/* Addresses and edit-account blocks share the card surface. */
.om-woo .woocommerce-Address,
.om-woo .woocommerce-customer-details {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-out);
}

.om-woo .woocommerce-Address address { font-style: normal; line-height: 1.9; }
