/* New Product Patch with Tabs on index Page only */
/* ========== PRODUCT SHOWCASE — WRAPPED & SCOPED STYLES ========== */
/* Put this after bootstrap and your other CSS files */

.product-showcase-wrapper { 
  --accent: #b3594d;
  --text: #333;
  --muted: #666;
  --bg: #fff;
  --shadow: 0 4px 16px rgba(0,0,0,0.1);

  width: 100%;
  box-sizing: border-box;
  display: block;
  text-align: center; /* center the wrapper block content */
  margin: 0 auto;
  padding: 0; /* let inner elements handle padding */
  background: transparent;
}

/* keep semantics: style the inner main that's inside the wrapper */
.product-showcase-wrapper main {
  max-width: 1200px !important;
  margin: 2rem auto !important;
  padding: 0 1rem !important;
  display: block !important;
  box-sizing: border-box;
}

/* header */
.product-showcase-wrapper header {
  background: var(--bg);
  text-align: center;
  padding: 1.2rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

/* heading */
.product-showcase-wrapper h1 {
  margin: 0;
  font-size: 1.8rem;
  color: var(--accent);
}

/* Category list (scoped) */


/* Optional hover animation feedback for products */
.product-showcase-wrapper .product-card:hover img {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

.product-showcase-wrapper .category-list {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 1rem !important;
  justify-content: center !important;
  margin-bottom: 1rem;
  list-style: none;
  padding: 0;
}

.product-showcase-wrapper .category-list button {
  background: #fff;
  border: 2px solid #eee;
  padding: 0.8rem 1.4rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  box-sizing: border-box;
  white-space:nowrap;
}

.product-showcase-wrapper .category-list button.active {
  background-color: #3c9ae9;
  color: #fff;
  border-color: #282828;
}
/*.product-showcase-wrapper .category-list button:hover {
  border-color: #000;
  color: #000;
}*/

.product-showcase-wrapper .category-list button.active {
  background-color: #e381ac; /* your brand color */
  color: #fff;
  border-color: #282828;
}


/* Brand tabs (scoped) */
/* Keep brand tabs distinct visually */

.product-showcase-wrapper .brand-tabs {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.6rem !important;
  justify-content: center !important;
  margin-bottom: 1.4rem;
  padding: 5px;
  align-items: center;
  background-color: #c1dbf1;
}


.product-showcase-wrapper .brand-tabs button {
  background: #fff;
  border: 1px solid #eee;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  box-sizing: border-box;
  white-space:nowrap;
}

.product-showcase-wrapper .brand-tabs button[aria-selected="true"] {
  border-color: #282828;
  color: #3c9ae9;
  box-shadow: 0 4px 10px rgba(179,89,77,0.15);
}

/*.product-showcase-wrapper ..category-list button[aria-selected="true"]{
   border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 4px 10px rgba(179,89,77,0.15);
}*/

/* Carousel container (scoped) */
.product-showcase-wrapper .carousel-wrap {
  background: #fff;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
}

.product-showcase-wrapper #selectedCatBrand {
  font-size: 2.1rem;
  font-weight: 600;
  color: #167ac6;
  margin-bottom: 0.5rem;
}


/* Track — force horizontal flex and prevent wrapping from other CSS */
.product-showcase-wrapper .track {
  display: flex !important;
  gap: 12px !important;
  align-items: center !important;
  will-change: transform;
  flex-wrap: nowrap !important;       /* ensure single-row layout */
  white-space: nowrap !important;     /* defensively avoid wrapping */
  transform: translateX(0);           /* initial state */
  transition: transform 0.12s linear;
  box-sizing: border-box;
}

/* product card (scoped) */
.product-showcase-wrapper .product-card {
  flex: 0 0 220px !important; /* fixed card width */
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  display: inline-flex !important;    /* inline-flex to respect width and prevent vertical stacking */
  flex-direction: column;
  vertical-align: top !important;
  box-sizing: border-box;
  margin: 0 !important;               /* margin handled by gap on .track */
  min-width: 220px;                   /* prevent shrink on some mobile UA */
  max-width: 220px;
}

.product-showcase-wrapper .product-card.active {
  border-color: var(--accent);
  transform: scale(1.03);
}



/* Image inside card */
.product-showcase-wrapper .product-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
  display: block;
}

/* product info text */
.product-showcase-wrapper .product-info {
  padding: 0.6rem 0.8rem;
  text-align: left;
  flex: 1 0 auto;
}

.product-showcase-wrapper .product-info h3 {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text);
}

.product-showcase-wrapper .product-info p {
  margin: 0.3rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* controls */
.product-showcase-wrapper .controls {
  text-align: center;
  margin-top: 1rem;
}

.product-showcase-wrapper .controls button {
  background: #fff;
  border: 1px solid #eee;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s;
}

.product-showcase-wrapper .controls button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* product details */
.product-showcase-wrapper .product-details {
  background: #fff;
  border-radius: 10px;
  margin-top: 1.5rem;
  padding: 1rem;
  border: 1px solid #eee;
  box-sizing: border-box;
  text-align: left;
}

.product-showcase-wrapper .product-details h2 {
  margin-top: 0;
  color: var(--accent);
}


/* images responsiveness */
.product-showcase-wrapper img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ====== extra defensive rules to override common theme conflicts ====== */
/* prevent global floats/clears from impacting layout inside wrapper */
.product-showcase-wrapper * {
  clear: none !important;

}

/* avoid inherited display:block from bootstraps .card etc. */
.product-showcase-wrapper .card,
.product-showcase-wrapper .carousel,
.product-showcase-wrapper .owl-carousel {
  all: unset;
  box-sizing: border-box;
}

/* small screens: make cards wider relative to viewport */
@media (max-width: 768px) {
  .product-showcase-wrapper .product-card {
    flex: 0 0 60% !important;
    min-width: 60% !important;
    max-width: 60% !important;
  }

  /* stack brand tabs nicely on small screens */
  .product-showcase-wrapper .brand-tabs {
    gap: 0.4rem !important;
  }

  /* make the track still horizontal but allow some internal wrapping if needed */
  .product-showcase-wrapper .track {
    gap: 10px !important;
  }
}

/* very small screens (narrow) — allow two-up if it helps usability */
@media (max-width: 420px) {
  .product-showcase-wrapper .product-card {
    flex: 0 0 80% !important;
    min-width: 80% !important;
    max-width: 80% !important;
  }
}





 /* --- Every Product Page Layout with zoom effects and thumbnails--- */
.product-section {
  padding: 60px 0; /* Top & bottom breathing space */
  background-color: #fff;
}

.product-container {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 40px; /* Reduced gap between image and text */
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Gallery --- */
.gallery {
  flex: 1;
  max-width: 600px;
  text-align: center;
}

.image-viewer {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  margin-bottom: 20px; /* Space before thumbnails */
}

.big-images {
  display: flex;
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  cursor: crosshair;
}

.big-images img {
  flex: 0 0 100%;
  width: 100%;
  height: auto;
  scroll-snap-align: center;
  transition: transform 0.3s ease;
  object-fit: cover;
  cursor: zoom-in;
}


.big-images::-webkit-scrollbar {
  display: none;
}

.thumbnails {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.thumbnails img {
  width: 80px;
  height: 70px;
  border-radius: 8px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.thumbnails img.active {
  border-color: #b3594d;
  box-shadow: 0 0 8px rgba(179,89,77,0.3);
}

.thumbnails img:hover {
  transform: scale(1.05);
}


/* Realme C3 + small Android phones: keep thumbnails in ONE row */
@media (max-width: 380px) {

  .product-section .thumbnails {
    flex-wrap: nowrap !important;        /* prevent wrapping */
    overflow-x: auto !important;         /* allow horizontal scroll */
    justify-content: flex-start !important;
    gap: 6px !important;
    padding-bottom: 6px;
  }

  .product-section .thumbnails img {
    width: 40px !important;              /* optimized for 360px screens */
    height: 30px !important;
    flex: 0 0 auto !important;
  }

  .product-section .thumbnails::-webkit-scrollbar {
    display: none;
  }
}





/* --- Product Info --- */
.prod-info {
  flex: 1;
  max-width: 450px;
}

.prod-info h3 {
  font-size: 20px;
  margin-bottom: 15px;
  color: #0076bd;
}

.prod-info h4 {
  font-size: 20px;
  margin: 20px 0 10px;
  color: #b3594d;
}

.prod-info ul {
  padding-left: 20px;
  margin: 0;
  list-style-type: disc;
  color: #444;
  line-height: 1.6;
}

/* --- Zoom effect (fixed) --- */
/* For Chrome only
.image-viewer.zoom-active {
  overflow: visible;
}

.big-images img.zoomed {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  z-index: 99999;
  transform: scale(2.5);
  cursor: zoom-out;
  transition: transform 0.25s ease, transform-origin 0.25s ease;
  background: #fff;
}*/

/* GPU-accelerated zoom + pan (Safari-friendly) */
.big-images img.zoomed {
  transition: transform 0.18s ease; /* quick smooth entry */
  will-change: transform;
  cursor: grab;
  /* keep object-fit to preserve cropping */
  object-fit: cover;
  /* keep the image on top when zoomed */
  z-index: 9999;
  position: relative; /* keep relative so it doesn't disrupt layout */
}

/* Disable Safari-problematic scroll behavior during zoom */
.big-images.no-snap {
  scroll-snap-type: none !important;
  scroll-behavior: auto !important;
}


/* While actively panning */
.big-images img.zoomed:active {
  cursor: grabbing;
  transition: none; /* immediate response while dragging */
}



/* --- Responsive Layout --- */
@media (max-width: 992px) {
  .product-container {
    flex-direction: column;
    align-items: center;
    gap: 30px;
  }
  .product-info {
    max-width: 600px;
  }
}

/* Smooth, reliable zoom */
/* For chrome only
.zoomable {
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

.zoomable.zoomed {
    transform: scale(2.5);
    cursor: zoom-out;
    z-index: 9999;
    position: relative;
}

.zoomed {
  transform: scale(2);
  cursor: grab;
}

.zoomed:active {
  cursor: grabbing;
}*/


