/*
Theme Name: Taifal
Theme URI: https://example.com/taifal
Author: SKS Team
Author URI: https://example.com
Description: Lightweight WooCommerce-ready theme replicating Taif Al Emarat style. Homepage features hero and product category grid. Edit content via WP Menus, Customizer, and WooCommerce.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: taifal
*/

/* Base reset and typography */
html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  color: #2d2d2d;
  background: #fff;
  max-width: 100%;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* Layout helpers */
.tf-container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

.tf-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ffffff;
  border-bottom: 1px solid #eee;
}
.tf-header__row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  height: 92px;
}
.tf-menu-close { display: none; }
.tf-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  justify-self: center;
  min-width: 0;
}
.tf-logo a { display: block; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tf-logo img { display: block; max-height: 64px; height: auto; width: auto; }
.tf-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.tf-nav a {
  font-size: 15px;
  opacity: .9;
}
.tf-nav .current-menu-item > a { font-weight: 600; }

.tf-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: nowrap;
}
.tf-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f4f4f4;
  color: #555;
  font-size: 12px;
}
.tf-cart { position: relative; }
.tf-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: #6c5139;
  color: #fff;
  font-size: 10px;
  border-radius: 10px;
  padding: 1px 5px;
}
.tf-currency { font-size: 14px; color: #444; }
.tf-caret { opacity: .6; margin-left: 2px; }
.tf-header-right { display: inline-flex; gap: 14px; margin: 0 6px; list-style: none; }
.tf-header-right li { margin: 0; }
.tf-header-right a, .tf-howto { font-size: 14px; opacity: .9; }

.tf-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 24px; }
.tf-menu > li { position: relative; }
.tf-menu a { display: inline-block; padding: 6px 2px; }
.tf-menu li:hover > a { opacity: 1; }
.tf-menu li ul {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 10px 8px;
  list-style: none;
  display: none;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}
.tf-menu li:hover > ul { display: block; }
.tf-menu li ul li a { padding: 6px 10px; white-space: nowrap; display: block; }

/* Top promo banner */
.tf-topbar {
  background: #efe8e1;
  color: #6c5139;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 0;
  text-align: center;
}

.tf-hero {
  position: relative;
  min-height: clamp(420px, 60vh, 740px);
  display: grid;
  align-items: center;
  background-size: cover;
  background-position: center;
}
.tf-hero__img { display: none; width: 100%; height: auto; }
.tf-hero__overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 30%, rgba(255,255,255,.15), rgba(0,0,0,0) 60%), linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,0));
}
.tf-hero__content {
  position: relative;
  padding: 80px 0;
  color: #2e2a27;
  text-shadow: 0 1px 0 rgba(255,255,255,.5);
}
.tf-hero__kicker {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 46px;
  line-height: 1.1;
  margin: 0 0 10px;
  color: #6c5139;
}
.tf-hero__title {
  font-weight: 800;
  font-size: 28px;
  letter-spacing: .5px;
  margin: 0 0 8px;
}
.tf-hero__subtitle {
  font-size: 18px;
  opacity: .95;
}

/* Category grid */
.tf-cats {
  background: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\" opacity=\"0.06\"><defs><pattern id=\"p\" width=\"20\" height=\"20\" patternUnits=\"userSpaceOnUse\"><circle cx=\"10\" cy=\"10\" r=\"2\" fill=\"%23999\"/></pattern></defs><rect width=\"100%\" height=\"100%\" fill=\"url(%23p)\"/></svg>') repeat;
  padding: 40px 0 30px;
}
.tf-cats__viewport { position: relative; }
.tf-cats__grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 1fr);
  gap: 22px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
  -ms-overflow-style: none; /* IE/Edge */
  scrollbar-width: none; /* Firefox */
}
.tf-cats__grid::-webkit-scrollbar { display: none; } /* WebKit */
.tf-card {
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 6px 30px rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 18px;
  scroll-snap-align: start;
}
.tf-cats__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,.08);
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(0,0,0,.08);
  display: grid;
  place-items: center;
  font-size: 20px;
  color: #6c5139;
  cursor: pointer;
}
.tf-cats__arrow--left { left: -10px; }
.tf-cats__arrow--right { right: -10px; }
.tf-cats__arrow[disabled] {
  opacity: .4;
  cursor: default;
  pointer-events: none;
}
.tf-card__image {
  height: 220px;
  display: grid;
  place-items: end center;
}
.tf-card__image img {
  max-height: 220px;
  object-fit: contain;
}
.tf-card__label {
  margin-top: 14px;
  background: #efe8e1;
  color: #6c5139;
  padding: 10px 16px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
}

/* Category spotlight product rows */
.tf-cat-products { padding: 18px 0 40px; }
.tf-catblock { padding: 28px 0 14px; border-top: 1px solid #eee; }
.tf-catblock__title { margin: 0 0 18px; font-size: 18px; font-weight: 800; color: #2e2a27; letter-spacing: .3px; }
.tf-catblock__title a { color: inherit; }
.tf-prodgrid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 280px;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding: 4px 0 14px;
}
.tf-prodgrid::-webkit-scrollbar { display: none; }
.tf-prodviewport { position: relative; }
.tf-prod {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 6px 30px rgba(0,0,0,.06);
}
.tf-prod__image { width: 120px; height: 120px; display: grid; place-items: center; }
.tf-prod__image img { max-width: 100%; max-height: 100%; object-fit: contain; }
.tf-prod__title { font-weight: 700; margin-bottom: 4px; }
.tf-prod__price { color: #6c5139; font-weight: 700; }
.tf-prod--empty { opacity: .75; pointer-events: none; }

/* Product card in grid */
.tf-prodcard {
  background: #fff;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid #eee;
  box-shadow: 0 2px 14px rgba(0,0,0,.04);
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  transition: transform .18s ease, box-shadow .18s ease;
  scroll-snap-align: start;
  position: relative;
}
.tf-prodcard__like {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 1;
}
.tf-like,
.tf-prodcard__like .yith-wcwl-add-button a,
.tf-prodcard__like .yith-wcwl-wishlistexistsbrowse a,
.tf-prodcard__like .yith-wcwl-wishlistaddedbrowse a {
  display: inline-grid !important;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 8px 20px rgba(0,0,0,.06);
  color: #6c5139;
}
.tf-like::after { content: "♡"; }
.tf-prodcard__like .yith-wcwl-add-button a,
.tf-prodcard__like .yith-wcwl-wishlistexistsbrowse a,
.tf-prodcard__like .yith-wcwl-wishlistaddedbrowse a { text-indent: -9999px; position: relative; }
.tf-prodcard__like .yith-wcwl-add-button a:after { content: "♡"; position: absolute; inset: 0; display: grid; place-items: center; text-indent: 0; color: #7a7a7a; }
.tf-prodcard__like .yith-wcwl-wishlistexistsbrowse a:after,
.tf-prodcard__like .yith-wcwl-wishlistaddedbrowse a:after { content: "♥"; position: absolute; inset: 0; display: grid; place-items: center; text-indent: 0; color: #e74c3c; }
.tf-prodcard__image-link { display: block; }
.tf-prodcard__image {
  aspect-ratio: 4 / 5;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  text-align: center;
}
.tf-prodcard__image img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  margin: 0 auto;
  object-fit: contain;
  object-position: center center;
}
.tf-prodcard__body {
  padding: 12px 12px 14px;
  border-top: 1px solid #eee;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}
.tf-prodcard__title { font-weight: 700; font-size: 14px; line-height: 1.35; min-height: 38px; color: #222; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tf-price { display: flex; align-items: baseline; gap: 8px; }
.tf-price__current { font-weight: 800; font-size: 14px; color: #111; }
.tf-price__old { color: #8a8a8a; text-decoration: line-through; font-size: 13px; }
.tf-price__off { color: #1dbf73; font-weight: 700; font-size: 13px; }
.tf-prodcard:hover { transform: translateY(-2px); box-shadow: 0 6px 30px rgba(0,0,0,.08); }

/* Card actions */
.tf-prodcard__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}
.tf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: #fff;
  color: #111;
}
.tf-btn--outline { border: 1px solid #ddd; width: 100%; }
.tf-btn--cart:before { content: "🛒"; margin-right: 6px; }
.tf-btn:hover { background: #f8f8f8; }
.tf-wishlist .yith-wcwl-add-button a,
.tf-wishlist .yith-wcwl-wishlistexistsbrowse a,
.tf-wishlist .yith-wcwl-wishlistaddedbrowse a {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #efe8e1;
  color: #6c5139;
  text-indent: -9999px;
  overflow: hidden;
  position: relative;
}
.tf-wishlist .yith-wcwl-add-button a:after,
.tf-wishlist .yith-wcwl-wishlistexistsbrowse a:after,
.tf-wishlist .yith-wcwl-wishlistaddedbrowse a:after {
  content: "♥";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-indent: 0;
}

@media (max-width: 1024px) {
  .tf-prodgrid { grid-auto-columns: 260px; }
}
@media (max-width: 768px) {
  .tf-prodgrid { grid-auto-columns: 240px; }
}
@media (max-width: 460px) {
  .tf-prodgrid { grid-auto-columns: 220px; }
}

/* WooCommerce archive (category/shop) */
.woocommerce ul.products {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  overflow: visible;
}
.woocommerce ul.products::before,
.woocommerce ul.products::after {
  content: none !important;
  display: none !important;
}
.woocommerce ul.products::-webkit-scrollbar { display: initial; }
.woocommerce ul.products li.product {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  position: relative;
  float: none !important;
  margin: 0 !important;
  width: auto !important;
  display: flex;
  flex-direction: column;
}
/* Use the same card component as homepage inside archive items */
.woocommerce ul.products li.product .tf-prodcard { margin: 0; }
.woocommerce ul.products li.product .tf-prodcard .onsale {
  position: absolute;
  top: 12px !important;
  left: 12px !important;
  margin: 0;
  background: #fff;
  color: #6c5139;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(0,0,0,.06);
  padding: 6px 10px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: auto !important;
  min-width: 56px;
  height: auto;
  right: auto !important;
  transform: none !important;
  z-index: 2;
  font-size: 12px;
}
/* Button in archive uses default Woo output; reuse our button look */
.woocommerce ul.products li.product .tf-prodcard .button {
  width: 100%;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #fff;
  color: #111;
  font-weight: 700;
  padding: 8px 12px;
}
.woocommerce ul.products li.product .tf-prodcard .button:hover { background: #f8f8f8; }
@media (max-width: 1200px) {
  .woocommerce ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .woocommerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .woocommerce ul.products { grid-template-columns: 1fr; }
}

/* Archive header spacing */
.woocommerce .woocommerce-result-count { margin: 12px 0 16px; }
.woocommerce .woocommerce-ordering { margin: 12px 0 16px; }

/* Footer */
.tf-footer {
  background: #f6f3f1;
  border-top: 1px solid #e8e2db;
  padding: 36px 0 18px;
  margin-top: 24px;
  color: #3a3a3a;
}

/* Shop layout with filters */
.tf-shop {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  padding: 16px 0 26px;
}
.tf-shop__toolbar { display: none; margin: 0 0 10px; }
.tf-filters {
  border-right: 1px solid #eee;
  padding-right: 24px;
}
.tf-filters-close {
  display: none;
  position: absolute;
  top: 10px;
  right: 10px;
  background: #f1efec;
  border: 1px solid #e0d6ca;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  line-height: 30px;
  text-align: center;
  color: #6c5139;
}
.tf-filters .widget { margin: 0 0 16px; padding: 0 0 12px; border-bottom: 1px solid #f0f0f0; }
.tf-filters .widget-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0 0 10px;
  color: #6c5139;
}
.tf-acc { border-bottom: 1px solid #f0f0f0; padding: 0 0 12px; margin: 0 0 14px; }
.tf-acc > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6c5139;
}
.tf-acc > summary::-webkit-details-marker { display: none; }
.tf-acc > summary:after {
  content: "+";
  color: #c9b8a4;
  font-size: 18px;
  line-height: 1;
}
.tf-acc[open] > summary:after { content: "–"; }
.tf-acc__body { margin-top: 10px; }
.tf-price-form .tf-price-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 10px;
}
.tf-price-form label { display: grid; gap: 6px; font-size: 12px; color: #6b6b6b; }
.tf-price-form input[type="number"] {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 8px 10px;
}
.tf-filters .price_slider_wrapper .price_slider_amount .button { display: none; }
.tf-filters .price_slider_wrapper .price_slider { background: #eee; height: 4px; }
.tf-filters .price_slider_wrapper .ui-slider-range { background: #6c5139; }
.tf-filters .price_slider_wrapper .ui-slider-handle { background: #6c5139; width: 14px; height: 14px; top: -5px; border-radius: 50%; }

/* Sort By button-like select */
.woocommerce .woocommerce-ordering {
  display: inline-block;
}
.woocommerce .woocommerce-ordering select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: 1px solid #c9b8a4;
  background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6"><path fill="%236c5139" d="M0 0l5 6 5-6z"/></svg>') no-repeat right 12px center;
  padding: 10px 34px 10px 14px;
  border-radius: 6px;
  font-weight: 700;
  color: #6c5139;
}

@media (max-width: 960px) {
  .tf-shop { grid-template-columns: 1fr; }
  .tf-shop__toolbar { display: flex; justify-content: flex-end; }
  .tf-filters { 
    display: none;
    border-right: 0; 
    border-bottom: 0; 
    padding: 16px; 
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 999;
    overflow: auto;
    margin: 0;
  }
  .tf-filters.is-open { display: block; }
  .tf-filters-close { display: block; }
  .no-scroll { overflow: hidden; }
  .woocommerce .woocommerce-ordering { width: 100%; margin: 8px 0; }
  .woocommerce .woocommerce-ordering select { width: 100%; }
}
.tf-footer__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
  margin-bottom: 24px;
}
.tf-footer h4 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
}
.tf-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.tf-footer li {
  margin: 8px 0;
  opacity: .9;
}
.tf-copy {
  border-top: 1px solid #e8e2db;
  padding-top: 14px;
  font-size: 13px;
  opacity: .9;
}

/* Mobile */
@media (max-width: 1024px) {
  .tf-cats__grid { grid-template-columns: none; grid-auto-columns: minmax(240px, 1fr); }
}
@media (max-width: 768px) {
  .tf-header__row { height: 72px; grid-template-columns: auto 1fr auto; }
  .tf-logo img { max-height: 54px; }
  .tf-nav--left { 
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    width: 80%;
    max-width: 320px;
    background: #fff;
    border-right: 1px solid #eee;
    padding: 70px 16px 16px;
    transform: translateX(-100%);
    transition: transform .25s ease;
    display: block;
    z-index: 1000;
  }
  .tf-nav--left.is-open { transform: translateX(0); }
  .tf-menu-close {
    position: absolute;
    top: 16px;
    right: 12px;
    background: #f1efec;
    border: 1px solid #e0d6ca;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    line-height: 30px;
    text-align: center;
    color: #6c5139;
  }
  .tf-cats__grid { grid-template-columns: none; grid-auto-columns: minmax(220px, 1fr); }
  .tf-hero { min-height: 420px; }
  .tf-hero__kicker { font-size: 38px; }
}
@media (max-width: 480px) {
  .tf-header__row { gap: 6px; }
  .tf-toolbar { gap: 8px; flex-shrink: 1; }
  .tf-logo a { max-width: 150px; }
  .tf-logo img { max-height: 44px; }
  .tf-icon { width: 20px; height: 20px; font-size: 11px; }
  .tf-container { padding: 0 10px; }
  .tf-hero { min-height: clamp(340px, 55vh, 560px); }
  /* Give header icons extra breathing room from the right edge */
  .tf-header .tf-container { padding: 0 14px; }
  .tf-toolbar { padding-right: 2px; }
}
@media (max-width: 360px) {
  .tf-logo a { max-width: 118px; }
  .tf-toolbar { gap: 4px; }
  .tf-icon { width: 16px; height: 16px; font-size: 10px; }
}
@media (max-width: 460px) {
  .tf-cats__grid { grid-template-columns: none; grid-auto-columns: minmax(220px, 1fr); }
}

/* Tighten mobile spacing and prevent visual clipping on very small screens */
@media (max-width: 420px) {
  .tf-container { padding: 0 12px; max-width: 100%; }
  .tf-hero { min-height: auto; }
  .tf-hero__content { padding: 16px 0; }
  .tf-hero__kicker { font-size: 30px; }
  .tf-hero__title { font-size: 22px; }
  .tf-cats__grid { grid-auto-columns: 190px; gap: 16px; padding: 0 16px 10px; scroll-padding: 16px; }
  .tf-prodgrid { grid-auto-columns: 220px; gap: 14px; padding: 4px 16px 10px; scroll-padding: 16px; }
  .tf-shop { gap: 18px; }
  .woocommerce .woocommerce-ordering { width: 100%; }
  .woocommerce .woocommerce-ordering select { width: 100%; }
}

/* Switch to image-based hero on mobile to avoid cropping */
@media (max-width: 768px) {
  .tf-hero { background-image: none !important; }
  .tf-hero__img { display: block; }
}

/* Reduce first section spacing on small screens */
@media (max-width: 480px) {
  .tf-cats { padding-top: 20px; }
}

/* Catalog - extra mobile tuning */
@media (max-width: 768px) {
  .tf-shop__title { font-size: 22px; margin: 6px 0 8px; }
  .woocommerce .woocommerce-result-count { font-size: 12px; margin: 6px 0 8px; }
  .woocommerce ul.products { grid-template-columns: 1fr; gap: 16px; }
  .woocommerce ul.products li.product .tf-prodcard { padding: 12px; border-radius: 12px; }
  .woocommerce ul.products li.product .tf-prodcard .button { width: 100%; }
  .tf-prodcard__image { aspect-ratio: 1 / 1; padding: 10px; }
  .tf-prodcard__title { font-size: 13px; min-height: auto; }
  .tf-price { gap: 6px; }
}

/* Cart */
.tf-cart__grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
}
.tf-cart__title { font-size: 28px; margin: 10px 0 16px; }
.tf-cartlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.tf-cartitem { display: grid; grid-template-columns: 100px 1fr; gap: 14px; padding: 12px; border: 1px solid #eee; border-radius: 12px; background: #fff; }
.tf-cartitem__media img { width: 100%; height: auto; border-radius: 8px; }
.tf-cartitem__name a { font-weight: 700; color: inherit; }
.tf-cartitem__meta { margin: 6px 0; color: #111; font-weight: 700; }
.tf-cartitem__actions { display: flex; align-items: center; gap: 12px; }
.tf-remove { color: #6c5139; }
.tf-summary { border: 1px solid #eee; border-radius: 12px; background: #fff; padding: 16px; position: sticky; top: 90px; }
.tf-summary__title { margin: 0 0 10px; font-size: 16px; font-weight: 800; }
.tf-cart__update { margin-top: 10px; }

/* Checkout */
.tf-co__grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
}
.tf-co__title { font-size: 26px; margin: 6px 0 14px; }
.tf-co__section { margin-bottom: 16px; }
.tf-co__summary .tf-summary { position: sticky; top: 90px; }

@media (max-width: 980px) {
  .tf-cart__grid, .tf-co__grid { grid-template-columns: 1fr; }
  .tf-summary { position: static; }
}

/* Product page */
.tf-prodpage__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 32px;
  align-items: start;
  padding-top: 10px;
}
.tf-prodpage__gallery .woocommerce-product-gallery { position: static; }
.tf-prodpage__summary .price { font-weight: 800; color: #111; font-size: 20px; }
.tf-prodpage__summary .single_add_to_cart_button.button {
  width: calc(100% - 64px);
  display: inline-block;
  vertical-align: middle;
  border-radius: 6px;
  border: 1px solid transparent;
  background: #2f4a3a;
  color: #fff;
  font-weight: 700;
  padding: 12px 18px;
}
.tf-prodpage__summary .single_add_to_cart_button.button:hover { background: #244033; }
.tf-prodpage__sections .woocommerce-tabs { margin-top: 24px; }
.tf-prodpage__sections .related, .tf-prodpage__sections .upsells { margin-top: 36px; }

/* Right column controls */
.tf-prodpage .quantity .qty {
  width: 90px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid #ddd;
  padding: 6px 10px;
  margin: 6px 8px 12px 0;
}
.tf-prodpage .variations select,
.tf-prodpage .variations .value select {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px 12px;
}
.tf-prodpage .woocommerce-product-details__short-description { margin: 10px 0 14px; color: #444; }
.tf-prodpage .product_meta { font-size: 13px; color: #6b6b6b; }

/* Wishlist button beside add to cart (if YITH exists) */
.tf-prodpage .yith-wcwl-add-to-wishlist,
.tf-prodpage .yith-wcwl-wishlistexistsbrowse,
.tf-prodpage .yith-wcwl-wishlistaddedbrowse {
  display: inline-block;
  vertical-align: middle;
  margin-left: 12px;
}
.tf-prodpage .yith-wcwl-add-to-wishlist a,
.tf-prodpage .yith-wcwl-wishlistexistsbrowse a,
.tf-prodpage .yith-wcwl-wishlistaddedbrowse a {
  width: 50px;
  height: 50px;
  display: inline-block;
  border: 1px solid #c9b8a4;
  border-radius: 8px;
  background: #fff;
  text-indent: -9999px;
  position: relative;
}
.tf-prodpage .yith-wcwl-add-to-wishlist a:after,
.tf-prodpage .yith-wcwl-wishlistexistsbrowse a:after,
.tf-prodpage .yith-wcwl-wishlistaddedbrowse a:after {
  content: "♡";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #6c5139;
  text-indent: 0;
  font-size: 18px;
}
.tf-prodpage .yith-wcwl-wishlistaddedbrowse a:after { content: "♥"; }

/* Gallery styling like reference */
.woocommerce-product-gallery { --thumb-size: 72px; margin-bottom: 32px; position: relative; z-index: 0; }
.single-product .onsale { position: absolute; z-index: 5; }
.woocommerce-product-gallery .woocommerce-product-gallery__image a { display: block; background: #fff; border-radius: 12px; }
.woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
}
.woocommerce-product-gallery__wrapper { margin-bottom: 16px; }
.flex-control-thumbs {
  display: grid !important;
  grid-template-columns: repeat(5, var(--thumb-size));
  gap: 10px;
  margin-top: 16px !important;
  margin-bottom: 16px !important;
  clear: both;
}
.flex-control-thumbs li { width: var(--thumb-size) !important; margin: 0 !important; }
.flex-control-thumbs img {
  width: 100%;
  height: var(--thumb-size);
  object-fit: cover;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 2px;
  cursor: pointer;
  opacity: .75;
  background: #fff;
}
.flex-control-thumbs img.flex-active,
.flex-control-thumbs img:hover { opacity: 1; border-color: #6c5139; }

@media (max-width: 1024px) {
  .tf-prodpage__grid { grid-template-columns: 1fr; }
  .tf-prodpage__gallery .woocommerce-product-gallery { position: static; }
  .woocommerce-product-gallery { --thumb-size: 64px; }
}

/* Product info (below gallery) */
.tf-prodinfo__grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 48px;
  align-items: start;
  padding: 26px 0;
}
.tf-prodinfo__title { font-size: 28px; margin: 0 0 12px; }
.tf-prodinfo__desc { font-size: 16px; line-height: 1.7; color: #2a2a2a; }
.tf-prodinfo__desc { margin-top: 20px; }
.tf-prodinfo__desc > h2 { margin-top: 16px; }
.tf-prodinfo__subtitle { font-weight: 800; font-size: 18px; margin: 0 0 10px; }
.tf-prodinfo__details table.shop_attributes { width: 100%; }
.tf-prodinfo__details th, .tf-prodinfo__details td { padding: 6px 0; }
.tf-accordion > summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  cursor: pointer;
  font-weight: 700;
}
.tf-accordion > summary::-webkit-details-marker { display: none; }
.tf-accordion > summary::after { content: "+"; }
.tf-accordion[open] > summary::after { content: "–"; }
.tf-accordion__body { padding: 6px 0 0; font-size: 14px; }
.tf-accordion__body ul { margin: 0; padding-left: 18px; }

@media (max-width: 1024px) {
  .tf-prodinfo__grid { grid-template-columns: 1fr; gap: 24px; }
}

