/* ==========================================================================
   shop-product.css
   --------------------------------------------------------------------------
   Styles for shop.html and product.html.
   ========================================================================== */

/* ---- HAMBURGER (shared) ---- */
.hamburger { display: none; background: none; border: none; cursor: pointer; font-size: 24px; color: var(--ink); }
@media (max-width: 800px) {
  .hamburger { display: block; }
  .header .wrap { flex-wrap: nowrap; justify-content: space-between; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; flex-direction: column; align-items: flex-start; gap: 0;
    border-top: 1px solid var(--line); box-shadow: 0 8px 20px rgba(0,0,0,.08);
    max-height: 0; overflow: hidden; transition: max-height .35s ease;
  }
  .nav.open { max-height: 360px; }
  .nav a { width: 100%; padding: 14px 24px; font-size: 16px; border-bottom: 1px solid #f0f0f0; }
  .cart-icon { padding: 14px 24px; }
}

/* ---- BREADCRUMB ---- */
.breadcrumb {
  padding: 18px 24px 0;
  font-size: 13px; color: var(--grey);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.breadcrumb a { color: var(--grey); }
.breadcrumb a:hover { color: var(--green); }
.breadcrumb i { font-size: 9px; }
.breadcrumb span { color: var(--ink); font-weight: 500; }

/* ---- SHOP HEADING ---- */
.shop-heading { text-align: center; padding: 46px 24px 10px; }
.shop-heading h1 {
  font-family: var(--font-head); font-size: 40px; font-weight: 800;
  color: var(--ink); margin-bottom: 8px;
}
.shop-heading p { color: var(--grey); font-size: 15px; }

/* ---- FILTER BAR ---- */
.shop-filters { padding: 24px 0 10px; }
.filters-inner { display: flex; flex-direction: column; gap: 14px; }
.shop-search {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 30px;
  padding: 12px 18px;
}
.shop-search i { color: var(--green); }
.shop-search input {
  border: none; outline: none; width: 100%; font-size: 15px;
  font-family: var(--font-body); color: var(--ink);
}
.filter-right { display: flex; justify-content: flex-end; }
.sort-select {
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 30px;
  font-size: 14px; font-family: var(--font-body); color: var(--ink);
  background: #fff; outline: none;
}
@media (min-width: 700px) {
  .filters-inner { flex-direction: row; align-items: center; justify-content: space-between; }
  .shop-search { max-width: 420px; }
}

.shop-grid-section { padding: 20px 24px 60px; }
.empty-msg { text-align: center; color: var(--grey); padding: 40px 0; font-size: 15px; }

/* ==========================================================================
   PRODUCT GRID + CARDS
   ========================================================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.card {
  position: relative;
  display: block;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-8px); box-shadow: 0 18px 38px rgba(0,0,0,.12); }
.card .imgwrap {
  position: relative; overflow: hidden;
  background: var(--sage-2);
  aspect-ratio: 4 / 5;
}
.card .imgwrap img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 15%;
  transition: transform .5s ease; display: block;
}
.card:hover .imgwrap img { transform: scale(1.06); }

.badge {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: #fff; font-size: 11px; font-weight: 700;
  letter-spacing: .6px; text-transform: uppercase;
  padding: 7px 16px; border-radius: 30px;
  box-shadow: 0 6px 16px rgba(46,158,31,.4);
}

.card h3 {
  font-family: var(--font-head); font-size: 16px; font-weight: 600;
  text-align: center; margin: 18px 0 8px; padding: 0 14px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card .price {
  text-align: center; font-size: 15px; padding: 0 14px 20px;
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
}
.card .price .old { color: var(--grey); text-decoration: line-through; font-size: 13px; }
.card .price .new { color: var(--green); font-weight: 700; }

@media (max-width: 900px) and (min-width: 801px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (max-width: 800px) {
  .grid { grid-template-columns: 1fr; gap: 14px; }
  .card { border-radius: 14px; }
  .card h3 { font-size: 13px; margin: 12px 0 4px; padding: 0 10px; }
  .card .price { font-size: 12px; padding: 0 10px 14px; }
  .badge { top: 10px; left: 10px; padding: 5px 12px; font-size: 10px; }
}

/* ==========================================================================
   PRODUCT DETAIL PAGE
   ========================================================================== */
.product-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding: 24px 24px 60px;
}
@media (min-width: 900px) {
  .product-detail { grid-template-columns: 1fr 1fr; gap: 50px; padding: 34px 24px 80px; }
}

/* ---- Gallery ---- */
.product-gallery { display: flex; flex-direction: column; gap: 14px; }
.main-image {
  position: relative;
  width: 100%; aspect-ratio: 4 / 5;
  border-radius: 14px; overflow: hidden;
  background: var(--sage-2);
  border: 1px solid var(--line);
}
.main-image img { width: 100%; height: 100%; object-fit: cover; }
.main-image .badge { position: absolute; top: 14px; left: 14px; z-index: 2; }

.gallery-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255,255,255,.9); color: var(--ink);
  border: none; cursor: pointer; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.18); z-index: 3;
  transition: background .2s, color .2s;
}
.gallery-arrow:hover { background: var(--green); color: #fff; }
.gallery-arrow.g-prev { left: 14px; }
.gallery-arrow.g-next { right: 14px; }

.thumbs { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.thumb {
  flex-shrink: 0; width: 70px; height: 88px; border-radius: 8px; overflow: hidden;
  border: 2px solid transparent; cursor: pointer; background: var(--sage-2);
}
.thumb.active { border-color: var(--green); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Short description under the gallery, matching the reference layout */
.product-desc-short {
  font-size: 14.5px; color: #444; line-height: 1.8;
  margin-top: 4px;
}

/* ---- Info panel ---- */
.product-info h1 {
  font-family: var(--font-head); font-size: 30px; font-weight: 700;
  color: var(--ink); margin-bottom: 12px;
}
.product-price { font-size: 22px; margin-bottom: 22px; }
.product-price .old { color: var(--grey); text-decoration: line-through; margin-right: 10px; font-size: 17px; }
.product-price .new { color: var(--ink); font-weight: 700; }

.variant-group { margin-bottom: 20px; }
.variant-group label {
  display: block; font-size: 13px; font-weight: 700;
  color: var(--ink); margin-bottom: 10px; text-transform: uppercase; letter-spacing: .5px;
}
.size-label-row { display: flex; align-items: center; justify-content: space-between; }
.size-guide-link {
  background: none; border: none; color: var(--green);
  font-size: 13px; font-weight: 600; text-decoration: underline;
  cursor: pointer; margin-bottom: 10px;
}
.variant-options { display: flex; flex-wrap: wrap; gap: 10px; }
.variant-btn {
  padding: 9px 18px; border: 1px solid var(--line); border-radius: 24px;
  background: #fff; font-size: 14px; color: var(--ink);
  cursor: pointer; transition: all .15s;
}
.variant-btn:hover { border-color: var(--green); }
.variant-btn.selected { background: var(--green); border-color: var(--green); color: #fff; }

.qty-row { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.qty-row label { font-size: 13px; font-weight: 700; color: var(--ink); text-transform: uppercase; letter-spacing: .5px; }
.qty-control {
  display: flex; align-items: center; gap: 0;
  border: 1px solid var(--line); border-radius: 24px; overflow: hidden;
}
.qty-control button {
  width: 36px; height: 36px; border: none; background: #fff;
  font-size: 17px; cursor: pointer; color: var(--ink);
}
.qty-control button:hover { background: var(--sage-2); }
.qty-control span { width: 34px; text-align: center; font-size: 15px; font-weight: 600; }

.add-to-cart-btn { width: 100%; padding: 15px; font-size: 16px; margin-bottom: 14px; }
.cod-note { font-size: 13px; color: var(--grey); display: flex; align-items: center; gap: 8px; margin-bottom: 28px; }
.cod-note i { color: var(--green); }

/* ---- PRODUCT DETAILS (separate collapsible bullet section) ---- */
.product-details-box {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.details-toggle {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  background: none; border: none; cursor: pointer;
  padding: 0 0 14px;
  font-family: var(--font-head); font-size: 19px; font-weight: 700;
  color: var(--ink);
}
.details-toggle i { font-size: 14px; color: var(--ink); }
.details-list {
  list-style: none;
  max-height: 0; overflow: hidden;
  transition: max-height .35s ease;
  font-size: 14.5px; color: #444; line-height: 1.9;
}
.details-list.open { max-height: 800px; }
.details-list li {
  padding-left: 18px; position: relative; margin-bottom: 10px;
}
.details-list li::before {
  content: "•"; position: absolute; left: 0; color: var(--green); font-weight: 700;
}

/* ---- SIZE CHART MODAL ---- */
.modal-overlay {
  display: none;
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  z-index: 200; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: #fff; border-radius: 14px; padding: 24px;
  max-width: 480px; width: 100%; max-height: 85vh; overflow-y: auto;
  position: relative;
}
.modal-box h3 { font-family: var(--font-head); font-size: 20px; margin-bottom: 16px; }
.modal-box img { width: 100%; border-radius: 8px; }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff;
  cursor: pointer; font-size: 14px; color: var(--ink);
}
.modal-close:hover { background: var(--sage-2); }

/* FIX: allow the gallery/info columns to shrink so their contents
   (like the thumbnail strip) can scroll internally instead of
   forcing the whole page wider than the screen. */
.product-gallery,
.product-info {
  min-width: 0;
}

/* Safety net: never allow horizontal scroll on this page */
.product-detail {
  overflow-x: hidden;
}

/* Make sure the thumbnail strip scrolls smoothly within its own box */
.thumbs {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
@media (max-width: 800px) {
  .thumb { width: 56px; height: 70px; }
}