/* ==========================================================================
   TasteLokal — WooCommerce templates (PDP + Shop) v2.4
   ========================================================================== */

/* Reset WC core layout */
.woocommerce-breadcrumb { display: none !important; }
.tl-breadcrumb { padding: 16px 0 10px; font-size: 12px; color: var(--text-muted); }
.bc-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bc-list li { display: inline-flex; align-items: center; gap: 6px; }
.bc-list a { color: var(--text-muted); text-decoration: none; }
.bc-list a:hover { color: var(--teal); }
.bc-sep { color: var(--border); }

/* ==========================================================================
   SHOP HERO
   ========================================================================== */
.tl-shop-hero {
  background: linear-gradient(180deg, #fff 0%, var(--bg-soft) 100%);
  padding: 0 0 28px;
  border-bottom: 1px solid var(--border-light);
}
.tl-shop-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--navy);
  margin: 4px 0 8px;
  letter-spacing: -0.02em;
}
.tl-shop-sub { color: var(--text-muted); font-size: 14px; margin: 0; max-width: 640px; }
.tl-shop-desc { color: var(--text-muted); font-size: 14px; margin: 0 0 8px; }

.tl-shop-wrap { padding: 20px 0 56px; }

/* Filter chips */
.tl-filter-chips {
  display: flex; gap: 8px; overflow-x: auto;
  margin: 0 -16px 18px; padding: 4px 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.tl-filter-chips::-webkit-scrollbar { display: none; }
.tl-chip {
  flex: 0 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: all .15s;
}
.tl-chip:hover, .tl-chip.active { background: var(--teal); border-color: var(--teal); color: #fff; }

/* Toolbar */
.tl-toolbar {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 14px; border-bottom: 1px solid var(--border-light);
}
.woocommerce-result-count {
  font-size: 13px; color: var(--text-muted); margin: 0;
}
.woocommerce-ordering { margin: 0; }
.woocommerce-ordering select {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 36px 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.4' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
@media (min-width: 640px) {
  .tl-toolbar { flex-direction: row; justify-content: space-between; align-items: center; }
}

/* Empty state */
.tl-shop-empty {
  text-align: center;
  padding: 80px 20px;
  background: var(--bg-soft);
  border-radius: 16px;
  border: 1px dashed var(--border);
}
.tl-shop-empty svg { color: var(--text-muted); margin-bottom: 16px; }
.tl-shop-empty h2 { font-size: 22px; color: var(--navy); margin: 0 0 6px; }
.tl-shop-empty p { color: var(--text-muted); margin: 0 0 20px; }

/* ==========================================================================
   PRODUCT DETAIL PAGE
   ========================================================================== */
.tl-pdp-wrap { padding: 0 0 40px; }

.tl-pdp-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
  padding-top: 16px;
}

/* Gallery */
.tl-pdp-gallery { position: relative; }
.tl-pdp-gallery .woocommerce-product-gallery {
  width: 100% !important;
  margin: 0 !important;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-light);
}
.tl-pdp-gallery .woocommerce-product-gallery__image img {
  width: 100% !important;
  display: block;
  border-radius: 0;
}
.tl-pdp-gallery .flex-control-thumbs {
  margin: 12px 0 0 !important;
  padding: 0 !important;
  display: flex; gap: 8px; list-style: none;
}
.tl-pdp-gallery .flex-control-thumbs li {
  width: 64px !important;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
}
.tl-pdp-gallery .flex-control-thumbs img {
  width: 100% !important; border-radius: 10px;
  opacity: 0.6;
  border: 2px solid transparent;
  transition: all .15s;
}
.tl-pdp-gallery .flex-control-thumbs img.flex-active,
.tl-pdp-gallery .flex-control-thumbs img:hover {
  opacity: 1;
  border-color: var(--teal);
}
.tl-pdp-gallery .onsale {
  position: absolute;
  top: 14px; left: 14px;
  background: var(--orange);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  z-index: 9;
}

/* Promises */
.tl-pdp-promises {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 16px;
}
.tlpp-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px;
  background: var(--bg-soft);
  border-radius: 10px;
  border: 1px solid var(--border-light);
}
.tlpp-item svg { color: var(--teal); flex-shrink: 0; }
.tlpp-item span { display: flex; flex-direction: column; font-size: 12px; color: var(--text-muted); }
.tlpp-item strong { font-size: 12px; font-weight: 700; color: var(--navy); margin-bottom: 2px; }

/* Info side */
.tl-origin-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--teal-bg);
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.tl-origin-badge strong { font-weight: 800; }

.tl-product-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.tl-rating-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 14px;
  font-size: 13px;
}
.tlr-stars { color: #f59e0b; display: inline-flex; gap: 1px; }
.tlr-num { color: var(--navy); font-weight: 700; }
.tlr-count { color: var(--text-muted); text-decoration: none; }
.tlr-count:hover { color: var(--teal); }
.tlr-sep { color: var(--border); }
.tlr-sold { color: var(--text-muted); font-size: 12px; }
.tlr-sold strong { color: var(--green); font-weight: 700; }

.tl-price-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 4px;
}
.tl-price-row .price {
  font-size: 30px;
  font-weight: 800;
  color: var(--navy);
  margin: 0 !important;
  letter-spacing: -0.02em;
}
.tl-price-row .price del {
  font-size: 18px;
  color: var(--text-muted);
  font-weight: 400;
  margin-right: 8px;
}
.tl-price-row .price ins {
  text-decoration: none;
  color: var(--navy);
}
.tl-save-badge {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.3px;
}
.tl-tax-note { font-size: 11px; color: var(--text-muted); margin: 4px 0 18px; }

.tl-short-desc {
  background: var(--bg-soft);
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 14px;
  color: var(--navy);
  line-height: 1.55;
  margin-bottom: 18px;
  border-left: 3px solid var(--teal);
}
.tl-short-desc p { margin: 0; }

/* Delivery */
.tl-delivery {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 18px;
}
.tld-icon {
  width: 44px; height: 44px;
  background: var(--teal-bg);
  color: var(--teal-dark);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.tld-text { display: flex; flex-direction: column; gap: 2px; }
.tld-text strong { font-size: 13px; font-weight: 700; color: var(--navy); }
.tld-text span { font-size: 11px; color: var(--text-muted); }
.tld-pincode {
  grid-column: 1 / -1;
  display: flex; gap: 6px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-light);
  align-items: center; flex-wrap: wrap;
}
.tld-pincode input {
  flex: 1; min-width: 100px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  outline: none;
}
.tld-pincode input:focus { border-color: var(--teal); }
.tld-pincode button {
  background: var(--navy);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.tld-pincode button:hover { background: var(--navy-light); }
.tld-result {
  flex: 1 0 100%;
  font-size: 12px;
  color: var(--green);
  font-weight: 600;
}

/* ATC zone */
.tl-atc-zone form.cart {
  display: flex; gap: 10px; align-items: stretch; margin: 0 0 14px !important;
}
.tl-atc-zone .quantity {
  display: flex; align-items: stretch;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.tl-atc-zone .quantity input.qty {
  width: 56px !important;
  border: 0 !important;
  background: transparent !important;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--navy);
  padding: 0 !important;
  height: 100%;
  outline: none;
}
.tl-atc-zone .quantity input::-webkit-outer-spin-button,
.tl-atc-zone .quantity input::-webkit-inner-spin-button { display: none; }
.tl-atc-zone .single_add_to_cart_button {
  flex: 1;
  background: var(--teal) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 10px !important;
  padding: 14px 24px !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  letter-spacing: 0.3px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(13, 148, 136, 0.3);
  transition: all .15s;
}
.tl-atc-zone .single_add_to_cart_button:hover {
  background: var(--teal-dark) !important;
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(13, 148, 136, 0.4);
}
.tl-atc-zone .stock { font-size: 12px; }
.tl-atc-zone .in-stock { color: var(--green); }
.tl-atc-zone .out-of-stock { color: #dc2626; }

/* Action row */
.tl-actions-row {
  display: flex; gap: 8px; margin-bottom: 18px;
}
.tla-btn {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
  padding: 11px 14px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}
.tla-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
}

/* Meta */
.tl-meta {
  display: flex; flex-direction: column; gap: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
  font-size: 12px;
  color: var(--text-muted);
}
.tl-meta strong { color: var(--navy); font-weight: 600; }
.tl-meta a { color: var(--teal); text-decoration: none; }

/* Tabs */
.tl-pdp-tabs {
  margin: 40px 0 32px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--border-light);
  overflow: hidden;
}
.woocommerce-tabs ul.tabs {
  display: flex;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
  border-bottom: 1px solid var(--border-light);
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--bg-soft);
}
.woocommerce-tabs ul.tabs::-webkit-scrollbar { display: none; }
.woocommerce-tabs ul.tabs li {
  border: 0 !important;
  background: transparent !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 0 0 auto;
}
.woocommerce-tabs ul.tabs li a {
  display: block !important;
  padding: 14px 20px !important;
  color: var(--text-muted) !important;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all .15s;
}
.woocommerce-tabs ul.tabs li a:hover { color: var(--navy) !important; }
.woocommerce-tabs ul.tabs li.active a {
  color: var(--teal) !important;
  border-bottom-color: var(--teal) !important;
  background: #fff;
}
.woocommerce-Tabs-panel {
  padding: 24px !important;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}
.woocommerce-Tabs-panel h2 {
  font-size: 18px;
  color: var(--navy);
  margin: 0 0 14px;
}

/* Reviews styling */
.commentlist { padding: 0; list-style: none; margin: 0 0 24px; }
.commentlist .comment_container {
  display: flex; gap: 12px;
  padding: 18px;
  background: var(--bg-soft);
  border-radius: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--border-light);
}
.commentlist .avatar {
  width: 40px !important; height: 40px !important;
  border-radius: 50% !important;
  flex-shrink: 0;
}
.commentlist .comment-text {
  flex: 1;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}
.commentlist .meta {
  font-size: 13px !important; color: var(--navy) !important;
  margin-bottom: 4px !important;
}
.commentlist .star-rating { color: #f59e0b !important; }
.commentlist .description { font-size: 14px; color: var(--text); }

/* Related */
.tl-related .related h2 {
  font-size: 22px;
  color: var(--navy);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
}

/* ==========================================================================
   ≥ 768px
   ========================================================================== */
@media (min-width: 768px) {
  .tl-pdp-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .tl-pdp-promises { grid-template-columns: repeat(2, 1fr); }
  .tl-shop-title { font-size: 36px; }
  .tl-product-title { font-size: 30px; }
  .tl-delivery { grid-template-columns: auto 1fr auto; }
  .tld-pincode { grid-column: auto; padding-top: 0; border-top: 0; margin-top: 0; }
}

/* ≥ 1024px */
@media (min-width: 1024px) {
  .tl-pdp-grid { gap: 48px; }
  .tl-pdp-promises { grid-template-columns: repeat(4, 1fr); }
  .tl-product-title { font-size: 34px; }
}
