/* ===================================================================== */
/* GENERAL COMPONENTS */
body {
  margin: 0;
  overflow-x: hidden;
  font-family: Arial, sans-serif;
/*  background: #f4f4f4; /* softer than pure white */
/*  color: #222; */
}

body:not(.home) {
  padding-top: 50px; /* padding so content starts after navbar */
}

/*button {
  transition: background 0.2s ease, transform 0.1s ease;
}

button:hover {
  background: #333;
}

button:active {
  transform: scale(0.95);
}*/

.skeleton {
  background: linear-gradient(
    90deg,
    #eee 25%,
    #ddd 37%,
    #eee 63%
  );
  background-size: 400% 100%;
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  0% { background-position: 100% 0 }
  100% { background-position: -100% 0 }
}

.empty-state {
  text-align: center;
  color: #777;
  padding: 40px;
}

/* ===================================================================== */
/* NAVBAR */
.navbar {
/*  background: rgba(0,0,0,0.3);*/
  background: transparent;
  backdrop-filter: blur(5px);

  position: fixed;
  top: 0;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px; /* padding: 15px 20px; */
  color: white;
  z-index: 10;

  transition: transform 0.3s ease, background 0.3s ease;
}

.navbar nav {
  display: flex;
  gap: 15px;
  /*flex-wrap: wrap; /* prevents overflow */
  flex-wrap: nowrap;
}

.navbar a {
  color: white;
  text-decoration: none;
  white-space: nowrap; /* prevents breaking */
}

/* hidden state */
.navbar.hidden {
  transform: translateY(-100%);
}

/* top of page */
.navbar.top {
  background: transparent;
  backdrop-filter: none;
}

/* scrolled state */
.navbar.scrolled {
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(6px);
}

/* Logo */
.logo {
/*  font-size: 1.2rem; */
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  font-weight: normal;
  white-space: nowrap;
}

.hamburger {
  display: none;
  font-size: 24px;
  cursor: pointer;
}

/* AuthArea: "Login / Register" or "Logged in as X / Logout" */
#authArea {
  display: flex;
  gap: 10px;
  align-items: center;
}

.auth-user {
  white-space: nowrap;
  font-size: 0.95rem;
}

/* Mobile */
@media (max-width: 768px) {
  .navbar nav {
    display: none;
    flex-direction: column;
    background: rgba(0,0,0,0.9);
    position: absolute;
    top: 60px;
    right: 0;
    width: 200px;
    padding: 10px;
  }

  .navbar nav.active {
    display: flex;
  }

  .hamburger {
    display: block;
  }

  .product-detail-card {
    flex-direction: column;
  }

  .product-image {
    width: 100%;
  }
}

/* ===================================================================== */
/* HERO */
.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  text-align: center;
}

.hero-overlay h1 {
  font-size: 3rem;
}

.hero-overlay button {
  padding: 10px 20px;
  font-size: 1rem;
  cursor: pointer;
}

/* ===================================================================== */
/* HORIZONTAL SCROLLING SECTIONS */
.horizontal-section {
  text-align: center;
  /*padding: 40px 20px;*/
  padding: 0px 20px;
  background: white;
}

.horizontal-section h2 {
  margin-bottom: 10px;  /* tighten title spacing */
}

.horizontal-scroll {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  padding-bottom: 10px;

  scroll-snap-type: x mandatory;
  cursor: grab;
}

.horizontal-scroll::-webkit-scrollbar {
  height: 6px;
}

.horizontal-scroll.dragging {
  cursor: grabbing;
}

/* ===================================================================== */
/* CATEGORIES */
.category-card {
  /*min-width: 140px;*/
  width: 140px;
  flex-shrink: 0;
  text-align: center;
  cursor: pointer;

  scroll-snap-align: start;
}

.category-card a {
  display:block;
  color:inherit;
  text-decoration:none;
}

.category-card img {
  width: 100%;
  border-radius: 10px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #fff;
}

/* ===================================================================== */
/* PRODUCTS */
.products-section {
  text-align: center;
  /*padding: 60px 20px;*/
  padding: 5px 20px;
  background: #f9f9f9;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.product-card {
  background: white;
  padding: 15px;
  /*text-align: center;*/
  border-radius: 10px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.product-card h3 {
  margin: 10px 0 5px;
}

.product-card p {
  margin: 0;
}

.product-card img {
  width: 100%;
}

.product-page {
  padding: 100px 20px;
}

.product-detail-card {
  display: flex;
  gap: 40px;
  max-width: 1000px;
  margin: auto;
  background: white;
  padding: 20px;
  border-radius: 12px;
}

.product-image {
  width: 50%;
  border-radius: 10px;
}

.product-info {
  flex: 1;
}

.price {
  font-size: 1.5rem;
  margin: 10px 0;
}

.product-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.product-actions button {
  padding: 8px 12px;
  cursor: pointer;
}

/* ===================================================================== */
/* CART */
.cart-page {
  padding: 100px 20px;
}

.cart-item {
  display: flex;
  gap: 20px;
  background: white;
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 10px;
  align-items: center;
}

/* container for icon + number */
.cart-overlay {
  position: absolute;
  top: 6px;
  right: 6px;
  display: none;
  align-items: center;
  justify-content: center;
}

/* quantity bubble */
.cart-qty {
  position: absolute;
  top: -6px;
  right: -6px;
  background: black;
  color: white;
  font-size: 10px;
  border-radius: 50%;
  padding: 2px 5px;
  min-width: 16px;
  text-align: center;
}

.cart-img {
  width: 100px;
  border-radius: 8px;
}

.cart-info {
  flex: 1;
}

.qty-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 15px 0;
  justify-content: center;
}

.qty-controls button {
  background: black;
  color: white;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
}

.qty-controls.out {
  display: flex;
  justify-content: center;
  align-items: center;
}

.out-of-stock {
  color: #b00;
  font-weight: bold;
  padding: 6px 10px;
  border: 1px solid #b00;
  border-radius: 6px;
}

.cart-footer {
  position: sticky;
  bottom: 0;
  background: white;
  padding: 15px;
  border-top: 1px solid #ddd;
}

.checkout-btn {
  padding: 10px 20px;
  background: black;
  color: white;
  border: none;
  cursor: pointer;
}

.purchase-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.product-img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;   /* square cards */
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.product-img-wrapper img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain; /* keeps full image */
}

.product-img-wrapper.clickable {
  cursor: pointer;
  overflow: hidden;
  border-radius: 10px;
}

.product-img-wrapper.clickable img {
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.product-img-wrapper.clickable:hover img {
  transform: scale(1.05);
  opacity: 0.85;
}

.product-img-wrapper.clickable:active img {
  transform: scale(0.98);
}

.cart-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: black;
  color: white;
  border-radius: 50%;
  padding: 5px 8px;
  font-size: 12px;
  display: none;
}

/*.cart-icon {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  display: none;
}*/
/* icon */
.cart-icon {
  width: 22px;
  height: 22px;
}

/* ===================================================================== */
/* WISHLIST */
/*.wishlist-overlay {
  position: absolute;
  top: 10px;
  left: 10px;

  opacity: 0;
  transition: opacity .2s;
}

.product-card:hover
.wishlist-overlay {
  opacity: 1;
}

.wishlist-icon {
  width: 24px;
  height: 24px;
  cursor: pointer;
}
*/
.wishlist-overlay {
  position: absolute;
  top: 6px;
  left: 6px;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  z-index: 5;
}

.wishlist-icon {
  width: 22px;
  height: 22px;
}

.wishlist-overlay img {
  opacity: 0.75;
}

.wishlist-overlay:hover img {
  opacity: 1;
}

.wishlist-overlay.active img {
  content: url(
    "media/icons/wishlist_filled_icon.png"
  );
}

























.account-layout {
  display:flex;
  gap:20px;
  padding:20px;
}

.account-sidebar {
  width:220px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.account-content {
  flex:1;
}

.account-section {
  display:none;
}

.account-section.active {
  display:block;
}

.orders-layout {
  display:flex;
  gap:20px;
}

.orders-list {
  width:250px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.order-button {
  padding:10px;
  text-align:left;
  cursor:pointer;
}

.order-details {
  flex:1;
}

#wishlist.active,
#recently-viewed.active {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
  gap:20px;
}
