/* =========================================
   TOPBAR COMPONENT
========================================= */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 200;
  border-bottom: 1px solid var(--border-light);
}

/* Left side — hamburger */
.topbar-left {
  width: 64px;
  display: flex;
  align-items: center;
}

/* Center — brand name */
.topbar .logo {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 4px;
  text-transform: none;
  color: var(--text-color);
  flex: 1;
  text-align: center;
}

/* Right side — icons wrapper */
.topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* All topbar buttons */
.menu-btn,
.nav-search,
.nav-wishlist,
.nav-profile,
.nav-order {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-color);
  -webkit-appearance: none;
}

/* Bootstrap icon sizes & stroke for premium look */
.menu-btn i   { font-size: 1.55rem; -webkit-text-stroke: 0.3px; }
.nav-search i { font-size: 1.25rem; -webkit-text-stroke: 0.4px; }
.nav-wishlist i { font-size: 1.25rem; -webkit-text-stroke: 0.4px; }
.nav-profile i { font-size: 1.3rem; -webkit-text-stroke: 0.3px; } /* bi-person needs to be slightly larger but thinner to visually match the others */
.nav-order  i { font-size: 1.25rem; -webkit-text-stroke: 0.4px; }

@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }
}

@media (max-width: 768px) {
  body {
    padding-bottom: 0;
  }
}

/* =========================================
   SIDEMENU COMPONENT
========================================= */
.sidemenu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 3000;
}

.sidemenu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.sidemenu {
  position: fixed;
  top: 0;
  left: -400px;
  width: 320px;
  max-width: 85%;
  height: 100vh;
  background: var(--bg-color);
  z-index: 3001;
  transition: all 0.4s cubic-bezier(0.77, 0, 0.175, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidemenu.active {
  left: 0;
}

.sidemenu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
}

.sidemenu-logo {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 4px;
  color: var(--text-color);
}

.sidemenu-close {
  color: var(--text-color);
}

.sidemenu-nav {
  display: flex;
  flex-direction: column;
}

.sidemenu-nav li {
  border-bottom: 1px solid var(--border-light);
}

.sidemenu-nav a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: none;
  color: var(--text-color);
  letter-spacing: 0.5px;
  transition: background 0.3s ease;
}

.sidemenu-nav a:hover {
  background: #fafafa;
}

.sidemenu-nav a span.plus {
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--text-color);
}

.sidemenu-footer {
  margin-top: auto;
  padding: 30px 20px;
  display: flex;
  flex-direction: row;
  gap: 10px;
}

.btn-signin,
.btn-signup {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  cursor: pointer;
  border-radius: var(--radius-sm);
  flex: 1;
}

.btn-signin {
  border: 1px solid var(--text-color);
  color: var(--text-color);
  background: transparent;
}

.btn-signin:hover {
  background: #f5f5f5;
}

.btn-signup {
  background: var(--text-color);
  color: var(--bg-color) !important;
  border: 1px solid var(--text-color);
}

.btn-signup:hover {
  background: #333;
}

/* =========================================
   CART DRAWER (Right Side)
========================================= */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 90vw;
  max-width: 400px;
  height: 100vh;
  background-color: var(--bg-color);
  z-index: 2000;
  transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -5px 0 15px rgba(0,0,0,0.1);
}

.cart-drawer.active {
  right: 0;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 1px solid var(--border-light);
}

.cart-header h2 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 1px;
}

.cart-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #333;
}

.cart-items-container {
  flex: 1;
  overflow-y: auto;
  padding: 25px;
}

.cart-item {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  border-bottom: 1px solid #f5f5f5;
  padding-bottom: 25px;
}

.cart-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.cart-item-image {
  width: 80px;
  height: 100px;
  background: #f8f8f8;
  flex-shrink: 0;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-details {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  flex: 1;
}

.cart-item-title {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 5px;
  text-transform: none;
  line-height: 1.4;
}

.cart-item-price {
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 5px;
}

.cart-item-size {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 15px;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.quantity-selector {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  height: 32px;
  border-radius: var(--radius-sm);
}

.qty-btn {
  background: none;
  border: none;
  width: 30px;
  height: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.qty-number {
  font-size: 0.85rem;
  font-weight: 500;
  min-width: 30px;
  text-align: center;
}

.cart-item-remove {
  background: #f8f8f8;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.cart-item-remove:hover {
  background: #e0e0e0;
  color: #d32f2f;
}

.cart-footer {
  padding: 25px;
  background-color: #fcfcfc;
  border-top: 1px solid #f0f0f0;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cart-total-row {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 20px;
}

.btn-checkout {
  width: 100%;
  background-color: var(--text-color);
  color: var(--bg-color);
  border: none;
  padding: 16px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 1px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background-color 0.3s ease;
}

.btn-checkout:hover {
  background-color: #333;
}

/* =========================================
   FOOTER COMPONENT
========================================= */
.footer {
  padding: 60px 5%;
  border-top: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  background: var(--bg-color);
}

.footer h3 {
  font-size: 0.9rem;
  margin-bottom: 20px;
  text-transform: none;
  letter-spacing: 1px;
  font-weight: 600;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--text-color);
}

.footer-bottom {
  text-align: center;
  padding: 20px;
  font-size: 0.75rem;
  color: #888;
  text-transform: none;
}

/* =========================================
   GLOBAL PRODUCT GRID & CARDS
========================================= */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2px;
  background: #fff;
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
  }
}

.product-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  background: #fff;
  text-decoration: none;
  color: inherit;
}

.product-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5; 
  overflow: hidden;
  background-color: #e5e5e5;
}

.product-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s ease;
}

.product-image-wrapper .img-hover {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}

.badge-soldout {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #fff;
  color: #666;
  padding: 4px 8px;
  font-size: 9px;
  font-weight: 500;
  text-transform: none;
  z-index: 2;
}

.add-icon, .love-icon, .remove-icon {
  position: absolute;
  background: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  color: #000;
  z-index: 10;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.add-icon i, .love-icon i, .remove-icon i {
  font-size: 0.9rem;
  line-height: 0;
  margin-top: 2px; /* Slight optical adjustment for perfectly centering Bootstrap Icons */
}

.add-icon:hover, .love-icon:hover, .remove-icon:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.add-icon {
  bottom: 10px;
  right: 10px;
}

.love-icon, .remove-icon {
  top: 10px;
  right: 10px;
}

@media (hover: hover) {
  .product-card:hover .img-default { opacity: 0; }
  .product-card:hover .img-hover { opacity: 1; }
}

.product-card-info {
  display: flex;
  flex-direction: column; 
  align-items: flex-start;
  text-align: left;
  padding: 15px 12px 25px 12px;
}

.product-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #000;
  margin-bottom: 6px;
  line-height: 1.4;
  /* Allowing multiple lines */
}

.product-price {
  font-size: 0.9rem;
  font-weight: 500;
  color: #000;
  margin-bottom: 15px;
}

.product-colors {
  font-size: 0.75rem;
  font-weight: 500;
  color: #888;
}

/* =========================================
   MOBILE BOTTOM BAR
========================================= */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50px; /* Match topbar height */
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-light);
  z-index: 1000;
  padding: 0;
  align-items: center;
}

.bottom-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  text-decoration: none;
  flex: 1;
}

.bottom-bar-item i {
  font-size: 1.3rem; 
  -webkit-text-stroke: 0.4px; /* Makes the icons slightly bolder like top bar */
}

@media (max-width: 768px) {
  .mobile-bottom-bar {
    display: flex;
    justify-content: space-around;
  }
}
