:root {
  --bg: #0a0a0a;
  --bg-card: #111111;
  --bg-header: #0d0d0d;
  --bg-subnav: #0f0f0f;
  --border: #1e1e1e;
  --accent: #00c8ff;
  --accent-dim: rgba(0, 200, 255, 0.12);
  --accent-glow: rgba(0, 200, 255, 0.25);
  --text: #e0e0e0;
  --text-muted: #777;
  --text-dim: #444;
  --white: #ffffff;
  --red: #ff4545;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

/* HEADER */

.main-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-header);
  border-bottom: 1px solid var(--border);
  height: 68px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* logo section */
.logo-wrap a {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-wrap img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: brightness(1.1);
}

.site-name {
  font-family: "Orbitron", sans-serif;
  font-size: 20px;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: 3px;
}

/* main nav links in header */
.top-nav {
  display: flex;
  margin-left: 10px;
}

.top-nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
}

.top-nav ul li a {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 6px;
  transition:
    color 0.2s,
    background 0.2s;
  letter-spacing: 0.5px;
}

.top-nav ul li a:hover {
  color: var(--accent);
  background: var(--accent-dim);
}

/* search bar */
.search-wrap {
  position: relative;
  flex: 1;
  max-width: 380px;
  margin-left: auto;
}

.search-input {
  width: 100%;
  height: 38px;
  background: #161616;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 14px 0 38px;
  color: var(--text);
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.search-input::placeholder {
  color: var(--text-dim);
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  fill: var(--text-dim);
  pointer-events: none;
}

/* right side of header */
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

/* cart icon area */
.cart-icon-wrap {
  position: relative;
  cursor: pointer;
  padding: 4px;
}

.cart-svg {
    width: 22px;
    height: 22px;
    color: var(--text-muted);
    display: block;
    transition: color 0.2s;
}

.cart-icon-wrap:hover .cart-svg {
    color: var(--accent);
}

.cart-icon {
  font-size: 22px;
  line-height: 1;
}

.cart-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  background: var(--accent);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition:
  opacity 0.2s,
  transform 0.2s;
}

.cart-badge.visible {
  opacity: 1;
  transform: scale(1.1);
}

/* login button */
.login-btn {
  padding: 8px 18px;
  background: transparent;
  border: 1.5px solid var(--accent);
  border-radius: 7px;
  color: var(--accent);
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s;
  white-space: nowrap;
}

.login-btn:hover {
  background: var(--accent);
  color: #000;
}

/* TOAST NOTIFICATION */

.toast {
  position: fixed;
  top: 80px;
  right: 20px;
  background: #1a1a1a;
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 999;
  opacity: 0;
  transform: translateY(-8px);
  transition:
    opacity 0.3s,
    transform 0.3s;
  pointer-events: none;
  max-width: 250px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   SUB NAV (second navbar below header)
   ============================================ */

.sub-nav {
  background: var(--bg-subnav);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
}

.sub-nav ul {
  list-style: none;
  display: flex;
  gap: 0;
}

.sub-nav ul li a {
  display: block;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: color 0.2s;
  border-bottom: 2px solid transparent;
}

.sub-nav ul li a:hover {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* ============================================
   HERO
   ============================================ */

.hero {
  position: relative;
  padding: 60px 24px 50px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero-text {
  position: relative;
  z-index: 2;
  max-width: 500px;
}

.hero-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.hero h1 {
  font-family: "Rajdhani", sans-serif;
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 700;
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 16px;
}

.accent-word {
  color: var(--accent);
}

.hero-sub {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* glowing blob in the background */
.hero-glow {
  position: absolute;
  right: -80px;
  top: -40px;
  width: 500px;
  height: 400px;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 200, 255, 0.08) 0%,
    transparent 65%
  );
  pointer-events: none;
  z-index: 1;
}

/* ============================================
   MAIN / PRODUCTS
   ============================================ */

main {
  padding: 30px 20px 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.section-title {
  font-family: "Rajdhani", sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 24px;
  letter-spacing: 1px;
}

.no-results {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 0;
  font-size: 15px;
}

/* products grid - used css grid now instead of inline-block */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}

/* single product card */
.product {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.product:hover {
  border-color: rgba(0, 200, 255, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 200, 255, 0.08);
}

/* image container */
.product-img-wrap {
  position: relative;
  width: 100%;
  padding-top: 75%; /* aspect ratio trick */
  background: #0f0f0f;
  overflow: hidden;
}

.product-img-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: transform 0.3s;
}

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

/* wishlist button in top right of image */
.wishlist-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    color 0.2s,
    border-color 0.2s,
    background 0.2s;
  line-height: 1;
  padding: 0;
}

.wishlist-btn:hover {
  border-color: var(--red);
  color: var(--red);
}

.wishlist-btn.wishlisted {
  color: var(--red);
  border-color: var(--red);
  background: rgba(255, 69, 69, 0.12);
}

/* product text info */
.product-info {
  padding: 12px 12px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-info h3 {
  font-family: "Rajdhani", sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
}

.product-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  flex: 1;
  line-height: 1.4;
}

.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.price {
  font-family: "Rajdhani", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}

/* add to cart button */
.add-cart-btn {
  padding: 7px 12px;
  background: var(--accent-dim);
  border: 1px solid rgba(0, 200, 255, 0.3);
  border-radius: 7px;
  color: var(--accent);
  font-family: "Montserrat", sans-serif;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.1s;
  white-space: nowrap;
  width: auto;
  height: auto;
}

.add-cart-btn:hover {
  background: rgba(0, 200, 255, 0.22);
  border-color: var(--accent);
}

.add-cart-btn:active {
  transform: scale(0.95);
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 30px 20px;
}

.page-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
}

.page-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.page-btn.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  font-weight: 700;
}

.next-btn {
  padding: 0 18px;
  height: 40px;
  display: flex;
  align-items: center;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}

.next-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  background: #0d0d0d;
  border-top: 1px solid var(--border);
  padding: 40px 24px 0;
  margin-top: 20px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
  padding-bottom: 36px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-brand img {
  width: 34px;
  opacity: 0.9;
}

.footer-name {
  font-family: "Orbitron", sans-serif;
  font-size: 16px;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: 3px;
}

.footer-tagline {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.footer-links h4,
.footer-socials h4 {
  font-family: "Rajdhani", sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links ul li a {
  font-size: 13px;
  color: #555;
  transition: color 0.2s;
}

.footer-links ul li a:hover {
  color: var(--accent);
}

.social-icons {
  display: flex;
  gap: 12px;
}

.soc-link {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #161616;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    border-color 0.2s,
    background 0.2s;
}

.soc-link img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: grayscale(1) brightness(0.7);
  transition: filter 0.2s;
}

.soc-link:hover img {
  filter: none;
}

.soc-link:hover {
  border-color: #333;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 18px 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 12px;
  color: var(--text-dim);
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* tablets */
@media (max-width: 768px) {
  .main-header {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 16px;
    gap: 10px;
  }

  .top-nav {
    display: none; /* hide main nav on mobile, logo+cart enough */
  }

  .search-wrap {
    order: 3;
    max-width: 100%;
    flex: 1 1 100%;
    margin-left: 0;
  }

  .header-right {
    margin-left: auto;
  }

  .site-name {
    font-size: 17px;
  }

  .hero {
    padding: 40px 16px 34px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero-glow {
    display: none;
  }

  main {
    padding: 20px 14px;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 12px;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .sub-nav ul {
    flex-wrap: wrap;
  }
}

/* phones */
@media (max-width: 480px) {
  .site-name {
    font-size: 15px;
    letter-spacing: 2px;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .product-info h3 {
    font-size: 13px;
  }

  .add-cart-btn {
    font-size: 10px;
    padding: 6px 8px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-bottom p {
    font-size: 11px;
  }
}


/* ============================================
   PRODUCT CARD SYMMETRY
   flex column so all cards in a row match height
   button always pinned to the bottom
   ============================================ */

.products-grid {
    align-items: stretch;
}

.product {
    display: flex;
    flex-direction: column;
}

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-info h3 {
    min-height: 2.6em;
}

.product-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
    flex-shrink: 0;
}

.product-bottom {
    margin-top: auto;
    padding-top: 8px;
}


/* ============================================
   CART PANEL
   ============================================ */

.cart-icon-wrap {
    cursor: pointer;
}

.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}

.cart-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.cart-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 380px;
    max-width: 95vw;
    height: 100%;
    background: #0f0f0f;
    border-left: 1px solid #1e1e1e;
    z-index: 201;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}

.cart-panel.open {
    right: 0;
}

.cart-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #1e1e1e;
    font-family: 'Rajdhani', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.cp-close-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 18px;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 4px;
    transition: color 0.2s;
    width: auto;
    height: auto;
    line-height: 1;
}

.cp-close-btn:hover { color: #e0e0e0; }

.cp-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.cp-empty-msg {
    text-align: center;
    color: #555;
    font-size: 13px;
    padding: 48px 0;
}


.cp-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.cp-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #161616;
    border: 1px solid #1e1e1e;
    border-radius: 10px;
    padding: 10px 12px;
    transition: border-color 0.2s;
}

.cp-item:hover { border-color: rgba(0,200,255,0.2); }

.cp-item-img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    background: #0d0d0d;
    border-radius: 7px;
    flex-shrink: 0;
    padding: 4px;
    border: 1px solid #1a1a1a;
}

.cp-no-img {
    background: #1a1a1a;
    border: 1px dashed #2a2a2a;
}

.cp-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cp-item-name {
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cp-item-price {
    font-size: 11px;
    font-weight: 700;
    color: #00c8ff;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.cp-qty-wrap {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.cp-qty-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid #2a2a2a;
    background: #1a1a1a;
    color: #aaa;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s;
    padding: 0;
    width: auto;
    height: auto;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

.cp-qty-btn:hover {
    border-color: #00c8ff;
    color: #00c8ff;
    background: rgba(0,200,255,0.08);
}

.cp-qty-num {
    min-width: 24px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #e0e0e0;
}

.cp-remove-btn {
    width: 26px;
    height: 26px;
    border: none;
    background: none;
    color: #3a3a3a;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    padding: 0;
    transition: color 0.18s, background 0.18s;
    flex-shrink: 0;
    width: auto;
    height: auto;
    width: 26px;
    height: 26px;
}

.cp-remove-btn:hover {
    color: #ff4545;
    background: rgba(255,69,69,0.1);
}


/* ============================================
   PROFILE AVATAR - colored letter, dark circle
   ============================================ */

.profile-area {
    position: relative;
    display: none;
    align-items: center;
}

.profile-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
}

.profile-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #141414;
    border: 1.5px solid rgba(0, 200, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 13px;
    font-weight: 900;
    color: #00c8ff;
    transition: border-color 0.22s, box-shadow 0.22s, transform 0.18s;
    user-select: none;
    line-height: 1;
}

.profile-area:hover .profile-avatar {
    border-color: rgba(0, 200, 255, 0.6);
    box-shadow: 0 0 10px rgba(0,200,255,0.3);
    transform: scale(1.05);
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #111;
    border: 1px solid #222;
    border-radius: 10px;
    padding: 8px 0;
    min-width: 175px;
    z-index: 10000;
    display: none;
    box-shadow: 0 12px 32px rgba(0,0,0,0.65);
}

.profile-dropdown.open { display: block; }

.pd-username {
    display: block;
    padding: 10px 16px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #e0e0e0;
    border-bottom: 1px solid #1e1e1e;
    margin-bottom: 4px;
}

.pd-link {
    display: block;
    padding: 8px 16px;
    font-size: 13px;
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}
.pd-link:hover { color: #00c8ff; }

.pd-logout {
    display: block;
    width: 100%;
    padding: 8px 16px;
    background: none;
    border: none;
    text-align: left;
    font-size: 13px;
    color: #ff4545;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    height: auto;
    transition: background 0.2s;
    border-radius: 0;
}
.pd-logout:hover { background: rgba(255,69,69,0.08); }


/* header-right: cart + profile side by side with gap */
.header-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}


.cp-footer {
    padding: 14px 20px;
    border-top: 1px solid #1e1e1e;
    display: none;
    flex-direction: column;
    gap: 9px;
    flex-shrink: 0;
}

.cp-summary {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
}

.cp-summary span:last-child {
    color: #e0e0e0;
    font-weight: 600;
}

.cp-checkout-btn {
    width: 100%;
    padding: 11px;
    background: #00c8ff;
    border: none;
    border-radius: 8px;
    color: #000;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
    height: auto;
}
.cp-checkout-btn:hover { opacity: 0.85; }

.cp-clear-btn {
    width: 100%;
    padding: 8px;
    background: transparent;
    border: 1px solid #1e1e1e;
    border-radius: 8px;
    color: #555;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    height: auto;
}
.cp-clear-btn:hover { border-color: #ff4545; color: #ff4545; }

.details-panel {
    display: none;
    padding: 10px 12px;
    margin: 8px -12px;
    background: rgba(0, 200, 255, 0.05);
    border-top: 1px solid rgba(0, 200, 255, 0.15);
    border-bottom: 1px solid rgba(0, 200, 255, 0.15);
    margin-bottom: 8px;
}

.details-panel p {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.5;
}

.details-btn {
    width: 100%;
    padding: 5px 0;
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    cursor: pointer;
    text-align: left;
    transition: color 0.2s;
    height: auto;
}

.details-btn:hover { color: var(--accent); }
