/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  background: #fff;
  color: #111;
  line-height: 1.5;
}

/* Header */
header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 40px;
  border-bottom: 1px solid #eaeaea;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-weight: 700;
  font-size: 1.2rem;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 25px;
}

nav ul li a {
  text-decoration: none;
  color: #333;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

nav ul li a:hover {
  color: #000;
  font-weight: 600;
}

/* Right Section (search + icons) */
.right-section {
  display: flex;
  align-items: center;
  gap: 18px;
}

.search-bar {
  display: flex;
  align-items: center;
  border: 1px solid #ccc;
  padding: 6px 10px;
  border-radius: 6px;
  background: #fafafa;
  width: 220px;
}

.search-bar input {
  border: none;
  outline: none;
  background: transparent;
  flex: 1;
  font-size: 0.9rem;
}

.search-bar i {
  font-size: 1.2rem;
  color: #555;
}

.right-section i {
  font-size: 1.4rem;
  cursor: pointer;
  color: #333;
}

/* Hero Section */
.hero {
  max-width: 1200px;
  margin: 40px auto;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f9f9f9;
  border-radius: 12px;
  gap: 20px;
}

.hero-text {
  flex: 1;
}

.hero-text h1 {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 10px;
}

.hero-text p {
  font-size: 1rem;
  color: #444;
  margin-bottom: 20px;
}

.hero-btn {
  background: #b22222;
  color: #fff;
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s ease;
}

.hero-btn:hover {
  background: #8b0000;
}

.hero-img img {
  width: 300px;
  border-radius: 10px;
}

/* Products Grid */
main {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

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

.product-card {
  border: 1px solid #eee;
  border-radius: 5px;
  overflow: hidden;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

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

.product-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  background: #f9f9f9;
}

.product-card-info {
  padding: 12px 15px;
}

.product-card-info h3 {
  font-size: 1rem;
  margin-bottom: 6px;
  font-weight: 600;
}

.price {
  font-size: 0.95rem;
  color: #444;
  font-weight: 500;
}

/* Footer */
footer {
  text-align: center;
  padding: 25px 0;
  margin-top: 40px;
  font-size: 0.85rem;
  color: #666;
  border-top: 1px solid #eaeaea;
}

/* Overlay behind cart */
body.cart-open::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 150;
}

/* Cart Sidebar */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -420px;
  /* hidden by default */
  width: 380px;
  height: 100%;
  background: #fff;
  box-shadow: -4px 0 15px rgba(0, 0, 0, 0.1);
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
  transition: right 0.3s ease;
  z-index: 200;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.cart-sidebar.active {
  right: 0;
  /* slide in */
}

/* Cart Header */
.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 12px;
  margin-bottom: 15px;
}

.cart-header h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #111;
}

/* Exit button */
.close-btn {
  background: transparent;
  border: 1px solid #ddd;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 1rem;
  cursor: pointer;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.close-btn:hover {
  background: #f5f5f5;
  border-color: #bbb;
  color: #000;
}

/* Cart Items */
.cart-items {
  flex: 1;
  overflow-y: auto;
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  position: relative;
}

.cart-item img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  margin: 0 12px;
}

/* Remove button */
.remove-btn {
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  background: #eee;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 0.8rem;
  cursor: pointer;
  color: #444;
}

.remove-btn:hover {
  background: #ddd;
}

/* Item Info */
.item-info {
  flex: 1;
  font-size: 0.85rem;
}

.item-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0;
  color: #111;
}

.item-variant {
  font-size: 0.8rem;
  color: #666;
  margin-top: 3px;
}

/* Item Actions (price + qty) */
.item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.item-price {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 6px;
}

/* Quantity controls */
.qty-control {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
}

.qty-control button {
  background: transparent;
  border: none;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 1rem;
  color: #333;
}

.qty-control span {
  padding: 0 10px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Divider */
.cart-items hr {
  border: none;
  border-top: 1px solid #eee;
  margin: 15px 0;
}

/* Cart Footer */
.cart-footer {
  border-top: 1px solid #eee;
  padding-top: 15px;
  font-size: 0.9rem;
  color: #444;
}

.cart-footer p {
  display: flex;
  justify-content: space-between;
  margin: 6px 0;
}

.cart-footer strong {
  font-weight: 600;
  font-size: 1rem;
}

/* Checkout Button */
.checkout-btn {
  width: 100%;
  background: #2563eb;
  /* bright blue */
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 8px;
  margin-top: 20px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.checkout-btn:hover {
  background: #1d4ed8;
  /* darker blue */
}

footer a:hover {
  color: #4f46e5 !important;
}

footer .border {
  border-color: #e6e6f0 !important;
}


/* products-ejs */
/* Product Container */
.product-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin: 60px 0;
  align-items: start;
}

/* Product Images */
.product-images {
  text-align: center;
}

.main-image-wrapper {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  overflow: hidden;
}

.product-images img {
  max-width: 100%;
  border-radius: 12px;
  transition: transform 0.3s ease;
}

.product-images img:hover {
  transform: scale(1.03);
}

.thumbnails {
  margin-top: 15px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

.thumbnails img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 8px;
  transition: border 0.2s ease;
}

.thumbnails img.active {
  border-color: #007bff;
}

/* Product Info */
.product-info h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.description {
  font-size: 1rem;
  color: #555;
  margin-bottom: 20px;
}

.price {
  font-size: 1.5rem;
  font-weight: 600;
  color: #18181b;
  margin-bottom: 15px;
}

/* Options */
.option-group {
  margin-bottom: 20px;
}

.option-group button {
  margin: 5px 8px 5px 0;
  border: none;
  padding: 5px 9px;
  border-radius: 25px;
  cursor: pointer;
  border: 1px solid #ccc;
  background: #f5f5f5;
  font-size: 0.95rem;

  /* Smooth transition for multiple properties */
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease,
    transform 0.2s ease;
}

.option-group button.active,
.option-group button:hover {
  border-color: #18181b;

  transform: scale(1.05);
}

.quantity-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 6px;
  overflow: hidden;
  margin: 10px 0;
}

.quantity-control button {
  width: 35px;
  height: 35px;
  border: none;
  background: #18181b;
  color: white;
  font-size: 18px;
  cursor: pointer;
}

.quantity-control input {
  width: 60px;
  text-align: center;
  border: none;
  background: white;
}

.action-buttons {
  justify-content: center;
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.action-buttons button {
  padding: 10px 50px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

#addToCart {
  background: white;
  border: 1px solid black;
  transition: all 0.2s ease;
}

#orderNow {
  background: #18181b;
  border: none;
  color: white;
  transition: all 0.2s ease;
}

#addToCart:hover {
  border-color: #2b2b30;
  opacity: 0.6;
}

#orderNow:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  opacity: 0.6;
}





/* account */
.sidebar {
  background: white;
  height: 100vh;
  border-right: 1px solid #ddd;
  padding-top: 20px;
}

.sidebar a {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  color: #333;
  text-decoration: none;
  transition: background 0.2s;
}

.sidebar a:hover {
  background: #f0f0f0;
}

.sidebar .active {
  background: #f0f0f0;
  font-weight: 600;
}

.sidebar img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
}

.sidebar h6 {
  text-align: center;
  font-size: 14px;
  margin-bottom: 20px;
}

.form-section {
  background: white;
  padding: 25px;
  border-radius: 6px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.05);
}

label {
  font-weight: 500;
  margin-bottom: 4px;
}


/* cart popup */
.cart-popup {
  display: none;
  /* эхэндээ нууц */
  position: absolute;
  right: 2%;
  top: 68px;
  width: 350px;
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  z-index: 1000;
  padding: 10px;
}

.cart-popup.active {
  display: block;
}

.cart-item-pop {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.cart-item-pop img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  margin-right: 8px;
  border-radius: 4px;
}

.item-info-pop {
  flex-grow: 1;
}

.item-title-pop {
  font-size: 14px;
  font-weight: 500;
}

.item-price-pop {
  font-weight: bold;
}

.checkout-btn-pop {
  width: 100%;
  background: black;
  color: white;
  padding: 8px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

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

.emptyCartDiv {
  margin: 30px
}

.emptyCartDiv p {
  text-align: center;
  font-size: small;
  margin-top: 10px;
}

#emptyCartImg {
  margin: auto;
  width: 80px;
}

.titleCartPop {
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid #eee;
}

/* =========================== shopping cart div ===================*/

/* ----------- Tab content ----------- */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}