/* ========== RESET & BASE ========== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #cb354e;
  --primary-dark: #a82a3f;
  --bg: #ffffff;
  --text: #1a1a1a;
  --text-light: #666;
  --border: #e5e5e5;
  --card-bg: #ffffff;
  --star: #f5a623;
  --radius: 4px;
  --max-width: 1300px;
  --transition: 200ms ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  padding-top: 60px;
}
body.admin-mode {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

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

ul {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ========== HEADER ========== */
.header {
  background-color: var(--primary);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  flex-shrink: 0;
}

.logo-text {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.logo-accent {
  color: #ffd6e0;
}

.search-bar {
  flex: 1;
  max-width: 520px;
  display: flex;
  align-items: center;
  background: var(--bg);
  border-radius: var(--radius);
  overflow: visible;
  margin: 0 auto;
  position: relative;
}

.search-input {
  flex: 1;
  padding: 10px 16px;
  border: none;
  outline: none;
  font-size: 0.9rem;
  background: transparent;
}

.search-btn {
  padding: 10px 16px;
  color: var(--primary);
  font-size: 1rem;
}

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

.mobile-search-bar {
  display: none;
  background: #cb354e;
  padding: 12px 15px;
  align-items: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  position: relative;
}

.mobile-search-bar.active {
  display: flex;
}

.mobile-search-input {
  flex: 1;
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
}

.search-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
}

.search-dropdown.active {
  display: block;
}

.search-mobile-btn {
  display: none;
}

.search-row {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  gap: 12px;
  transition: background 0.15s;
}

.search-row:last-child {
  border-bottom: none;
}

.search-row:hover {
  background: #f5f5f5;
}

.search-row-img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 4px;
  background: #f5f5f5;
}

.search-row-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.search-row-name {
  font-size: 0.9rem;
  color: #333;
  font-weight: 500;
}

.search-row-price {
  font-size: 0.85rem;
  color: #cb354e;
  font-weight: 600;
}

.header-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  color: #fff;
  font-size: 1.15rem;
  padding: 8px;
  border-radius: 50%;
  transition: background var(--transition);
  position: relative;
}

.icon-btn:hover {
  background: rgba(255,255,255,0.15);
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #fff;
  color: var(--primary);
  font-size: 0.65rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--primary);
}

.mobile-menu-btn {
  display: none;
  color: #fff;
  font-size: 1.4rem;
  padding: 8px;
  order: -1;
}

/* ========== NAVBAR ========== */
.navbar {
  background: var(--primary);
  border-top: 1px solid rgba(255,255,255,0.15);
}

.navbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 0;
}

.nav-link {
  display: block;
  padding: 12px 28px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background var(--transition);
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255,255,255,0.15);
}

/* Mobile nav */
.mobile-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--primary-dark);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  z-index: 99;
}

.mobile-nav.open {
  max-height: 500px;
}

.mobile-nav .nav-link {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* ========== BANNER ========== */
.banner {
  width: 100%;
  height: 600px;
  position: relative;
  overflow: hidden;
}

.banner-slides {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary) 0%, #8b1a30 50%, #5c1122 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  position: relative;
  transition: opacity 0.5s ease;
  opacity: 0;
}

.banner-slides.loaded {
  opacity: 1;
}

.banner-slide {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: left;
  color: #fff;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  background-size: cover;
  background-position: center;
}

.banner-slide.active {
  opacity: 1;
}

.banner-slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
}

.banner-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  z-index: 10;
  transition: background 0.3s;
}

.banner-arrow:hover {
  background: rgba(255,255,255,0.4);
}

.banner-prev {
  left: 20px;
}

.banner-next {
  right: 20px;
}

.banner-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.banner-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: background 0.3s;
}

.banner-dot.active {
  background: #fff;
}

.banner-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.banner-tag {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  padding: 6px 20px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 20px;
  backdrop-filter: blur(4px);
}

.banner-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.1;
  width: 400px;
}

.banner-subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 32px;
}

.banner-btn {
  display: inline-block;
  background: #fff;
  color: var(--primary);
  padding: 14px 40px;
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--radius);
  transition: transform var(--transition), box-shadow var(--transition);
}

.banner-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* ========== SPLIT BANNERS ========== */
.split-banners {
  padding: 30px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.split-banners-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.split-banner-item {
  position: relative;
  height: 300px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
}

.split-banner-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.split-banner-item:hover img {
  transform: scale(1.05);
}

.split-banner-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: #fff;
}

.split-banner-content.right {
  text-align: right;
}

.split-banner-content h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.split-banner-content p {
  font-size: 0.95rem;
  margin-bottom: 15px;
  opacity: 0.9;
}

.split-banner-btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 10px 24px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.3s;
}

.split-banner-btn:hover {
  background: #b32e42;
}

/* ========== SECTION TITLE ========== */
.section-title {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 30px;
  color: var(--text);
}

/* ========== BENEFITS ========== */
.benefits-section {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 40px 20px;
  background: #fafafa;
}

.benefits-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.benefit-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #fdf0f2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.benefit-icon i {
  font-size: 1.3rem;
  color: var(--primary);
}

.benefit-text h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

.benefit-text p {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-light);
}

/* ========== CATEGORIES ========== */
.categories-section {
  max-width: var(--max-width);
  margin: 50px auto;
  padding: 0 20px;
}

.categories-section .section-title {
  text-align: left;
}

.categories-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.categories-container {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 10px 0;
  flex: 1;
}

.categories-container::-webkit-scrollbar {
  display: none;
}

.category-card {
  flex-shrink: 0;
  width: 151px;
  text-align: center;
  cursor: pointer;
  transition: transform var(--transition);
}

.category-card:hover {
  transform: translateY(-3px);
}

.category-img-wrapper {
  width: 135px;
  height: 135px;
  margin: 0 auto;
  padding: 8px;
  background: #f9f9f9;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  transition: border-color var(--transition);
}

.category-card:hover .category-img-wrapper {
  border-color: var(--primary);
}

.category-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.category-name {
  display: block;
  margin: 8px 0 2px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.carousel-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
  z-index: 2;
}

.carousel-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.carousel-prev {
  margin-right: 8px;
}

.carousel-next {
  margin-left: 8px;
}

/* ========== CATALOG ========== */
.catalog-section {
  max-width: var(--max-width);
  margin: 50px auto;
  padding: 0 20px;
}

.catalog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}

.catalog-title {
  margin-bottom: 0;
  text-align: left;
}

.filter-dropdown {
  position: relative;
}

.filter-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--transition);
}

.filter-dropdown-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-dropdown-btn .fa-chevron-down {
  font-size: 0.7rem;
  transition: transform 200ms ease;
}

.filter-dropdown.open .filter-dropdown-btn .fa-chevron-down {
  transform: rotate(180deg);
}

.filter-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  min-width: 280px;
  z-index: 50;
  display: none;
}

.filter-dropdown.open .filter-dropdown-menu {
  display: block;
}

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

/* ========== PRODUCT CARD ========== */
.product-card {
  width: 100%;
  background: var(--card-bg);
  overflow: visible;
  position: relative;
  transition: transform var(--transition);
}

.product-card:hover {
  transform: translateY(-3px);
}

.product-img-wrapper {
  width: 100%;
  height: 384px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.product-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}

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

.discount-badge {
  position: absolute;
  top: 0;
  left: 0;
  background: #cb354e;
  color: #fff;
  padding: 4px 8px;
  border-radius: 0;
  font-size: 0.75rem;
  font-weight: 700;
  z-index: 2;
}

.wishlist-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: #fff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.2s;
}

.wishlist-icon i {
  font-size: 1rem;
  color: #ccc;
  transition: color 0.2s;
}

.wishlist-icon:hover i,
.wishlist-icon.active i {
  color: #cb354e;
}

/* Product info area */
.product-info {
  width: 100%;
  height: 111px;
  background: var(--card-bg);
  position: relative;
}

.product-info-content {
  padding: 10px 0px 10px 0px;
  height: 111px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 200ms ease;
  position: relative;
  z-index: 4;
  background: #ffffff;
}

.product-name {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 40px;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  height: 15px;
}

.stars {
  color: var(--star);
  letter-spacing: 1px;
  font-size: 0.8rem;
}

.rating-count {
  color: var(--text-light);
  font-size: 0.75rem;
}

.product-price {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 24px;
}

.price-current {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
}

.price-original {
  font-size: 0.8rem;
  color: var(--text-light);
  text-decoration: line-through;
}

/* Buy button (hidden by default) */
.product-buy-btn {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 140px;
  height: 35px;
  overflow: hidden;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 0;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 12px;
  z-index: 3;
  opacity: 0;
  transition: opacity 100ms ease 150ms;
}

/* Hover parallax effect */
.product-card:hover .product-info-content {
  transform: translateY(-35px);
}

.product-card:hover .product-buy-btn {
  opacity: 1;
}

/* ========== FILTERS ========== */
.filter-accordion {
  padding: 4px;
}

.filter-accordion-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: none;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  text-align: left;
}

.filter-accordion-item:hover {
  background: #f5f5f5;
}

.filter-accordion-item.active {
  color: var(--primary);
  font-weight: 600;
  background: #fdf0f2;
}

.filter-accordion-item .fa-check {
  font-size: 0.75rem;
  color: var(--primary);
}

.filter-accordion-item + .filter-accordion-item {
  border-top: 1px solid var(--border);
}

/* ========== CART PANEL ========== */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms ease, visibility 200ms ease;
}

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

.cart-panel {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  max-width: 90vw;
  height: 100%;
  background: var(--bg);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transition: right 300ms ease;
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
}

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

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

.cart-panel-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.cart-close {
  font-size: 1.2rem;
  color: var(--text-light);
  padding: 4px;
}

.cart-close:hover {
  color: var(--primary);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--text-light);
}

.cart-empty i {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.4;
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.cart-item-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-price {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.cart-item-qty button {
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.cart-item-qty button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.cart-item-qty span {
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.cart-item-remove {
  color: var(--text-light);
  font-size: 0.85rem;
  padding: 4px;
}

.cart-item-remove:hover {
  color: #e74c3c;
}

.cart-panel-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 12px;
}

/* ========== WISHLIST ========== */
.wishlist-btn {
  position: relative;
}

.wishlist-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #fff;
  color: #cb354e;
  font-size: 0.65rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border: 2px solid #cb354e;
}

.wishlist-panel {
  position: fixed;
  top: 0;
  right: -380px;
  width: 360px;
  height: 100vh;
  background: #fff;
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
}

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

.wishlist-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
  background: #cb354e;
  color: #fff;
}

.wishlist-panel-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.wishlist-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
}

.wishlist-items {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.wishlist-empty {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

.wishlist-empty i {
  font-size: 3rem;
  margin-bottom: 10px;
  color: #ddd;
}

.wishlist-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid #eee;
  align-items: center;
}

.wishlist-item-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 6px;
  background: #f5f5f5;
}

.wishlist-item-info {
  flex: 1;
}

.wishlist-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.wishlist-item-price {
  font-size: 0.9rem;
  color: #cb354e;
  font-weight: 700;
}

.wishlist-item-remove {
  background: none;
  border: none;
  color: #999;
  font-size: 1rem;
  cursor: pointer;
  padding: 5px;
}

.wishlist-item-remove:hover {
  color: #cb354e;
}

/* ========== COMPARE PANEL ========== */
.compare-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 360px;
  height: 100vh;
  background: #fff;
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
}

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

.compare-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
  background: #cb354e;
  color: #fff;
}

.compare-panel-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.compare-view-btn {
  background: #fff;
  color: #cb354e;
  border: none;
  border-radius: var(--radius);
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  margin-right: 8px;
}

.compare-panel-footer {
  padding: 12px 16px;
  border-top: 1px solid #eee;
  background: #f8f8f8;
}

.compare-panel-footer .compare-view-btn {
  width: 100%;
  margin: 0;
  padding: 12px;
  font-size: 0.9rem;
  background: #cb354e;
  color: #fff;
}

.compare-panel-footer .compare-view-btn:hover {
  opacity: 0.9;
}

.compare-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
}

.compare-items {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.compare-item {
  position: relative;
  border: 1px solid #eee;
  border-radius: var(--radius);
  padding: 10px;
  margin-bottom: 10px;
  text-align: center;
}

.compare-item-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 8px;
}

.compare-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 0 4px 0;
}

.compare-item-price {
  font-size: 0.9rem;
  font-weight: 700;
  color: #cb354e;
  margin: 0;
}

.compare-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  background: #fee;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  color: #e74c3c;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.compare-table th, .compare-table td {
  border: 1px solid #eee;
  padding: 8px 10px;
  text-align: left;
}

.compare-table th {
  background: #f8f8f8;
  font-size: 0.8rem;
}

.compare-label {
  font-weight: 700;
  background: #f8f8f8;
  width: 120px;
}

.compare-modal-content {
  max-height: 80vh;
  overflow-y: auto;
}

.checkout-btn {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition);
}

.checkout-btn:hover {
  background: var(--primary-dark);
}

/* ========== PRODUCT DETAIL ========== */
.detail-section {
  max-width: var(--max-width);
  margin: 20px auto;
  padding: 0 20px;
}

.detail-breadcrumb {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 20px;
}

.detail-breadcrumb a {
  color: var(--text-light);
  transition: color var(--transition);
}

.detail-breadcrumb a:hover {
  color: var(--primary);
}

.detail-breadcrumb span {
  color: var(--text);
}

.detail-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
  align-items: start;
}

.detail-gallery {
  display: flex;
  gap: 12px;
  position: sticky;
  top: 80px;
}

.detail-thumbnails {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-thumb {
  width: 70px;
  height: 70px;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--transition);
  flex-shrink: 0;
}

.detail-thumb:hover,
.detail-thumb.active {
  border-color: var(--primary);
}

.detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.detail-main-img-wrapper {
  flex: 1;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}

.detail-main-img-wrapper img {
  width: 100%;
  height: 600px;
  object-fit: contain;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--text);
  transition: background var(--transition);
  z-index: 2;
}

.gallery-arrow:hover {
  background: #fff;
}

.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }

.mobile-img-arrow {
  display: none;
}

.detail-info {
  padding: 10px 0;
}

.detail-category {
  display: inline-block;
  padding: 4px 12px;
  background: #f5f5f5;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-light);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-name {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
}

.detail-price-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.detail-price-current {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

.detail-price-original {
  font-size: 0.95rem;
  color: var(--text-light);
  text-decoration: line-through;
}

.detail-discount {
  padding: 3px 8px;
  background: #27ae60;
  color: #fff;
  border-radius: var(--radius);
  font-size: 0.7rem;
  font-weight: 700;
}

.detail-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 0.85rem;
}

.detail-features {
  list-style: none;
  margin-bottom: 20px;
}

.detail-features li {
  padding: 4px 0;
  font-size: 0.85rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-features li i {
  color: #27ae60;
  font-size: 0.75rem;
}

.detail-options {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}

.detail-option-group label {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}

.size-options, .color-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.size-btn {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition);
}

.size-btn:hover, .size-btn.active {
  border-color: var(--text);
  background: var(--text);
  color: #fff;
}

.color-btn {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition);
}

.color-btn:hover, .color-btn.active {
  border-color: var(--text);
  background: var(--text);
  color: #fff;
}

.detail-qty-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.detail-qty-row label {
  font-size: 0.8rem;
  font-weight: 600;
}

.qty-selector {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.qty-selector button {
  width: 32px;
  height: 32px;
  background: #f5f5f5;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background var(--transition);
}

.qty-selector button:hover {
  background: #e0e0e0;
}

.qty-selector span {
  width: 40px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.detail-total-price {
  font-size: 16px;
  color: #7d7f83;
  font-weight: 700;
  margin-left: 10px;
  white-space: nowrap;
}

.detail-actions {
  margin-bottom: 8px;
}

.detail-add-cart {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background var(--transition);
}

.detail-add-cart:hover {
  background: var(--primary-dark);
}

.detail-buy-now {
  width: 100%;
  padding: 12px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background var(--transition);
  margin-bottom: 14px;
}

.detail-buy-now:hover {
  background: #333;
}

.detail-links {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
}

.detail-links a {
  font-size: 0.8rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color var(--transition);
}

.detail-links a:hover {
  color: var(--primary);
}

.detail-share {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 0.8rem;
  color: var(--text-light);
}

.detail-share a {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: background var(--transition), color var(--transition);
}

.detail-share a:hover {
  background: var(--primary);
  color: #fff;
}

.detail-info-items {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--text-light);
}

.info-item i {
  color: var(--primary);
  width: 16px;
  text-align: center;
}

/* ========== DETAIL TABS ========== */
.detail-tabs {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 40px;
}

.tabs-header {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  padding: 12px 24px;
  background: transparent;
  border: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: color var(--transition);
  border-bottom: 2px solid transparent;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-content {
  display: none;
  padding: 24px;
}

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

.tab-content h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.tab-content p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-light);
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.specs-table tr {
  border-bottom: 1px solid var(--border);
}

.specs-table tr:last-child {
  border-bottom: none;
}

.specs-table td {
  padding: 10px 14px;
  font-size: 0.85rem;
}

.specs-table td:first-child {
  font-weight: 600;
  width: 40%;
  background: #fafafa;
}

/* ========== REVIEWS ========== */
#tab-reviews {
  padding: 20px 0;
}

.reviews-summary {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
  margin-bottom: 24px;
}

.reviews-avg {
  text-align: center;
}

.reviews-avg-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
  line-height: 1;
}

.reviews-avg-stars {
  font-size: 1.2rem;
  color: #f5a623;
  margin: 4px 0;
}

.reviews-avg-count {
  font-size: 0.85rem;
  color: var(--text-light);
}

.reviews-empty {
  text-align: center;
  color: var(--text-light);
  padding: 40px 0;
  font-size: 0.95rem;
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.review-item {
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.review-stars {
  color: #f5a623;
  font-size: 1rem;
}

.review-author {
  font-weight: 600;
  font-size: 0.9rem;
}

.review-date {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-left: auto;
}

.review-title {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.review-comment {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.5;
}

.review-form-wrapper {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafafa;
}

.review-form-wrapper h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.review-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.review-form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.review-form-row label {
  font-size: 0.85rem;
  font-weight: 600;
}

.review-form-row input,
.review-form-row textarea {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
}

.review-form-row input:focus,
.review-form-row textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.review-star-input {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 2px;
}

.review-star-input input {
  display: none;
}

.star-label {
  font-size: 1.8rem;
  color: #ddd;
  cursor: pointer;
  transition: color 0.2s;
}

.star-label:hover,
.star-label:hover ~ .star-label,
.review-star-input input:checked ~ .star-label {
  color: #f5a623;
}

.review-submit-btn {
  align-self: flex-start;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.review-submit-btn:hover {
  background: var(--primary-dark);
}

.reviews-login-msg {
  text-align: center;
  padding: 30px 0;
  color: var(--text-light);
  font-size: 0.95rem;
}

.reviews-login-msg a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
}

/* ========== RELATED PRODUCTS ========== */
.detail-related {
  margin-bottom: 40px;
}

.detail-related h2 {
  text-align: left;
  font-size: 1.4rem;
  margin-bottom: 24px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}

.detail-related .product-card {
  max-width: 100%;
}

/* ========== CHECKOUT ========== */
.checkout-section {
  max-width: var(--max-width);
  margin: 40px auto;
  padding: 0 20px;
}

.checkout-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 24px;
}
.checkout-back:hover { text-decoration: underline; }

.checkout-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.checkout-steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.checkout-step {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.checkout-step-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
}
.checkout-step-num { color: var(--primary); font-weight: 700; }

.checkout-step-change {
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  transition: background var(--transition);
}
.checkout-step-change:hover { background: #f5f5f5; }

.checkout-step-body { padding: 20px; }

.checkout-data-row {
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}
.checkout-data-row:last-child { border-bottom: none; }

.checkout-data-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.checkout-data-value {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
}

.checkout-edit-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.checkout-guest-notice {
  margin: 0 0 16px 0;
  padding: 12px 16px;
  background: #fff8f9;
  border: 1px solid #cb354e;
  border-radius: var(--radius);
  color: #cb354e;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

.checkout-step-save {
  align-self: flex-start;
  padding: 10px 20px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}
.checkout-step-save:hover { background: var(--primary-dark); }

.checkout-empty-text {
  color: var(--text-light);
  text-align: center;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.checkout-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  margin: 0 auto;
  transition: background var(--transition);
}
.checkout-add-btn:hover { background: var(--primary-dark); }

.checkout-address-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  background: #fff;
  border: 1px solid #cb354e;
  border-radius: var(--radius);
}

.checkout-address-card-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.checkout-address-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #e8f5e9;
  color: #2e7d32;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  width: fit-content;
  margin-bottom: 4px;
}

.checkout-address-main {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.checkout-address-extra {
  font-size: 0.82rem;
  color: var(--text-light);
  margin: 0;
}

.checkout-address-city {
  font-size: 0.82rem;
  color: var(--text-light);
  margin: 0;
}

.checkout-saved-address-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  margin-bottom: 8px;
}
.checkout-saved-address-item:hover {
  border-color: var(--primary);
  background: #fef2f2;
}

.checkout-saved-address-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.checkout-saved-address-arrow {
  color: var(--text-light);
  font-size: 0.8rem;
}

.checkout-payment-options {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.checkout-payment-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--transition);
  margin-bottom: -1px;
}
.checkout-payment-option:has(input:checked) {
  border-color: var(--primary);
  border-bottom-color: var(--primary);
  z-index: 1;
}
.checkout-payment-option input[type="radio"] { accent-color: var(--primary); }

.checkout-payment-label {
  font-weight: 600;
  font-size: 0.9rem;
  flex: 1;
}

.checkout-payment-icons {
  display: flex;
  gap: 6px;
}

.card-icon {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.card-icon.visa { background: #1a1f71; color: #fff; }
.card-icon.mc { background: #eb001b; color: #fff; }
.card-icon.amex { background: #006fcf; color: #fff; }

.checkout-card-form {
  padding: 16px;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: -1px;
}

.checkout-card-form .form-group input {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  width: 100%;
  transition: border-color var(--transition);
}
.checkout-card-form .form-group input:focus { border-color: var(--primary); }

.checkout-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-light);
  cursor: pointer;
}
.checkout-checkbox-row input[type="checkbox"] { accent-color: var(--primary); }

.checkout-transfer-info {
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  margin-bottom: -1px;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.6;
  background: #fafafa;
}

.checkout-transfer-info p {
  margin: 0 0 10px 0;
}
.checkout-transfer-info p:last-child {
  margin-bottom: 0;
}

.checkout-transfer-account {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 12px 0;
}

.transfer-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 4px 0 !important;
}

.transfer-bank {
  font-size: 0.88rem;
  color: var(--text-light);
  margin: 0 0 4px 0 !important;
}

.transfer-number {
  font-size: 0.88rem;
  color: var(--text);
  margin: 0 !important;
}

.transfer-number strong {
  font-size: 0.95rem;
}

.checkout-cash-info {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  margin-bottom: -1px;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.6;
  background: #fafafa;
}

.cash-info-icon {
  width: 36px;
  height: 36px;
  background: #fff3e0;
  color: #e65100;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.checkout-cash-info p {
  margin: 0;
}

.checkout-summary-wrapper {
}

.checkout-summary {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: sticky;
  top: 120px;
}

.checkout-summary h3 {
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--primary);
}

.checkout-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.checkout-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.checkout-item-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.checkout-item-details {
  flex: 1;
  min-width: 0;
}

.checkout-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

.checkout-item-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkout-item-unit-price {
  font-size: 0.8rem;
  color: var(--text-light);
}

.checkout-item-qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.checkout-item-qty button {
  width: 28px;
  height: 28px;
  background: #e8e8e8;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background var(--transition);
}
.checkout-item-qty button:hover { background: #d0d0d0; }

.checkout-item-qty span {
  width: 32px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  background: #fff;
}

.checkout-item-remove {
  color: var(--text-light);
  font-size: 0.8rem;
  padding: 4px;
}
.checkout-item-remove:hover { color: #e74c3c; }

.checkout-item-total {
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

.checkout-summary-totals {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
}

.summary-total {
  font-size: 1.1rem;
  font-weight: 800;
  padding-top: 8px;
}

.summary-total span:last-child {
  font-size: 1.3rem;
}

.checkout-secure {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #e8f5e9;
  padding: 12px;
  border-radius: var(--radius);
  font-size: 0.75rem;
  color: #2e7d32;
  line-height: 1.4;
}

.checkout-secure i {
  margin-top: 2px;
  flex-shrink: 0;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 24px;
  padding: 20px 0;
}
.categories-grid .category-card {
  flex-shrink: unset;
  width: auto;
}
.categories-grid .category-img-wrapper {
  width: 120px;
  height: 120px;
}

.checkout-submit-btn {
  width: 100%;
  margin-top: 20px;
  padding: 16px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition);
}
.checkout-submit-btn:hover {
  background: var(--primary-dark);
}

/* ========== EMPTY / LOADING / ERROR STATES ========== */
.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-light);
  text-align: center;
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-state h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--text);
}

.state-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  color: var(--text-light);
  text-align: center;
  gap: 16px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error-icon {
  font-size: 3rem;
  color: #e74c3c;
}

.retry-btn {
  padding: 10px 24px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.retry-btn:hover {
  background: var(--primary-dark);
}

/* ========== FOOTER ========== */
.footer {
  background: #1a1a1a;
  color: #ccc;
  margin-top: 60px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 50px 20px 30px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}

.footer-desc {
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-col h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 16px;
}

.footer-col ul li {
  margin-bottom: 10px;
  font-size: 0.85rem;
}

.footer-col ul li a {
  transition: color var(--transition);
}

.footer-col ul li a:hover {
  color: var(--primary);
}

.footer-col ul li i {
  margin-right: 8px;
  color: var(--primary);
  width: 16px;
}

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

.social-icons a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  transition: background var(--transition);
}

.social-icons a:hover {
  background: var(--primary);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px;
  text-align: center;
  font-size: 0.8rem;
}

/* ========== RESPONSIVE: TABLET ========== */
@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .banner-title {
    font-size: 2.5rem;
  }

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

  .benefits-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }

  .benefit-item {
    flex-direction: column;
    align-items: center;
  }

  .detail-main {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .detail-main-img-wrapper img {
    height: 400px;
  }

  .detail-inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .checkout-inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========== RESPONSIVE: MOBILE ========== */
@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    height: 60px;
    padding: 10px 10px 10px 5px;
  }

  .header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
  }

  .mobile-menu-btn {
    display: block;
  }

  .search-bar {
    display: none;
  }

  .search-mobile-btn {
    display: flex;
  }

  .login-btn {
    display: none;
  }

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

  .navbar {
    display: none;
  }

  .product-buy-btn {
    opacity: 1;
    width: 100%;
    position: relative;
    bottom: auto;
    left: auto;
    border-radius: 6px;
    justify-content: center;
    margin-top: 0px;
    padding-left: 0px;
  }

  .product-info {
    height: auto;
  }

  .product-card:hover .product-info-content {
    transform: none;
  }

  .wishlist-icon {
    width: 22px;
    height: 22px;
    padding-top: 2px;
    top: 6px;
    right: 6px;
  }

  .wishlist-icon i {
    font-size: 12px;
  }

  .discount-badge {
    width: 41px;
    height: 23px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  .banner {
    height: 200px;
  }

  .banner-slide {
    background-position: calc(50% - 150px) center;
  }

  .banner-arrow {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }

  .banner-prev {
    left: 10px;
  }

  .banner-next {
    right: 10px;
  }

  .banner-title {
    font-size: 1.8rem;
    width: 180px;
  }

  .banner-subtitle {
    font-size: 1rem;
  }

  .banner-btn {
    width: 80px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .split-banners-inner {
    grid-template-columns: 1fr;
  }

  .split-banner-item {
    height: 250px;
  }

  .split-banner-content h2 {
    font-size: 1.4rem;
  }

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

  .product-img-wrapper {
    height: 280px;
  }

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

  .social-icons {
    justify-content: center;
  }

  .benefits-inner {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding-bottom: 8px;
  }

  .benefits-inner::-webkit-scrollbar {
    height: 6px;
  }

  .benefits-inner::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
  }

  .benefits-inner::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
  }

  .benefit-item {
    flex: 0 0 80%;
    scroll-snap-align: start;
    text-align: left;
    flex-direction: row;
    align-items: flex-start;
  }

  .benefits-section {
    padding: 20px 0px 2px 0px;
  }

  .category-card {
    width: 110px;
  }

  .category-img-wrapper {
    width: 95px;
    height: 95px;
  }

  .category-name {
    font-size: 0.75rem;
  }

  .carousel-btn {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }

  .carousel-prev {
    margin-right: 4px;
  }

  .carousel-next {
    margin-left: 4px;
  }

  .carousel-btn {
    display: none;
  }

  .categories-section {
    padding: 0;
  }

  .categories-section .section-title {
    padding-left: 20px;
    margin-bottom: 15px;
  }

  .categories-wrapper {
    padding: 0 8px;
  }

  .detail-gallery {
    flex-direction: column-reverse;
    position: static;
  }

  .detail-thumbnails {
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .detail-thumb {
    width: 60px;
    height: 60px;
  }

  .detail-main-img-wrapper {
    height: 450px;
  }

  .detail-main-img-wrapper img {
    height: 400px;
  }

  .gallery-arrow {
    display: none;
  }

  .mobile-img-arrow {
    display: flex;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
  }

  .mobile-img-arrow:hover {
    background: rgba(0,0,0,0.8);
  }

  .mobile-img-prev { left: 10px; }
  .mobile-img-next { right: 10px; }

  .form-row {
    grid-template-columns: 1fr;
  }

  .catalog-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .filter-dropdown-menu {
    right: auto;
    left: 0;
  }

  .detail-links {
    flex-direction: column;
    gap: 8px;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .logo-text {
    font-size: 1.3rem;
  }

  .banner {
    height: 320px;
  }

  .banner-title {
    font-size: 1.5rem;
  }

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

  .product-img-wrapper {
    height: 220px;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .detail-name {
    font-size: 1.2rem;
  }

  .detail-main-img-wrapper img {
    height: 400px;
  }

  .detail-buy-btn {
    max-width: 100%;
  }

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

  .checkout-summary-wrapper {
    display: block;
  }

  .checkout-submit-btn {
    margin-top: 0;
    border-radius: 0 0 var(--radius) var(--radius);
  }

  .checkout-summary {
    position: static;
  }

  .cart-panel-footer {
    padding-bottom: 55px;
  }
}
.categories-accordion {
  display: flex;
  flex-direction: column;
  position: fixed;
  bottom: 55px;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #eee;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  z-index: 999;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
  visibility: hidden;
}

.categories-accordion.open {
  max-height: 400px;
  overflow-y: auto;
  visibility: visible;
}

.categories-accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: #cb354e;
  color: #fff;
  font-weight: 600;
  position: sticky;
  top: 0;
}

.categories-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
}

.categories-accordion-list {
  display: flex;
  flex-direction: column;
}

.categories-accordion-item {
  padding: 14px 15px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  font-size: 0.95rem;
  color: #333;
  transition: background 0.2s;
}

.categories-accordion-item:hover,
.categories-accordion-item.active {
  background: #f5f5f5;
  color: #cb354e;
  font-weight: 600;
}

/* ========== AUTH PAGES ========== */
.auth-container {
  max-width: 450px;
  margin: 40px auto;
  padding: 0 20px;
}

.auth-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.1);
  padding: 30px;
}

.auth-card h2 {
  text-align: center;
  margin-bottom: 24px;
  color: #333;
}

.auth-form {
  display: flex;
  flex-direction: column;
}

.auth-input-group {
  margin-bottom: 18px;
}

.auth-input-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.auth-input-group input {
  width: 100%;
  padding: 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.auth-input-group input:focus {
  outline: none;
  border-color: #cb354e;
}

.auth-submit-btn {
  width: 100%;
  padding: 14px;
  background: #cb354e;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 10px;
}

.auth-submit-btn:hover {
  background: #b02e42;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.auth-links a {
  color: #cb354e;
  font-size: 0.9rem;
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

/* ========== USER PANEL PAGE ========== */
.user-panel-container {
  display: flex;
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
  gap: 24px;
}

/* Sidebar */
.user-panel-sidebar {
  width: 260px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 10px rgba(0,0,0,0.08);
  height: fit-content;
  position: sticky;
  top: 100px;
}

.user-panel-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid #eee;
}

.user-panel-avatar {
  width: 50px;
  height: 50px;
  background: #1a3c6d;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-panel-avatar span {
  color: #fff;
  font-size: 1.3rem;
  font-weight: 600;
}

.user-panel-user-info {
  flex: 1;
}

.user-panel-user-info h3 {
  margin: 0;
  font-size: 1rem;
  color: #333;
}

.user-panel-user-info p {
  margin: 0;
  font-size: 0.85rem;
  color: #666;
}

.user-panel-user-info .verified {
  color: #1a73e8;
  font-weight: 600;
}

.user-panel-panel-btn {
  background: none;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #333;
}

.user-panel-panel-btn i {
  font-size: 1rem;
  color: #cb354e;
}

.user-panel-nav {
  padding: 10px 0;
}

.user-panel-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  color: #333;
  text-decoration: none;
  transition: all 0.2s;
  font-size: 0.95rem;
}

.user-panel-nav-item:hover {
  background: #f5f5f5;
  color: #cb354e;
}

.user-panel-nav-item.active {
  background: #f0f0f0;
  color: #cb354e;
  font-weight: 600;
}

.user-panel-nav-item i {
  width: 20px;
  text-align: center;
}

.user-panel-nav-item.logout {
  color: #cb354e;
  border-top: 1px solid #eee;
  margin-top: 10px;
  padding-top: 20px;
}

/* Main Content */
.user-panel-main {
  flex: 1;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 10px rgba(0,0,0,0.08);
  padding: 30px;
}

.user-panel-main h2 {
  margin: 0 0 24px 0;
  color: #333;
  font-size: 1.5rem;
}

.user-panel-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.user-panel-stat-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 24px 16px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.user-panel-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-icon {
  width: 40px;
  height: 40px;
  background: #e8f4fd;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.stat-icon i {
  font-size: 1rem;
  color: #1a73e8;
}

.stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: #666;
  margin-top: 4px;
}

.user-panel-info-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
}

.user-panel-info-card h3 {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  color: #333;
}

.user-panel-info-card p {
  margin: 0;
  color: #666;
}

.user-panel-form {
  max-width: 500px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: #cb354e;
}

.save-btn {
  padding: 12px 24px;
  background: #cb354e;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.save-btn:hover {
  background: #b02e42;
}

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

.empty-state i {
  font-size: 3rem;
  margin-bottom: 15px;
  color: #ddd;
}

.empty-state p {
  margin: 0;
  font-size: 1rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .user-panel-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .user-panel-container {
    flex-direction: column;
    padding: 0 10px 100px 10px;
  }

  .user-panel-sidebar {
    width: 100%;
    position: static;
    border-radius: 12px;
  }

  .user-panel-user {
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .user-panel-user-info {
    flex: 1;
  }

  .user-panel-panel-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 10px;
    font-size: 0.75rem;
    background: none;
    border: none;
    color: #333;
    cursor: pointer;
  }

  .user-panel-panel-btn i {
    font-size: 1.1rem;
    color: #cb354e;
  }

  .user-panel-nav {
    display: flex;
    justify-content: space-between;
    padding: 15px 10px;
    border-top: 1px solid #eee;
  }

  .user-panel-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    font-size: 0.7rem;
    border: none;
    background: none;
    color: #333;
    text-decoration: none;
    min-width: 0;
  }

  .user-panel-nav-item i {
    font-size: 1.2rem;
    width: auto;
  }

  .user-panel-nav-item.active {
    background: none;
    color: #cb354e;
    font-weight: 600;
  }

  .user-panel-nav-item.logout {
    border-top: none;
    margin-top: 0;
    padding-top: 8px;
    color: #cb354e;
    background: none;
  }

  .panel-control-item {
    display: none;
  }

  .user-panel-main {
    padding: 20px;
  }

  .user-panel-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .user-panel-nav {
    justify-content: center;
  }

  .user-panel-nav-item {
    flex: 0 0 auto;
  }
}

/* ========== BOTTOM NAVIGATION ========== */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #eee;
  height: 55px;
  z-index: 1000;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: #333;
  font-size: 0.7rem;
  cursor: pointer;
  padding: 5px 10px;
  min-width: 60px;
  transition: none;
}

.bottom-nav-item:active {
  transform: none;
}

.bottom-nav-item i {
  font-size: 1.3rem;
  color: #333;
}

.bottom-nav-item.active i,
.bottom-nav-item.active span {
  color: #cb354e;
}

.bottom-nav-item span {
  font-weight: 500;
}

.bottom-nav-home {
  position: relative;
  top: -15px;
}

.bottom-nav-home-icon {
  width: 52px;
  height: 52px;
  background: #cb354e;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-shadow: 0 4px 12px rgba(203, 53, 78, 0.4);
}

.bottom-nav-home-icon i {
  font-size: 1.1rem;
  color: #fff;
}

.bottom-nav-home-icon span {
  font-size: 0.55rem;
  color: #fff;
  font-weight: 600;
}

.bottom-cart-count {
  font-weight: 600;
}

/* ========== ADMIN PANEL ========== */
.admin-login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  padding: 20px;
}

.admin-login-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.admin-login-header i {
  font-size: 40px;
  color: var(--primary);
  margin-bottom: 15px;
}

.admin-login-header h2 {
  margin-bottom: 5px;
  font-size: 22px;
}

.admin-login-header p {
  color: #888;
  font-size: 14px;
  margin-bottom: 25px;
}

.admin-input-group {
  margin-bottom: 15px;
  text-align: left;
}

.admin-input-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  font-size: 14px;
}

.admin-input-group input {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

.admin-input-group input:focus {
  outline: none;
  border-color: var(--primary);
}

.admin-login-btn {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
}

.admin-login-btn:hover {
  background: #b32e42;
}

.admin-login-hint {
  margin-top: 15px;
  font-size: 12px;
  color: #999;
}

/* Admin Panel Layout */
.admin-top-header {
  height: 60px;
  background: #1a1a2e;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.admin-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0 10px 0 0;
  align-items: center;
}

.admin-header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
}
.admin-badge {
  background: var(--primary-color, #ff4757);
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}
.admin-header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.admin-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.admin-logout-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  transition: background 0.3s;
}
.admin-logout-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}
.admin-container {
  display: flex;
  min-height: 80vh;
}

.admin-sidebar {
  width: 240px;
  background: #1a1a2e;
  color: #fff;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}

.admin-sidebar-header {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-sidebar-header i {
  font-size: 20px;
}

.admin-sidebar-header span {
  font-weight: 600;
  font-size: 16px;
}

.admin-sidebar-nav {
  padding: 10px 0;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: #ccc;
  text-decoration: none;
  transition: all 0.3s;
  font-size: 14px;
}

.admin-nav-item:hover,
.admin-nav-item.active {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-left: 3px solid var(--primary);
}

.admin-nav-item.logout {
  margin-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.admin-main {
  flex: 1;
  padding: 30px;
  background: #f5f5f5;
}

.admin-section h2 {
  margin-bottom: 25px;
  font-size: 24px;
}

.admin-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.admin-add-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.admin-add-btn:hover {
  background: #b32e42;
}

/* Stats */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.admin-stat-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.admin-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.admin-stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
}

.admin-stat-icon.products { background: #3498db; }
.admin-stat-icon.orders { background: #f39c12; }
.admin-stat-icon.users { background: #2ecc71; }
.admin-stat-icon.revenue { background: var(--primary); }

.admin-stat-info h3 {
  font-size: 24px;
  margin-bottom: 2px;
}

.admin-stat-info p {
  color: #888;
  font-size: 13px;
}

.admin-recent {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.admin-recent h3 {
  margin-bottom: 15px;
}

.admin-empty-text {
  color: #999;
  text-align: center;
  padding: 30px;
}

/* Table */
.admin-table-container {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.admin-table th {
  background: #f8f9fa;
  padding: 12px 15px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: #555;
}

.admin-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table .product-img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  background: #f5f5f5;
  border-radius: 6px;
}

.admin-table .action-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  margin-right: 5px;
  color: #666;
}

.admin-table .action-btn:hover {
  color: var(--primary);
}

.admin-table .action-btn.delete:hover {
  color: #e74c3c;
}

.admin-table .status-badge,
.status-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.admin-table .status-badge.pending,
.status-badge.pending { background: #fff3cd; color: #856404; }

.admin-table .status-badge.confirmed,
.status-badge.confirmed { background: #cce5ff; color: #004085; }

.admin-table .status-badge.shipped,
.status-badge.shipped { background: #d4edda; color: #155724; }

.admin-table .status-badge.delivered,
.status-badge.delivered { background: #d1ecf1; color: #0c5460; }

.admin-table .status-badge.cancelled,
.status-badge.cancelled { background: #f8d7da; color: #721c24; }

/* Admin Modal */
.admin-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.admin-modal-content {
  background: #fff;
  border-radius: 10px;
  width: 100%;
  max-width: 450px;
  max-height: 90vh;
  overflow-y: auto;
}

.admin-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #eee;
}

.admin-modal-header h3 {
  margin: 0;
  font-size: 18px;
}

.admin-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
}

.admin-modal-close:hover {
  color: #333;
}

.admin-modal-body {
  padding: 20px;
}

.admin-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 15px 20px;
  border-top: 1px solid #eee;
}

.admin-modal-cancel {
  background: #f5f5f5;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.admin-modal-save {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.admin-modal-save:hover {
  background: #b32e42;
}

/* Image Upload */
.admin-image-upload {
  width: 100%;
  height: 150px;
  border: 2px dashed #ddd;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.3s;
}

.admin-image-upload:hover {
  border-color: var(--primary);
}

.admin-image-upload img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#categoryImagePlaceholder {
  text-align: center;
  color: #999;
}

#categoryImagePlaceholder i {
  font-size: 40px;
  margin-bottom: 10px;
  display: block;
}

/* Product Modal */
.admin-modal-lg {
  max-width: 600px;
}

.admin-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}

.admin-form-row .admin-input-group {
  margin-bottom: 0;
}

.admin-modal-body textarea {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  resize: vertical;
  font-family: inherit;
}

.admin-modal-body textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.admin-modal-body select {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
}

.admin-modal-body select:focus {
  outline: none;
  border-color: var(--primary);
}

#productImagePlaceholder {
  text-align: center;
  color: #999;
}

#productImagePlaceholder i {
  font-size: 40px;
  margin-bottom: 10px;
  display: block;
}

/* Admin Images Grid */
.admin-images-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.admin-image-slot {
  width: 100%;
  aspect-ratio: 1;
  border: 2px dashed #ddd;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.3s;
}

.admin-image-slot:hover {
  border-color: var(--primary);
}

.admin-image-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.admin-image-slot .admin-image-placeholder {
  text-align: center;
  color: #999;
}

.admin-image-slot .admin-image-placeholder i {
  font-size: 24px;
  display: block;
}

.admin-image-slot .admin-image-placeholder span {
  font-size: 12px;
}

.admin-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 998;
}

.admin-sidebar-overlay.open {
  display: block;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  #adminView {
    width: 100%;
  }

  .admin-menu-toggle {
    display: flex;
  }

  .admin-container {
    flex-direction: column;
    width: 100%;
  }

  .admin-sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    top: 60px;
    left: -260px;
    z-index: 999;
    transition: left 0.3s ease;
  }

  .admin-sidebar.open {
    left: 0;
  }

  .admin-sidebar-nav {
    flex-direction: column;
    overflow-x: visible;
    padding: 0;
  }

  .admin-nav-item {
    padding: 15px 20px;
    white-space: nowrap;
    border-left: none;
    border-bottom: 3px solid transparent;
  }

  .admin-nav-item.active {
    border-bottom: 3px solid var(--primary);
    border-left: none;
  }

  .admin-nav-item.logout {
    margin-top: 0;
    border-top: none;
  }

  .admin-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-main {
    padding: 20px 15px;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .admin-login-card {
    padding: 30px 20px;
  }

  .admin-stats {
    grid-template-columns: 1fr;
  }

  .admin-section-header {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .admin-add-btn {
    width: 100%;
    justify-content: center;
  }

  .admin-images-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .admin-form-row {
    grid-template-columns: 1fr;
  }

  .order-detail-grid {
    grid-template-columns: 1fr;
  }

  .admin-table th,
  .admin-table td {
    padding: 8px 10px;
    font-size: 12px;
  }

  .admin-table .product-img {
    width: 35px;
    height: 35px;
  }

  .order-detail-products-table th,
  .order-detail-products-table td {
    padding: 8px 6px;
    font-size: 12px;
  }

  .admin-header-right .admin-user-info span {
    display: none;
  }
}

@media (max-width: 480px) {
  .admin-images-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-table th,
  .admin-table td {
    padding: 6px 6px;
    font-size: 11px;
  }

  .admin-table .action-btn {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }

  .admin-modal-content {
    padding: 0 10px;
  }

  .admin-modal-body {
    padding: 15px;
  }

  .admin-top-header {
    padding: 0 10px;
  }

  .admin-header-right {
    gap: 10px;
  }

  .admin-logout-btn {
    padding: 4px 8px;
    font-size: 11px;
  }
}

@media (max-width: 1024px) {
  .bottom-nav {
    display: flex;
  }

  body {
    padding-top: 60px;
    padding-bottom: 70px;
  }

  #userPanelView {
    padding-bottom: 20px;
  }
}

/* ========== USER DETAIL MODAL ========== */
.admin-user-detail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.admin-user-detail-avatar {
  font-size: 64px;
  color: #cb354e;
}

.admin-user-detail-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-user-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
  background: #f8f8f8;
  border-radius: 8px;
}

.admin-user-detail-row label {
  font-weight: 600;
  color: #333;
}

.admin-user-detail-row span {
  color: #555;
}

/* ========== ADDRESS FORM ========== */
.address-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.address-modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

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

.address-modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}

.address-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #999;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color var(--transition);
}
.address-modal-close:hover { color: #333; }

.address-modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.address-modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

.address-type-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 4px;
}

.address-type-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.address-type-btn:hover { border-color: #999; }
.address-type-btn.active {
  border-color: var(--primary);
  background: #fef2f2;
  color: var(--primary);
}

.required { color: var(--primary); }
.optional { color: var(--text-light); font-weight: 400; font-size: 0.8rem; }

.address-btn-cancel {
  padding: 10px 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}
.address-btn-cancel:hover { background: #f5f5f5; }

.address-btn-save {
  padding: 10px 24px;
  background: #3b4cc0;
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}
.address-btn-save:hover { background: #2e3da8; }

/* User panel addresses list */
.user-panel-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.user-panel-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}
.user-panel-add-btn:hover { background: var(--primary-dark); }

.user-address-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.user-address-card-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.user-address-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #e8f5e9;
  color: #2e7d32;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  width: fit-content;
  margin-bottom: 4px;
}

.user-address-main {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.user-address-extra {
  font-size: 0.82rem;
  color: var(--text-light);
  margin: 0;
}

.user-address-city {
  font-size: 0.82rem;
  color: var(--text-light);
  margin: 0;
}

.user-address-actions {
  display: flex;
  gap: 8px;
}

.user-address-edit-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.user-address-edit-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.user-address-delete-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--radius);
  background: #fee2e2;
  color: #dc2626;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.user-address-delete-btn:hover {
  background: #fecaca;
}

/* ========== USER ORDER CARDS ========== */
.user-orders-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 16px 0;
}
.user-orders-count {
  font-weight: 400;
  color: var(--text-light);
  font-size: 1rem;
}
.user-order-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 12px;
  transition: all var(--transition);
}
.user-order-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.user-order-top-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}
.user-order-id {
  font-weight: 700;
  font-size: 0.95rem;
}
.user-order-date {
  font-size: 0.85rem;
  color: var(--text-light);
  flex: 1;
  text-align: center;
}
.user-order-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}
.user-order-middle-row {
  margin-bottom: 10px;
}
.user-order-product-line {
  font-size: 0.88rem;
  color: var(--text-light);
}
.user-order-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.user-order-total {
  font-weight: 700;
  font-size: 1.05rem;
}
.user-order-view-btn {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
}
.user-order-view-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.user-order-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.user-order-detail-header h3 {
  margin: 0;
}
.user-order-detail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.user-order-detail-item img {
  width: 50px;
  height: 50px;
  border-radius: var(--radius);
  object-fit: cover;
}
.user-order-detail-item-img-placeholder {
  width: 50px;
  height: 50px;
  border-radius: var(--radius);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
}

/* ========== ORDER DETAIL MODAL ========== */
.order-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.order-detail-section h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.order-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.85rem;
}

.order-detail-row label {
  font-weight: 600;
  color: var(--text);
}

.order-detail-row span {
  color: var(--text-light);
}

.order-detail-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.order-detail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #f8f8f8;
  border-radius: var(--radius);
}

.order-detail-item-name {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 500;
}

.order-detail-item-qty {
  font-size: 0.82rem;
  color: var(--text-light);
}

.order-detail-item-price {
  font-size: 0.88rem;
  font-weight: 600;
}

.order-detail-total {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 1rem;
  font-weight: 700;
}

/* Order status select */
.order-status-select {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  appearance: auto;
}

.status-Pendiente {
  background: #fff8e1 !important;
  color: #f57f17 !important;
  border-color: #f57f17 !important;
}

.status-Enviado {
  background: #e3f2fd !important;
  color: #1565c0 !important;
  border-color: #1565c0 !important;
}

.status-Completado {
  background: #e8f5e9 !important;
  color: #2e7d32 !important;
  border-color: #2e7d32 !important;
}

.status-Cancelado {
  background: #ffebee !important;
  color: #c62828 !important;
  border-color: #c62828 !important;
}

#adminOrdersTable .order-status-select {
  padding: 4px 10px;
  font-size: 0.75rem;
}

/* Order detail modal status */
#orderDetailStatus {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

/* Ver button */
.order-view-btn {
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}
.order-view-btn:hover { background: #f5f5f5; }

/* Order detail modal */
.order-detail-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.order-detail-action-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  transition: background var(--transition);
}
.order-detail-action-btn:hover { background: #f5f5f5; }

.order-detail-top {
  display: flex;
  gap: 40px;
  margin-bottom: 20px;
}

.order-detail-top-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.order-detail-top-item label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.order-detail-top-item span,
.order-detail-top-item select {
  display: block;
}

.order-detail-top-item span {
  font-size: 0.9rem;
  font-weight: 500;
}

.order-detail-section-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.order-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
  margin-bottom: 20px;
}

.order-detail-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 2px;
}

.order-detail-field span {
  font-size: 0.88rem;
}

.order-detail-address-box {
  background: #fff;
  border: 1px solid #e0e0e0;
  padding: 20px 24px;
  border-radius: 12px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}



.order-detail-products-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}

.order-detail-products-table th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.order-detail-products-table td {
  padding: 10px 12px;
  font-size: 0.88rem;
  border-bottom: 1px solid #f0f0f0;
}

.order-detail-product-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.order-detail-product-img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
}

/* ========== COMPARE MODAL (in-page) ========== */
.compare-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.compare-modal-box {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  padding: 24px;
}

.compare-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.compare-modal-head h2 {
  margin: 0;
  font-size: 1.4rem;
  color: var(--primary);
}

.compare-modal-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: #555;
}

.compare-modal-body {
  padding: 4px 0;
  overflow-x: auto;
}

.compare-modal-close-btn {
  display: block;
  margin: 22px auto 0;
  padding: 10px 28px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  table-layout: fixed;
  min-width: 520px;
}

.compare-table th.row-label {
  text-align: left;
  background: #f8f8f8;
  font-weight: 700;
  color: #333;
  padding: 14px 16px;
  width: 130px;
  border: 1px solid #eee;
  vertical-align: top;
}

.compare-table td.cmp-cell {
  text-align: center;
  padding: 14px 16px;
  border: 1px solid #eee;
  vertical-align: top;
  width: 22%;
}

.compare-table img {
  display: block;
  margin: 0 auto;
  width: 120px;
  height: 140px;
  object-fit: contain;
  border-radius: 8px;
  background: #f8f8f8;
}

.cmp-orig {
  color: #999;
  text-decoration: line-through;
  font-size: 0.85rem;
  font-weight: 400;
  margin-left: 8px;
}

.cmp-disc {
  color: var(--primary);
  font-size: 0.8rem;
  margin-left: 8px;
}

.cmp-cell .cmp-cart {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
}

.cmp-cell .cmp-del {
  display: block;
  width: 100%;
  background: #eee;
  color: #333;
  border: none;
  border-radius: 8px;
  padding: 9px;
  cursor: pointer;
  font-size: 0.85rem;
}

.category-back {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

.category-back:hover {
  text-decoration: underline;
}
