/* ==============================
   Pasmira Cables — Product Page
   ============================== */

/* ---------- THEME VARIABLES ---------- */
:root {
  --bg: #0c1a33; /* dark blue gradient base */
  --bg-gradient: linear-gradient(135deg,#00d2ff,#ffd65a,#ff6ec7);
  --card: #0c2530;
  --muted: #c0cbd6;
  --accent: #d6b04f;
  --accent-cyan: #00d2ff;
  --accent-2: #ffd400;
  --white: #ffffff;
  --glass: rgba(255,255,255,0.06);
  --radius: 14px;
  --transition: 0.25s ease;
  --shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  --ff-sans: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}

/* ---------- RESET ---------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  scroll-behavior: smooth;
}

body {
  font-family: var(--ff-sans);
  background: var(--bg);
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- NAVBAR ---------- */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.nav a {
  color: var(--white);
  text-decoration: none;
  margin: 0 8px;
  font-weight: 600;
  font-size: 15px;
  transition: color var(--transition);
}

.nav a.active,
.nav-links a:hover {
  color: var(--accent);
}

/* ---------- BRAND ---------- */
.nav .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 40px;
  color: var(--white);
  text-decoration: none;
}

.nav .brand .logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.brand-title {
  font-weight: 600;
  font-size: 18px;
}

.brand-sub {
  font-size: 12px;
  color: var(--muted);
}

/* ---------- NAV LINKS & SEARCH ---------- */
.nav-center {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-links {
  display: flex;
  gap: 26px;
  align-items: center;
}

.nav-search {
  position: relative;
  max-width: 450px;
  margin: 0 auto;
}

.nav-search input {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius);
  border: none;
  outline: none;
  background: var(--card);
  color: var(--white);
  font-size: 14px;
}

.nav-search input::placeholder {
  color: var(--muted);
}

/* Search results dropdown */
.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--card);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  max-height: 300px;
  overflow-y: auto;
  z-index: 999;
}

.search-row {
  padding: 10px 12px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  justify-content: space-between;
}

.search-row:hover {
  background: rgba(255,255,255,0.08);
}

.search-row.empty {
  color: var(--muted);
  text-align: center;
}

/* ---------- NAV RIGHT ---------- */
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--white);
  font-size: 20px;
  cursor: pointer;
  position: relative;
}

.badge {
  position: absolute;
  top: -5px;
  right: -8px;
  background: var(--accent-2);
  color: #000;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
}

.cta {
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: var(--radius);
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.cta:hover {
  background: var(--accent-2);
}

/* ---------- HAMBURGER ---------- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 26px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger span {
  display: block;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
}

/* ---------- OVERLAY ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
}

.overlay.active {
  display: block;
}

/* ---------- WRAP LAYOUT ---------- */
.wrap {
  display: flex;
  gap: 20px;
  padding: 20px 5%;
  margin-top: 10px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- SIDEBAR ---------- */
.sidebar {
  width: 220px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 15px;
  flex-shrink: 0;
  transition: var(--transition);
  height: fit-content;
  position: relative;
}

.sidebar.open {
  left: 0;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.close-sidebar {
  background: none;
  border: none;
  color: var(--white);
  font-size: 20px;
  cursor: pointer;
  display: none;
}

.categories-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category {
  padding: 8px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  background: rgba(255,255,255,0.03);
}

.category.active,
.category:hover {
  background: var(--accent);
  color: #000;
  font-weight: 600;
}

/* ---------- PRODUCT GRID ---------- */
.product-container {
  flex: 1;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

.product-card {
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 20px rgba(0,0,0,0.5);
}

.card-media img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s;
}

.product-card:hover .card-media img {
  transform: scale(1.05);
}

.product-info {
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.product-info h4,
.product-title {
  font-size: 1.1rem;
  margin: 0 0 6px 0;
}

.product-price {
  font-weight: 700;
  color: var(--accent-cyan);
}

.btn-buy {
  padding: 8px 12px;
  border: none;
  border-radius: var(--radius);
  background: linear-gradient(90deg,#00d2ff,#ff6ec7,#ffd65a);
  color: #001;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-buy:hover {
  transform: scale(1.05);
  opacity: 0.95;
}

/* ---------- CART MODAL ---------- */
.cart-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 200;
}

.cart-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-header,
.cart-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
}

.cart-items {
  max-height: 300px;
  overflow-y: auto;
  padding: 8px 16px;
}

.cart-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.cart-remove {
  background: transparent;
  border: none;
  color: salmon;
  cursor: pointer;
  font-weight: 700;
}

/* ---------- PAGINATION ---------- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 30px;
}

.page-btn {
  background: var(--card);
  border: 1px solid var(--accent);
  color: var(--white);
  padding: 6px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.page-btn:hover,
.page-btn.active {
  background: var(--accent);
  color: #000;
  font-weight: 700;
}

/* ---------- FOOTER ---------- */
.footer {
  margin-top: 40px;
  text-align: center;
  color: var(--muted);
  padding: 20px;
  background: var(--glass);
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 14px;
}

.footer a {
  color: var(--accent);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* ---------- ANIMATION ---------- */
@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(15px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ---------- RESPONSIVE ---------- */

/* Tablet */
@media (max-width: 1024px) {
  .wrap {
    padding: 20px 3%;
  }
}

/* Mobile */
@media (max-width: 900px) {
  .wrap {
    flex-direction: column;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    height: 100%;
    z-index: 1001;
    transition: left var(--transition);
  }

  .sidebar.open {
    left: 0;
  }

  .close-sidebar {
    display: inline-block;
  }

  .nav-center {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }

  .cart-modal {
    width: 100%;
  }
}

/* Small screens */
@media (max-width: 500px) {
  .product-title,
  .product-info h4 {
    font-size: 14px;
  }

  .btn-buy {
    padding: 5px 8px;
  }
}
.nav-links a {
  position: relative;
  text-decoration: none;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px; /* distance from text */
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: transform 0.2s;
}
.whatsapp-float:hover {
  transform: scale(1.1);
}
.whatsapp-float img {
  width: 35px;
  height: 35px;
}