/* === Reset & Base === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background: rgb(209, 219, 221);
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
  font-size: 0.95rem;
}

a {
  text-decoration: none;
}

/* =========================
   NAVBAR — mobile-first
========================= */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.2rem;
 background: rgb(12, 12, 12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 2000;
}

.logo {
  font-size: 1.45rem;
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

/* =========================
   HAMBURGER BUTTON
========================= */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 2100;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2.5px;
  background: #f1f5f9;
  border-radius: 3px;
  transform-origin: center;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity  0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger.is-active span:nth-child(1) {
  transform: translateY(7.75px) rotate(45deg);
}
.hamburger.is-active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.is-active span:nth-child(3) {
  transform: translateY(-7.75px) rotate(-45deg);
}

/* =========================
   MOBILE NAV PANEL
========================= */
#main-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  top: 56px;
  max-height: calc(100vh - 56px);
  background: rgba(10, 14, 20, 0.98);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 1999;
}

#main-nav.nav-open {
  display: block;
  animation: navSlideDown 0.22s ease forwards;
}

@keyframes navSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

nav ul {
  display: flex;
  flex-direction: column;
  list-style: none;
  gap: 0;
  padding: 0.5rem 0;
}

nav ul li {
  position: relative;
}

nav ul li a {
  display: block;
  padding: 0.88rem 1.5rem;
  color: #e2e8f0;
  font-size: 1rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}

nav ul li a:hover,
nav ul li a:active {
  background: rgba(255, 60, 0, 0.09);
  color: #ff7a40;
  box-shadow: none;
}

.dropdown > a.bossd {
  color: #7c8fa6;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  padding: 0.75rem 1.5rem 0.35rem;
  border-bottom: none;
  cursor: default;
  pointer-events: none;
}

.dropdown-menu {
  position: static;
  display: block;
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: none;
  background: rgba(255, 255, 255, 0.025);
  border-radius: 0;
  padding: 0 0 0.6rem;
  min-width: unset;
  box-shadow: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  z-index: auto;
  pointer-events: auto;
}

.dropdown-menu li {
  padding: 0;
}

.dropdown-menu li a {
  display: block;
  padding: 0.55rem 1.5rem 0.55rem 2.5rem;
  color: #7c8fa6;
  font-size: 0.88rem;
  font-weight: 500;
  border-bottom: none;
}

.dropdown-menu li a:hover,
.dropdown-menu li a:active {
  color: #ff9040;
  background: none;
}

.bossd {
  position: relative;
  z-index: 2001;
}

#cart-count {
  background: #ef4444;
  color: white;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 50%;
  margin-left: 5px;
  vertical-align: middle;
}

/* =========================
   DESKTOP NAVBAR (768px+)
========================= */
@media (min-width: 768px) {

  .navbar {
    padding: 0rem 2rem;
  }

  .hamburger {
    display: none;
  }

  #main-nav {
    display: flex !important;
    position: static;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0;
    border: none;
    max-height: none;
    overflow: visible;
    top: auto;
    animation: none !important;
    align-items: center;
  }

  nav ul {
    flex-direction: row;
    gap: 1.2rem;
    flex-wrap: wrap;
    align-items: center;
    padding: 0;
  }

  nav ul li {
    position: relative;
    border-bottom: none;
  }

  nav ul li a {
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    display: inline-block;
    border-bottom: none;
    text-transform: none;
    letter-spacing: 0;
  }

  nav ul li a:hover {
    background: linear-gradient(90deg, #e7b9b9, #d16e11);
    color: #fff;
    box-shadow: 0 0 10px rgba(209, 110, 17, 0.5);
  }

  .dropdown > a.bossd {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    padding: 0.5rem 0.8rem;
    border-bottom: none;
    cursor: pointer;
    pointer-events: auto;
  }

  .dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
  }

  .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(24, 29, 37, 0.97);
    backdrop-filter: blur(10px);
    border-radius: 0 0 8px 8px;
    padding: 0.6rem 0;
    min-width: 160px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    visibility: hidden;
    z-index: 3000;
    border-bottom: none;
  }

  .dropdown-menu li a {
    display: block;
    padding: 0.6rem 1rem;
    color: #f1f5f9;
    font-size: 1rem;
    font-weight: 500;
    border-bottom: none;
    text-transform: none;
    letter-spacing: 0;
  }

  .dropdown-menu li a:hover {
    background: linear-gradient(90deg, #d16e11, #e7b9b9);
    color: #fff;
    background-color: unset;
  }
}


/* =====================================================
   MAIN CONTENT
===================================================== */

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* === Product View === */
.product-view {
  width: 95%;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 1rem;
  padding: 1rem;
  margin: 1rem 0;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease;
}

.product-view:hover {
  transform: translateY(-4px);
}

.left {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1rem;
}

.buttsto {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  width: 100%;
}

.buttsto button {
  flex: 1;
  padding: 0.9rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 0.6rem;
  cursor: pointer;
  color: #fff;
  transition: 0.2s ease;
}

#tobasket { background: #35c522; }
#tobasket:hover { background: #28a01f; }
#tocart { background: #224ec5; }
#tocart:hover { background: #1b3ca0; }

.product-details {
  margin-top: 1rem;
}

.product-details #pname {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  color: #111827;
}

.product-details .company {
  font-size: 1rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 0.3rem;
}

.product-details .price {
  font-size: 1.3rem;
  font-weight: 700;
  color: #dc2626;
  margin-bottom: 0.5rem;
}

.product-details .category {
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 1rem;
}

.product-details .description {
  font-size: 1rem;
  color: #374151;
  margin-bottom: 1.5rem;
}

/* ADAPTIVE SELECTOR */
.adaptive-wrapper {
  margin: 1.2rem 0;
}

.adaptive-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
  color: #006eff;
  letter-spacing: 0.5px;
}

.adaptive-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.adaptive-btn {
  min-width: 55px;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #e2e8f0;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.25s ease;
}

.adaptive-btn:hover {
  border-color: #38bdf8;
  color: #38bdf8;
}

.adaptive-btn.active {
  background: #38bdf8;
  border-color: #38bdf8;
  color: #0f172a;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.4);
}

/* QUANTITY */
input#qty::-webkit-outer-spin-button,
input#qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input#qty[type=number] {
  -moz-appearance: textfield;
}

.qty-container {
  display: flex;
  align-items: center;
  margin-top: 0.5rem;
}

.qty-btn {
  width: 35px;
  height: 35px;
  border: 1px solid #d1d5db;
  background: #f3f4f6;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}

.qty-btn:hover { background: #e5e7eb; }
.qty-btn.decrease { border-radius: 6px 0 0 6px; }
.qty-btn.increase { border-radius: 0 6px 6px 0; }

form input#qty {
  width: 50px !important;
  height: 35px;
  padding: 0 !important;
  margin: 0 !important;
  border-left: none !important;
  border-right: none !important;
  border-radius: 0 !important;
  text-align: center;
}

.delivery,
.details,
.desc {
  margin-top: 1.5rem;
}

hr {
  margin: 1.5rem 0;
  border: 0.5px solid #d1d5db;
}

/* ============================================
   SIMILAR PRODUCTS – PREMIUM SLIDER
============================================ */

.productsreference {
  position: relative;
  width: 95%;
  background: #fff;
  border-radius: 1rem;
  padding: 1rem;
  margin: 1rem 0;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease;
}

#headingsim {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: #000000;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.slider-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.slider-wrapper::before,
.slider-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  width: 0px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  border-radius: 5rem;
}

.slider-wrapper::before {
  left: 0;
  background: linear-gradient(to right, #d4e0ff, transparent);
}

.slider-wrapper::after {
  right: 0;
  background: linear-gradient(to left, #dae4ff, transparent);
}

/* Slider Track — CHANGED: tighter mobile padding */
.product-ref-grid {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding: 0.8rem 0.5rem; /* CHANGED: was 1rem 2rem */
  scrollbar-width: none;
}

.product-ref-grid::-webkit-scrollbar {
  display: none;
}

/* Product Card — CHANGED: white bg, ~2 on mobile, subtle border */
.product-card {
  flex: 0 0 44%; /* CHANGED: was 70% */
  background: #fff; /* CHANGED: was dark gradient */
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  scroll-snap-align: start;
  transition: all 0.15s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.10); /* CHANGED: lighter for white card */
  border: 1px solid #e5e7eb; /* CHANGED: subtle border on white */
}

.product-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}

/* Card Image — CHANGED: square aspect ratio replaces fixed height */
.card-image {
  width: 100%;
  aspect-ratio: 1 / 1; /* CHANGED: was height: 130px */
  overflow: hidden;
  background: #f9fafb; /* CHANGED: light bg for contain images */
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.product-card:hover img {
  transform: scale(1.08);
}

/* Card Content — CHANGED: tighter padding on mobile */
.card-content {
  padding: 0.6rem; /* CHANGED: was 1rem */
  text-align: center;
}

/* Card Title — CHANGED: dark text for white card, smaller on mobile */
.card-title {
  font-size: 0.82rem; /* CHANGED: was 1rem */
  color: #111827; /* CHANGED: was #ffffff */
  margin-bottom: 0.3rem;
}

/* Card Price — CHANGED: darker blue, more readable on white, smaller on mobile */
.card-price {
  color: #1d4ed8; /* CHANGED: was #38bdf8 (too light on white) */
  font-weight: 600;
  font-size: 0.82rem; /* CHANGED: was 1rem */
}

/* Arrow Buttons */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: #1e293b;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.85;
}

.slider-btn i {
  font-size: 1.5rem;
  font-weight: 600;
  color: #00f7ff;
}

.slider-btn:hover i {
  color: #f70000;
}

.slider-btn:hover {
  background: #f8e538;
  transform: translateY(-50%) scale(1.1);
}

.slider-btn-left { left: 10px; }
.slider-btn-right { right: 10px; }

/* Slider card sizing — tablet */
@media (min-width: 768px) {
  .product-card {
    flex: 0 0 45%;
  }
}

/* Slider card sizing — desktop */
@media (min-width: 1024px) {
  .product-card {
    flex: 0 0 30%;
  }
}

/* === Footer === */
.footer {
  text-align: center;
  padding: 1rem;
  background: #111;
  color: #fff;
}

/* === Responsive Breakpoints === */

/* Tablet */
@media (min-width: 768px) {
  .product-view {
    flex-direction: row;
    gap: 2rem;
    width: 95%;
  }

  /* CHANGED: min-width:0 + overflow:hidden prevents thumbnail flex bleed */
  .left {
    width: 40%;
    margin-bottom: 0;
    min-width: 0;
    overflow: hidden;
  }

  .product-image {
    width: 88%;
  }

  .product-details {
    width: 60%;
  }

  .selectto {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  form label {
    width: auto;
  }

  form select,
  form input[type="number"] {
    min-width: 100px;
  }

  .productsreference {
    width: 95%;
  }

  .product-ref-grid {
    gap: 2rem;
  }

  .product-card {
    flex: 0 0 220px;
  }
}

/* Desktop */
@media (min-width: 1200px) {
  .product-view {
    width: 80%;
    padding: 2rem;
  }

  .product-image {
    width: 99%;
  }

  .product-details h2 {
    font-size: 2rem;
  }

  .product-details .price {
    font-size: 1.5rem;
  }

  .productsreference {
    width: 90%;
  }

  .product-card {
    flex: 0 0 250px;
  }
}

/* === SKU VARIATION SELECTOR === */
.sku-variants {
  margin: 1.2rem 0;
  width: 100%;

}

.variant-label {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #111827;
}

.variant-list {
  display: flex;
  flex-direction: row;
  gap: 0.6rem;
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 0.6rem;
  width: 100%;
  max-width: 100%;
  scrollbar-width: thin;
  scrollbar-color: #292929 transparent;
  -webkit-overflow-scrolling: touch;
}

.variant-list::-webkit-scrollbar {
  height: 4px;
}

.variant-list::-webkit-scrollbar-track {
  background: transparent;
}

.variant-list::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 10px;
}


.variant-item {
  flex: 0 0 auto;
  min-width: 70px;
  border: 2px solid transparent;
  border-radius: 0.6rem;
  padding: 0.3rem;
  text-align: center;
  background: #f9fafb;
  cursor: pointer;
  transition: 0.2s ease;
}

.variant-item img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 0.4rem;
}

.variant-name {
  display: block;
  font-size: 0.7rem;
  margin-top: 0.2rem;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70px;
}

.variant-item:hover {
  border-color: #f59e0b;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.2);
}

.variant-item.active {
  border-color: #16a34a;
  background: #ecfdf5;
  box-shadow: 0 4px 10px rgba(22, 163, 74, 0.2);
}


@media (min-width: 768px) {
  .variant-item img {
    width: 64px;
    height: 64px;
  }

  .variant-name {
    font-size: 0.75rem;
  }
}

/* ============================================
   IMAGE GALLERY
   CHANGED: thumbnails always stay on top (column)
   at all widths — row layout removed from 768px
   to fix main image being shoved behind details.
============================================ */

.image-gallery {
  display: flex;
  flex-direction: column; /* CHANGED: was switching to row at 768px */
  gap: 1rem;
  width: 100%;
  min-width: 0;
}

.main-image-container {
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  min-width: 0;
}

.product-image {
  width: 305px;
  aspect-ratio: 0.8;
  object-fit: contain;
  transition: transform 0.4s ease;
  cursor: zoom-in;
}

.product-image:hover {
  transform: scale(1.05);
}

.thumbnail-container {
  display: flex;
  flex-direction: row; /* always horizontal row on top */
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 5px;
}

.thumbnail-container::-webkit-scrollbar {
  height: 4px;
}

.thumbnail-container::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

.thumbnail {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.thumbnail:hover {
  transform: scale(1.05);
}

.active-thumb {
  border: 2px solid #111;
}

/* Slightly larger thumbnails at tablet — still on top */
@media (min-width: 768px) {
  .thumbnail {
    width: 80px;
    height: 80px;
  }

  .variant-item img {
    width: 64px;
    height: 64px;
  }

  .variant-name {
    font-size: 0.75rem;
    max-width: 80px;
  }
}