/* ===== GLOBAL STYLES ===== */
:root {
  --primary: #0b6948;
  --secondary: #c4a253;
  --light-bg: #f8f9fa;
  --white: #ffffff;
  --gray: #6c757d;
  --border-color: #e9ecef;
  --shadow: 0 2px 8px rgba(0,0,0,0.05);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.1);
  --transition: all 0.3s ease;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--light-bg);
  color: #212529;
  line-height: 1.6;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
}

/* ===== BUTTONS ===== */
.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff;
  border-radius: 4px;
  padding: 8px 20px;
  font-weight: 500;
  transition: var(--transition);
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: #0a5a3e;
  border-color: #0a5a3e;
  box-shadow: none;
}

.btn-secondary {
  background-color: var(--secondary);
  border-color: var(--secondary);
  color: #fff;
}
.btn-secondary:hover {
  background-color: #b38f3d;
  border-color: #b38f3d;
}

.btn-outline-primary {
  border-color: var(--primary);
  color: var(--primary);
}
.btn-outline-primary:hover {
  background-color: var(--primary);
  color: #fff;
}

/* ===== HEADER ===== */
.top-header {
  background-color: var(--primary);
  padding: 10px 0;
}
.top-header .logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: 1px;
}
.top-header .logo span {
  color: var(--secondary);
}
.search-box {
  background-color: #fff;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.search-box input {
  border: none;
  padding: 10px 15px;
  flex: 1;
  font-size: 0.95rem;
}
.search-box button {
  background: var(--secondary);
  border: none;
  padding: 10px 15px;
  color: #fff;
  cursor: pointer;
}
.header-icons a {
  color: #fff;
  margin-left: 20px;
  font-size: 1.2rem;
  position: relative;
  text-decoration: none;
}
.header-icons .badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--secondary);
  color: #000;
  font-size: 0.7rem;
  padding: 3px 6px;
  border-radius: 50%;
}
.category-nav {
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  padding: 8px 0;
}
.category-nav a {
  color: #333;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0 12px;
  border-right: 1px solid var(--border-color);
}
.category-nav a:last-child {
  border-right: none;
}
.category-nav a:hover {
  color: var(--primary);
}

/* ===== HERO SECTION ===== */
.hero-section {
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://picsum.photos/1200/400?random=1') center/cover no-repeat;
  color: #fff;
  padding: 80px 0;
  text-align: center;
}
.hero-section h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 20px;
}
.hero-section p {
  font-size: 1.2rem;
  margin-bottom: 30px;
}
.hero-section .btn {
  font-size: 1.1rem;
  padding: 12px 30px;
}

/* ===== CATEGORY CARDS ===== */
.category-card {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  margin-bottom: 20px;
}
.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}
.category-card img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 15px;
}
.category-card h5 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--primary);
}

/* ===== FEATURE BOXES ===== */
.feature-box {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.feature-box i {
  font-size: 2rem;
  color: var(--secondary);
  margin-bottom: 10px;
}
.feature-box h6 {
  font-weight: 600;
  margin-bottom: 5px;
}
.feature-box p {
  font-size: 0.9rem;
  color: var(--gray);
  margin: 0;
}

/* ===== PRODUCT CARDS ===== */
.product-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  margin-bottom: 20px;
  position: relative;
}
.product-card:hover {
  box-shadow: var(--shadow-hover);
}
.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--secondary);
  color: #000;
  padding: 4px 10px;
  font-size: 0.8rem;
  border-radius: 20px;
  z-index: 2;
}
.product-image {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #fafafa;
}
.product-image img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}
.product-details {
  padding: 15px;
}
.product-title {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-price {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
}
.product-original-price {
  text-decoration: line-through;
  color: var(--gray);
  font-size: 0.9rem;
  margin-left: 8px;
}
.rating {
  color: #ffc107;
  font-size: 0.9rem;
  margin: 8px 0;
}
.actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.actions .btn {
  flex: 1;
  padding: 6px 0;
  font-size: 0.9rem;
}
.wishlist-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  cursor: pointer;
  z-index: 2;
}
.wishlist-icon i {
  color: var(--gray);
}
.wishlist-icon.active i {
  color: red;
}

/* ===== PROMO BANNER ===== */
.promo-banner {
  background: var(--secondary);
  color: #000;
  border-radius: 8px;
  padding: 40px;
  text-align: center;
  margin: 40px 0;
}
.promo-banner h3 {
  font-weight: 700;
  margin-bottom: 15px;
}
.promo-banner .btn {
  background: #fff;
  color: #000;
  border: none;
  padding: 10px 30px;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--primary);
  color: #fff;
  padding: 40px 0 20px;
  margin-top: 50px;
}
.footer a {
  color: #ddd;
  text-decoration: none;
  transition: var(--transition);
}
.footer a:hover {
  color: var(--secondary);
}
.footer .social-icons a {
  font-size: 1.5rem;
  margin-right: 15px;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  margin-top: 30px;
  text-align: center;
  color: #aaa;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  background: transparent;
  padding: 15px 0;
}
.breadcrumb-item a {
  color: var(--primary);
}
.breadcrumb-item.active {
  color: var(--gray);
}

/* ===== SIDEBAR FILTERS ===== */
.filter-card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.filter-title {
  font-weight: 600;
  margin-bottom: 15px;
  font-size: 1.1rem;
}
.price-range-slider {
  margin: 20px 0;
}
.ui-slider .ui-slider-handle {
  background: var(--primary);
  border: none;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.ui-slider .ui-slider-range {
  background: var(--secondary);
}
/* ===== SORTING BAR ===== */
.sort-bar {
  background: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
}
.view-toggle .btn {
  border: 1px solid var(--border-color);
  color: var(--gray);
  padding: 6px 12px;
}
.view-toggle .btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ===== GRID/LIST VIEW ===== */
.product-list-view .product-card {
  display: flex;
  flex-direction: row;
}
.product-list-view .product-image {
  width: 200px;
  height: 200px;
}
.product-list-view .product-details {
  flex: 1;
}

/* ===== PAGINATION ===== */
.pagination .page-link {
  color: var(--primary);
  border: none;
  margin: 0 3px;
  border-radius: 4px;
}
.pagination .page-item.active .page-link {
  background: var(--primary);
  color: #fff;
}

/* ===== PRODUCT DETAILS TABS ===== */
.nav-tabs .nav-link {
  color: var(--primary);
}
.nav-tabs .nav-link.active {
  font-weight: 600;
  border-bottom: 2px solid var(--primary);
}
.tab-content {
  background: #fff;
  padding: 20px;
  border-radius: 0 0 8px 8px;
  border: 1px solid var(--border-color);
  border-top: none;
}

/* ===== CART TABLE ===== */
.cart-table {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.cart-table td, .cart-table th {
  vertical-align: middle;
}
.cart-product-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}
.qty-selector {
  width: 100px;
}
.price-summary {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.price-summary .list-group-item {
  border: none;
  padding: 10px 0;
}

/* ===== AUTH PAGE ===== */
.auth-tabs {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.auth-tabs .nav-tabs {
  background: #f8f9fa;
  border-bottom: none;
}
.auth-tabs .nav-link {
  border: none;
  padding: 15px;
  color: #555;
}
.auth-tabs .nav-link.active {
  background: #fff;
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
}
.auth-form {
  padding: 30px;
}
.social-login .btn {
  border: 1px solid var(--border-color);
  margin-right: 10px;
}

/* ===== MY ORDERS ===== */
.sidebar-menu {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.sidebar-menu a {
  display: block;
  padding: 10px 15px;
  color: #333;
  text-decoration: none;
  border-radius: 4px;
}
.sidebar-menu a:hover,
.sidebar-menu a.active {
  background: var(--primary);
  color: #fff;
}
.order-card {
  background: #fff;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: var(--shadow);
}
.order-status {
  font-weight: 600;
}
.status-delivered { color: #28a745; }
.status-cancelled { color: #dc3545; }
.status-processing { color: #ffc107; }

/* ===== ADDRESS CARD ===== */
.address-card {
  background: #fff;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: var(--shadow);
  border-left: 4px solid transparent;
}
.address-card.default {
  border-left-color: var(--primary);
}
.default-badge {
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 10px;
}

/* ===== WISHLIST ===== */
.wishlist-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  padding: 15px;
}
.wishlist-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-right: 20px;
}
.wishlist-info {
  flex: 1;
}
.wishlist-actions .btn {
  margin-right: 10px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .top-header .logo {
    font-size: 1.5rem;
  }
  .search-box {
    margin: 10px 0;
  }
  .header-icons {
    text-align: center;
  }
  .category-nav a {
    display: inline-block;
    padding: 8px;
    font-size: 0.85rem;
  }
  .hero-section h1 {
    font-size: 2rem;
  }
  .hero-section p {
    font-size: 1rem;
  }
  .product-list-view .product-card {
    flex-direction: column;
  }
  .product-list-view .product-image {
    width: 100%;
    height: auto;
  }
  .wishlist-card {
    flex-direction: column;
    text-align: center;
  }
  .wishlist-img {
    margin-right: 0;
    margin-bottom: 15px;
  }
}