/* ==========================================================================
   TMV IN3D - DESIGN SYSTEM & STYLES (LIGHT MODE: TONE TRẮNG & VÀNG AMBER)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Color Palette - White & Gold/Amber Modern Elegance */
  --bg-main: #ffffff;
  --bg-surface: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  
  --accent-gold-dark: #d97706;  /* Deep Gold/Amber */
  --accent-gold-bright: #f59e0b; /* Bright Amber Gold */
  --accent-gold-light: #fef3c7;  /* Soft Warm Gold Tint */
  --accent-gold-hover: #b45309;
  --accent-green: #10b981;
  
  --border-color: #e2e8f0;
  --border-gold: #fde68a;
  
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(217, 119, 6, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.08);
  --shadow-gold: 0 8px 24px rgba(245, 158, 11, 0.25);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-surface);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

input, select, textarea {
  font-family: inherit;
}

/* Utility Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Gradient Text Effect */
.gradient-text-gold {
  background: linear-gradient(135deg, var(--accent-gold-dark), var(--accent-gold-bright));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-normal);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--accent-gold-bright), var(--accent-gold-dark));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.2rem;
  box-shadow: var(--shadow-gold);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-gold-dark);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-icon {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  font-size: 1.1rem;
  transition: var(--transition-fast);
}

.btn-icon:hover {
  background-color: var(--accent-gold-light);
  border-color: var(--border-gold);
  color: var(--accent-gold-dark);
}

.badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: linear-gradient(135deg, var(--accent-gold-dark), var(--accent-gold-bright));
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.4);
}

.btn-admin {
  background: var(--accent-gold-light);
  color: var(--accent-gold-dark);
  border: 1px solid var(--border-gold);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
}

.btn-admin:hover {
  background: var(--accent-gold-dark);
  color: #ffffff;
}

.btn-customer-login {
  background: #ffffff;
  color: var(--accent-gold-dark);
  border: 1.5px solid var(--accent-gold-bright);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
}

.btn-customer-login:hover {
  background: var(--accent-gold-light);
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
}

.user-profile-badge:hover {
  border-color: var(--accent-gold-dark);
  background: var(--accent-gold-light);
}

.user-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-gold-dark);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  padding: 3.5rem 0 2.5rem;
  background: radial-gradient(circle at 80% 20%, var(--accent-gold-light) 0%, transparent 40%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background-color: #ffffff;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-gold-dark);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.2rem;
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -1px;
  margin-bottom: 1.2rem;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.hero-features {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.feature-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  background: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.hero-card-featured {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  transition: var(--transition-normal);
}

.hero-card-featured:hover {
  transform: translateY(-4px);
  border-color: var(--border-gold);
}

.hero-img-box {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 380px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: #0f172a;
  position: relative;
}

.hero-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom center;
}

.hero-badge-float {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  backdrop-filter: blur(8px);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
}

.hero-card-info {
  margin-top: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hero-card-title {
  font-weight: 800;
  font-size: 1.2rem;
}

.hero-card-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent-gold-dark);
}

/* ==========================================================================
   CATALOG & PRODUCT CARDS
   ========================================================================== */
.catalog-controls {
  margin-bottom: 2rem;
}

.search-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 280px;
}

.search-input-wrapper i {
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}

.search-input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 3rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.search-input:focus {
  border-color: var(--accent-gold-bright);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.category-chips {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.chip {
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.88rem;
  transition: var(--transition-fast);
  cursor: pointer;
}

.chip:hover {
  border-color: var(--accent-gold-bright);
  color: var(--accent-gold-dark);
}

.chip.active {
  background: var(--accent-gold-dark);
  color: #ffffff;
  border-color: var(--accent-gold-dark);
  box-shadow: var(--shadow-sm);
}

/* Products Grid Layout */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.product-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-gold);
}

.product-img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 380px;
  background-color: #0f172a;
  overflow: hidden;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom center; /* Căn 2/3 ảnh từ dưới lên */
  transition: transform 0.5s ease;
}

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

.category-tag {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-gold-dark);
  backdrop-filter: blur(8px);
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid var(--border-gold);
}

.product-body {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text-main);
  line-height: 1.35;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.7rem;
}

.product-desc-short {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-specs-mini {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  margin-top: auto;
}

.spec-badge {
  font-size: 0.75rem;
  font-weight: 600;
  background-color: var(--bg-surface);
  color: var(--text-muted);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border-color);
  margin-top: 0.4rem;
}

.price-box {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.price-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1;
}

.price-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent-gold-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold-dark), var(--accent-gold-bright));
  color: #ffffff;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-fast);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.2);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-gold-hover), var(--accent-gold-dark));
  box-shadow: 0 6px 16px rgba(217, 119, 6, 0.35);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-fast);
}

.btn-secondary:hover {
  background: var(--bg-surface);
  border-color: var(--text-muted);
}

/* ==========================================================================
   PRODUCT DETAIL PAGE VIEW (OBJECT-POSITION: BOTTOM CENTER KHỔ DỌC 2/3 TỪ DƯỚI LÊN)
   ========================================================================== */
.product-page-container {
  padding: 2.5rem 0 4rem;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

.gallery-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.main-gallery-view {
  position: relative;
  width: 100%;
  max-height: 520px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: #0f172a;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  cursor: zoom-in;
}

/* HIỂN THỊ 2/3 ẢNH TỪ DƯỚI LÊN ĐỂ KHÔNG BỊ MẤT CHI TIẾT MÔ HÌNH BÊN DƯỚI */
.main-gallery-view img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom center;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.main-gallery-view:hover img {
  transform: scale(1.02);
}

.zoom-hint-badge {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  backdrop-filter: blur(6px);
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.thumbs-list {
  display: flex;
  gap: 0.8rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
}

.thumb-item {
  width: 68px;
  height: 90px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition-fast);
  flex-shrink: 0;
  background: #0f172a;
}

.thumb-item.active, .thumb-item:hover {
  border-color: var(--accent-gold-dark);
  box-shadow: 0 0 0 2px var(--accent-gold-bright);
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom center;
}

.product-info-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.detail-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.25;
}

/* BẢNG GIÁ THANH TOÁN SẠCH GỌN */
.detail-price-wrapper {
  background-color: var(--accent-gold-light);
  border: 1px solid var(--border-gold);
  padding: 1.2rem 1.5rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.calculated-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-gold-dark);
}

/* Options Pickers */
.option-group-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
}

.selected-option-value {
  color: var(--accent-gold-dark);
  font-weight: 700;
}

.color-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.color-option-btn {
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition-fast);
  cursor: pointer;
}

.color-swatch-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.15);
  flex-shrink: 0;
}

.color-option-btn:hover {
  border-color: var(--accent-gold-bright);
}

.color-option-btn.active {
  border-color: var(--accent-gold-dark);
  background: var(--accent-gold-light);
  color: var(--accent-gold-dark);
}

.size-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
}

.size-option-btn {
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition-fast);
  cursor: pointer;
}

.size-scale {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.size-option-btn:hover {
  border-color: var(--accent-gold-bright);
}

.size-option-btn.active {
  border-color: var(--accent-gold-dark);
  background: var(--accent-gold-light);
  color: var(--accent-gold-dark);
}

/* Quantity Stepper */
.qty-stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #ffffff;
  width: fit-content;
}

.qty-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  color: var(--text-main);
  transition: var(--transition-fast);
}

.qty-btn:hover {
  background: var(--border-color);
}

.qty-number {
  width: 44px;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
}

/* ==========================================================================
   FULLSCREEN IMAGE LIGHTBOX MODAL (XEM FULL MÀN HÌNH)
   ========================================================================== */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  z-index: 3010;
}

.lightbox-close-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.1);
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  z-index: 3010;
}

.lightbox-nav-btn:hover {
  background: var(--accent-gold-dark);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-nav-btn.prev {
  left: 1.5rem;
}

.lightbox-nav-btn.next {
  right: 1.5rem;
}

.lightbox-content {
  max-width: 92vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.lightbox-caption {
  margin-top: 1.2rem;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.15);
  padding: 0.4rem 1.2rem;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   CENTERED CHECKOUT MODAL
   ========================================================================== */
.cart-drawer {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-normal);
  padding: 1.5rem;
}

.cart-drawer.active {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer-box {
  background: #ffffff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  position: relative;
  animation: modalCenterIn 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalCenterIn {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.cart-header {
  padding: 1.2rem 1.8rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
}

.cart-title {
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.cart-items-list {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 280px;
}

.cart-item {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding-bottom: 0.8rem;
  border-bottom: 1px dashed var(--border-color);
}

.cart-item-img {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-surface);
}

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

.cart-item-title {
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.3;
}

.cart-item-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.cart-item-price {
  font-weight: 800;
  color: var(--accent-gold-dark);
  font-size: 0.95rem;
}

.cart-item-remove {
  color: var(--text-dim);
  transition: var(--transition-fast);
  padding: 0.4rem;
}

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

.cart-footer {
  padding: 1.5rem 1.8rem;
  border-top: 1px solid var(--border-color);
  background: #ffffff;
  overflow-y: auto;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

/* Modals Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: #ffffff;
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.modal-close:hover {
  background: var(--border-color);
  color: var(--text-main);
}

/* ==========================================================================
   ADMIN CMS DASHBOARD
   ========================================================================== */
.admin-modal-container {
  max-width: 960px;
}

.admin-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  padding: 0 2rem;
  background: var(--bg-surface);
  gap: 1rem;
}

.admin-tab-btn {
  padding: 1rem 1.2rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-tab-btn:hover {
  color: var(--accent-gold-dark);
}

.admin-tab-btn.active {
  color: var(--accent-gold-dark);
  border-bottom-color: var(--accent-gold-dark);
  background: #ffffff;
}

.admin-tab-content {
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-fast);
}

.form-control:focus {
  border-color: var(--accent-gold-bright);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

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

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.admin-table th, .admin-table td {
  padding: 0.9rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.admin-table th {
  background: var(--bg-surface);
  font-weight: 700;
  color: var(--text-muted);
}

.admin-img-thumb {
  width: 42px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  object-position: bottom center;
}

.category-manage-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 0.6rem;
}

.admin-color-row-item, .admin-size-row-item {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* ==========================================================================
   ORDER HISTORY CARD & TOAST NOTIFICATION
   ========================================================================== */
.order-history-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.order-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-color);
}

.order-status-pill {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  background: #dcfce7;
  color: #15803d;
}

.toast-container {
  position: fixed;
  top: 90px;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  background: #ffffff;
  border: 1px solid var(--border-gold);
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 600;
  font-size: 0.9rem;
  pointer-events: auto;
  animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@media (max-width: 900px) {
  .hero-grid, .product-detail-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .gallery-section, .main-gallery-view {
    width: 100%;
    height: auto;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
}
