/* ================================================================
   view_product.css — Product Detail Page
   গরের বাজার — Modern E-Commerce Product View
   Design: Vertical thumbnail strip (left) + zoom hover (right panel)
   Mobile: App-like single column with sticky buy bar
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

/* ── Reset & Root ─────────────────────────────────────────── */
:root {
  --primary: #fa832e;
  --primary-dk: #e56d15;
  --black: #111111;
  --white: #ffffff;
  --gray-50: #f8f9fa;
  --gray-100: #f1f3f5;
  --gray-200: #e9ecef;
  --gray-400: #adb5bd;
  --gray-600: #6c757d;
  --gray-800: #343a40;
  --green: #16a34a;
  --green-lt: #dcfce7;
  --red: #dc2626;
  --red-lt: #fee2e2;
  --yellow: #fbbf24;
  --blue: #2563eb;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.14);
  --transition: 0.3s ease;
}

/* ── Breadcrumb ───────────────────────────────────────────── */
.headerLink {
  max-width: 1200px;
  margin: 14px auto 0;
  padding: 0 20px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: var(--gray-600);
}
.headerLink a {
  color: var(--gray-600);
  text-decoration: none;
}
.headerLink a:hover {
  color: var(--primary);
}

/* ── Outer Wrapper ────────────────────────────────────────── */
.product_view {
  max-width: 1200px;
  margin: 20px auto 60px;
  padding: 0 20px;
  font-family: 'Inter', sans-serif;
}

/* ── Two-column area ──────────────────────────────────────── */
.product_area {
  display: flex;
  gap: 36px;
  align-items: flex-start;
  width: 100%;
}

/* ================================================================
   LEFT — Image / Video Gallery
   ================================================================ */
.product-imgs {
  flex: 0 0 480px;
  max-width: 480px;
  display: flex;
  gap: 12px;
}

/* ── Vertical thumbnail strip ─────────────────────────────── */
.img-select {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 80px;
  flex-shrink: 0;
}

.img-item {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--gray-200);
  background: var(--gray-50);
  transition:
    border-color var(--transition),
    transform var(--transition);
  flex-shrink: 0;
}
.img-item:hover {
  border-color: var(--primary);
  transform: scale(1.04);
}
.img-item.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(250, 131, 46, 0.2);
}
.img-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.img-item .video-thumb-wrap {
  width: 100%;
  height: 100%;
  position: relative;
  background: #000;
}
.img-item .video-thumb-wrap img {
  opacity: 0.85;
}
.img-item .play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.4rem;
  pointer-events: none;
}

/* ── Main display area ────────────────────────────────────── */
.img-display {
  flex: 1;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
}

.media-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--gray-50);
}

.media-container img#mainImage {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
  cursor: crosshair;
}

/* ── Zoom Lens ────────────────────────────────────────────── */
.zoom-lens {
  position: absolute;
  border: 2px solid var(--primary);
  background: rgba(250, 131, 46, 0.12);
  pointer-events: none;
  display: none;
  z-index: 10;
  border-radius: 4px;
}
.img-display:hover .zoom-lens {
  display: block;
}

/* ── Zoom Result Panel ────────────────────────────────────── */
#zoomResult {
  position: absolute;
  top: 0;
  left: calc(100% + 16px);
  width: 420px;
  height: 420px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: var(--white);
  background-repeat: no-repeat;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 100;
  pointer-events: none;
}

/* ── Video iframe ─────────────────────────────────────────── */
.media-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ── Image/video badge ────────────────────────────────────── */
.media-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.03em;
  z-index: 5;
}

/* ================================================================
   RIGHT — Product Details
   ================================================================ */
.product_detils {
  flex: 1;
  min-width: 0;
}

/* ── Title ────────────────────────────────────────────────── */
.P_title {
  font-family: 'Hind Siliguri', 'Inter', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--gray-800);
  margin-bottom: 14px;
}

/* ── Rating row (optional) ────────────────────────────────── */
.rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.stars {
  color: var(--yellow);
  letter-spacing: 2px;
  font-size: 0.95rem;
}
.rating-count {
  font-size: 0.8rem;
  color: var(--gray-600);
}
.in-stock-badge {
  background: var(--green-lt);
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 30px;
}

/* ── Price area ───────────────────────────────────────────── */
.priceArea {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 0;
  border-top: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
  margin-bottom: 20px;
}

.p_price {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--primary);
  font-family: 'Inter', sans-serif;
}
.p_price::before {
  content: '৳ ';
  font-size: 1.1rem;
}

.p_old_price {
  font-size: 1rem;
  color: var(--gray-400);
  text-decoration: line-through;
}
.p_old_price::before {
  content: '৳ ';
}

.Ramadan {
  background: var(--red);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 30px;
  border: none;
  cursor: default;
  letter-spacing: 0.04em;
}

/* ── Button Area ──────────────────────────────────────────── */
.buttonArea {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

/* Base button style */
.buttonArea button,
.buttonArea a > button {
  width: 100%;
  padding: 15px 20px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Hind Siliguri', 'Inter', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  transition: all 0.25s;
  letter-spacing: 0.01em;
}

/* Add to Cart */
.AddToCart {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  border: 1px solid var(--primary) !important;
  background: var(--white) !important;
  color: var(--primary) !important;
}
.AddToCart:hover {
  background: var(--primary) !important;
  transform: translateY(-2px);
  color: var(--white) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22) !important;
}
/* .AddToCart::before { content: '🛒'; font-size: 1.1rem; } */

/* Cash on Delivery */
.chash_in_delivery {
  background: var(--primary) !important;
  color: var(--black) !important;
  box-shadow: 0 4px 14px rgba(250, 131, 46, 0.35);
}
.chash_in_delivery:hover {
  background: var(--primary-dk) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(250, 131, 46, 0.45);
}
/* .chash_in_delivery::before {
  content: '🏠';
  font-size: 1.1rem;
} */

/* Pay Online */
.pay_online {
  display: block !important;
  margin: 0 !important;
  text-decoration: none;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.pay_online button {
  background: #fbff00 !important;
  color: var(--black) !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(251, 255, 0, 0.3);
}
.pay_online button:hover {
  background: #e8eb00 !important;
  transform: translateY(-2px);
}
/* .pay_online button::before {
  content: '💳';
  font-size: 1.1rem;
} */

/* Chat buttons */
.bg-black.text-white {
  display: block;
  text-decoration: none;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.bg-black.text-white button {
  background: #1877f2 !important;
  color: #fff !important;
}
.bg-black.text-white:nth-of-type(2) button {
  background: #25d366 !important;
  color: #fff !important;
}
.bg-black.text-white button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* ── Trust badges ─────────────────────────────────────────── */
.trust-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 0;
  border-top: 1px solid var(--gray-100);
  margin-bottom: 20px;
}
.trust-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--gray-600);
  background: var(--gray-100);
  padding: 6px 12px;
  border-radius: 30px;
}
.trust-badge i {
  color: var(--green);
}

/* ── Description ──────────────────────────────────────────── */
.p_discription {
  border-top: 1px solid var(--gray-100);
  padding-top: 20px;
}
.desTitle {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 12px;
  font-family: 'Hind Siliguri', sans-serif;
}
.description pre,
pre.description {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.75;
  font-size: 0.93rem;
  color: var(--gray-600);
  font-family: 'Inter', sans-serif;
  width: 100%;
  background: var(--gray-50);
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
}

/* ================================================================
   MOBILE — App-like Layout
   ================================================================ */
@media (max-width: 900px) {
  .product_area {
    flex-direction: column;
    gap: 0;
  }
  .product-imgs {
    flex: none;
    max-width: 100%;
    width: 100%;
    flex-direction: column;
    gap: 10px;
  }
  .img-display {
    width: 100%;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
  }
  .media-container {
    aspect-ratio: 4 / 3;
  }
  /* ── Horizontal thumbnail strip on mobile ── */
  .img-select {
    flex-direction: row;
    width: 100%;
    overflow-x: auto;
    padding: 0 16px 4px;
    gap: 8px;
    scrollbar-width: none;
  }
  .img-select::-webkit-scrollbar {
    display: none;
  }
  .img-item {
    width: 68px;
    height: 68px;
    flex-shrink: 0;
  }
  /* Zoom disabled on mobile */
  #zoomResult {
    display: none !important;
  }
  .zoom-lens {
    display: none !important;
  }

  .product_detils {
    padding: 20px 16px;
  }
  .P_title {
    font-size: 1.2rem;
  }
  .p_price {
    font-size: 1.6rem;
  }

  /* ── Sticky Buy Bar on mobile ── */
  .sticky-buy-bar {
    display: flex !important;
  }
}

@media (min-width: 901px) {
  .sticky-buy-bar {
    display: none !important;
  }
}

/* ── Sticky Buy Bar ───────────────────────────────────────── */
.sticky-buy-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  padding: 12px 16px;
  gap: 10px;
  z-index: 999;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}
.sticky-buy-bar button {
  flex: 1;
  padding: 14px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: 'Hind Siliguri', 'Inter', sans-serif;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.sticky-cart-btn {
  background: var(--black);
  color: var(--primary);
}
.sticky-buy-btn {
  background: var(--primary);
  color: var(--black);
}

@media (max-width: 480px) {
  .product_view {
    padding: 0;
    margin-bottom: 80px;
  }
  .headerLink {
    padding: 10px 16px 0;
  }
  .media-container {
    aspect-ratio: 1 / 1;
  }
  .product_detils {
    padding: 16px;
  }
}
