/* AstroVastu Science - Custom Design System & Stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-deep: #080711;
  --bg-dark: #0b0914;
  --bg-panel: rgba(18, 14, 38, 0.7);
  --bg-panel-solid: #120e26;
  --border-color: rgba(62, 50, 110, 0.4);
  --border-glow: rgba(147, 112, 219, 0.3);
  
  --primary-color: #9370db; /* Medium purple */
  --primary-glow: rgba(147, 112, 219, 0.5);
  --accent-gold: #f2c94c; /* Astrological gold */
  --accent-gold-rgb: 242, 201, 76;
  --text-primary: #f3eefd;
  --text-secondary: #a397c8;
  --text-muted: #6e6494;
  
  --success: #27ae60;
  --danger: #eb5757;
  --warning: #f2994a;
  --info: #2d9cdb;
  
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Cosmic Background Particles & Glows */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 10% 20%, rgba(147, 112, 219, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 70%, rgba(242, 201, 76, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(8, 7, 17, 0.5) 0%, #05040a 100%);
  z-index: -2;
  pointer-events: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: 0.5px;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition-smooth);
}

a:hover {
  color: var(--accent-gold);
}

ul {
  list-style: none;
}

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

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: transparent;
  border: none;
  outline: none;
}

/* Animations */
@keyframes cosmicGlow {
  0% { transform: scale(1) translate(0, 0); opacity: 0.3; }
  50% { transform: scale(1.1) translate(2%, -3%); opacity: 0.5; }
  100% { transform: scale(1) translate(0, 0); opacity: 0.3; }
}

@keyframes pulseGold {
  0% { box-shadow: 0 0 0 0 rgba(var(--accent-gold-rgb), 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(var(--accent-gold-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--accent-gold-rgb), 0); }
}

/* Header & Navigation */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 7, 17, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.logo-link span {
  color: var(--accent-gold);
  font-weight: 400;
}

.logo-icon {
  width: 32px;
  height: 32px;
  stroke: var(--accent-gold);
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  padding: 5px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gold);
  transition: var(--transition-smooth);
}

.nav-links a:hover, .nav-links a.active {
  color: var(--text-primary);
}

.nav-links a:hover::after, .nav-links a.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.action-btn {
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  position: relative;
  transition: var(--transition-smooth);
}

.action-btn:hover {
  color: var(--accent-gold);
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--accent-gold);
  color: var(--bg-deep);
  font-size: 0.7rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-bar-header {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 5px 12px;
  border-radius: 20px;
  max-width: 200px;
  transition: var(--transition-smooth);
}

.search-bar-header:focus-within {
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.08);
}

.search-bar-header input {
  font-size: 0.85rem;
  width: 100%;
  color: var(--text-primary);
}

.search-bar-header i {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-left: 8px;
}

/* Glassmorphism Panel */
.glass-panel {
  background: var(--bg-panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  border-color: var(--border-glow);
  box-shadow: 0 10px 40px 0 rgba(147, 112, 219, 0.15);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 6px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: center;
}

.btn-primary {
  background: var(--accent-gold);
  color: var(--bg-deep);
  border: 1px solid var(--accent-gold);
}

.btn-primary:hover {
  background: transparent;
  color: var(--accent-gold);
  box-shadow: 0 0 15px rgba(242, 201, 76, 0.3);
}

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-secondary);
}

.btn-outline {
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  background: transparent;
}

.btn-outline:hover {
  background: var(--accent-gold);
  color: var(--bg-deep);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 60px 15px;
}

.hero-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 40px;
  width: 100%;
}

.hero-content {
  z-index: 2;
}

.hero-content h1 {
  font-size: 3.5rem;
  line-height: 1.2;
  margin-bottom: 20px;
  font-weight: 800;
}

.hero-content h1 span {
  background: linear-gradient(135deg, var(--accent-gold) 0%, #ff8c00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 30px;
  max-width: 500px;
}

.hero-btns {
  display: flex;
  gap: 15px;
}

/* 3D Zodiac Canvas Container */
.hero-canvas-container {
  position: relative;
  width: 100%;
  height: 500px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#zodiac-canvas {
  width: 100%;
  height: 100%;
  cursor: grab;
}

#zodiac-canvas:active {
  cursor: grabbing;
}

/* Featured Products & Grids */
.section {
  padding: 80px 15px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
}

.section-header.section-header-center {
  display: block;
  text-align: center;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 700;
}

.section-title span {
  color: var(--accent-gold);
}

.section-subtitle {
  color: var(--text-secondary);
  margin-top: 5px;
}

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

/* Product Card */
.product-card {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary-color);
  box-shadow: 0 12px 30px rgba(147, 112, 219, 0.15);
}

.badge-tag {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(242, 201, 76, 0.15);
  color: var(--accent-gold);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(242, 201, 76, 0.3);
  z-index: 1;
}

.product-image-container {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  /*margin-bottom: 20px;*/
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  overflow: hidden;
  position: relative;
}

/* CSS simulated 3D assets to look like preview */
.product-image-fallback {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  position: relative;
  box-shadow: 0 0 30px rgba(147, 112, 219, 0.4);
}

.rudraksha-ball {
  background: radial-gradient(circle at 35% 35%, #bf8a63 0%, #5d3113 70%, #2b1202 100%);
  filter: drop-shadow(0 0 10px rgba(93, 49, 19, 0.5));
}

.bracelet-loop {
  border: 10px dashed var(--accent-gold);
  background: transparent;
  box-shadow: none;
}

.crystal-gem {
  width: 100px;
  height: 100px;
  clip-path: polygon(50% 0%, 90% 20%, 100% 60%, 75% 90%, 25% 90%, 0% 60%, 10% 20%);
  background: linear-gradient(135deg, #a78bfa 0%, #4c1d95 100%);
}

.product-card-title {
  font-size: 1.1rem;
  margin-bottom: 8px;
  font-family: var(--font-title);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--accent-gold);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.product-rating span {
  color: var(--text-secondary);
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.product-price {
  font-size: 1.25rem;
  font-weight: 700;
  font-family: var(--font-title);
}

.product-price del {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-left: 5px;
}

.btn-card-add {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-card-add:hover {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: var(--bg-deep);
}

/* Why Choose Us */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
  margin-top: 40px;
}

.feature-box {
  text-align: center;
  padding: 30px 20px;
}

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(147, 112, 219, 0.1);
  border: 1px solid var(--border-color);
  color: var(--accent-gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 15px;
  transition: var(--transition-smooth);
}

.custom-icon-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
}

.feature-icon .custom-icon-img,
.service-icon .custom-icon-img,
.stat-icon .custom-icon-img {
  width: 34px;
  height: 34px;
}

.inline-icon-img {
  flex: 0 0 auto;
}

.feature-box:hover .feature-icon {
  background: var(--accent-gold);
  color: var(--bg-deep);
  transform: rotate(360deg);
}

.feature-box h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.feature-box p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.home-services-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1100px) {
  .home-services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .home-services-grid {
    grid-template-columns: 1fr;
  }
}

/* Inquiry Banner Banner */
.inquiry-banner {
  background: linear-gradient(135deg, rgba(30, 20, 70, 0.8) 0%, rgba(10, 8, 20, 0.9) 100%);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 50px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 60px auto;
  max-width: 1200px;
  position: relative;
  overflow: hidden;
}

.inquiry-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(147, 112, 219, 0.2) 0%, transparent 70%);
  z-index: 1;
}

.inquiry-banner-content {
  z-index: 2;
  max-width: 60%;
}

.inquiry-banner-content h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.inquiry-banner-content p {
  color: var(--text-secondary);
}

.inquiry-banner .btn {
  z-index: 2;
}

/* Modals */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 4, 10, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  width: 100%;
  max-width: 500px;
  background: var(--bg-panel-solid);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

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

.modal-close {
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.modal-close:hover {
  color: var(--accent-gold);
}

.modal-body {
  padding: 20px;
}

/* Forms styling */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px 15px;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.form-control:focus {
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.08);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* Custom Select Dropdowns */
select.form-control, select.filter-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%23f2c94c" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9l6 6 6-6"/></svg>');
  background-repeat: no-repeat;
  background-position: right 15px center;
  padding-right: 40px;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.05); /* Match form-control */
}

select.filter-select {
  border-radius: 8px;
}

select option {
  background: var(--bg-panel-solid); /* Dark background for dropdown options */
  color: #ffffff;
  padding: 10px;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.checkbox-group input {
  accent-color: var(--accent-gold);
}

/* Slide-out Shopping Cart Sidebar */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 100%;
  max-width: 400px;
  height: 100%;
  background: var(--bg-panel-solid);
  border-left: 1px solid var(--border-color);
  z-index: 1000;
  transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 40px rgba(0,0,0,0.5);
}

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

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

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

.cart-item {
  display: flex;
  gap: 15px;
  padding-bottom: 15px;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.cart-item-img {
  width: 70px;
  height: 70px;
  border-radius: 6px;
  background: rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 6px;
}

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

.cart-item-info h4 {
  font-size: 0.95rem;
  margin-bottom: 5px;
}

.cart-item-price {
  color: var(--accent-gold);
  font-weight: 600;
}

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

.qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
}

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

.cart-item-remove {
  color: var(--text-muted);
  cursor: pointer;
  align-self: center;
}

.cart-item-remove:hover {
  color: var(--danger);
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  background: rgba(0,0,0,0.2);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.cart-summary-row.total {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-gold);
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 10px;
  margin-top: 10px;
}

.cart-checkout-btn {
  width: 100%;
  margin-top: 15px;
}

/* Products Filter Bar (products.php) */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  padding: 15px 25px;
  border-radius: 10px;
}

.filter-categories {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-tab:hover, .filter-tab.active {
  background: var(--accent-gold);
  color: var(--bg-deep);
  border-color: var(--accent-gold);
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.filter-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px 15px;
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
}

/* Product Detail Page */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-top: 30px;
}

.detail-gallery {
  position: relative;
}

.product-3d-wrapper {
  width: 100%;
  height: 450px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

#product-3d-canvas {
  width: 100%;
  height: 100%;
  cursor: grab;
}

.threed-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(147, 112, 219, 0.2);
  border: 1px solid var(--primary-color);
  color: var(--text-primary);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.threed-badge i {
  color: var(--accent-gold);
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-top: 15px;
}

.thumb-box {
  height: 80px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: rgba(0,0,0,0.2);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb-box.active, .thumb-box:hover {
  border-color: var(--accent-gold);
}

.detail-info h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  line-height: 1.2;
}

.detail-meta {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
}

.detail-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-gold);
  font-family: var(--font-title);
  margin-bottom: 20px;
}

.detail-price del {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-left: 10px;
}

.trust-badges-detail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 25px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 20px 0;
}

.trust-badge-item {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.trust-badge-item i {
  font-size: 1.25rem;
  color: var(--accent-gold);
  margin-bottom: 8px;
  display: block;
}

.detail-actions {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
}

.qty-selector {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 5px;
  background: rgba(255,255,255,0.03);
}

.qty-input {
  width: 40px;
  text-align: center;
  font-weight: 600;
}

/* Accordion Panel */
.accordion {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 30px;
}

.accordion-item {
  border-bottom: 1px solid var(--border-color);
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-header {
  padding: 15px 20px;
  background: rgba(255,255,255,0.02);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.accordion-header:hover {
  background: rgba(255,255,255,0.04);
}

.accordion-icon {
  transition: transform 0.3s;
}

.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  background: rgba(0,0,0,0.1);
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.accordion-item.active .accordion-content {
  padding: 20px;
  max-height: 1000px;
}

/* Checkout Page */
.checkout-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  margin-top: 30px;
}

.checkout-summary-box {
  background: var(--bg-panel-solid);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 30px;
}

.checkout-summary-items {
  margin-bottom: 20px;
  max-height: 300px;
  overflow-y: auto;
}

.checkout-summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.checkout-summary-item span {
  font-size: 0.9rem;
}

.checkout-summary-price {
  font-weight: 600;
}

.coupon-section {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.payment-options {
  margin-top: 25px;
}

.payment-radio {
  display: block;
  position: relative;
  padding: 15px 15px 15px 45px;
  margin-bottom: 12px;
  cursor: pointer;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  transition: var(--transition-smooth);
}

.payment-radio input {
  position: absolute;
  top: 18px;
  left: 15px;
}

.payment-radio:hover, .payment-radio.active {
  border-color: var(--primary-color);
  background: rgba(147, 112, 219, 0.05);
}

/* Profile / Dashboard */
.profile-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  margin-top: 30px;
}

.profile-sidebar {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 25px;
  height: fit-content;
}

.profile-user-card {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-gold) 100%);
  color: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 700;
  font-family: var(--font-title);
  margin: 0 auto 15px;
}

.profile-menu li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border-radius: 6px;
  color: var(--text-secondary);
  font-weight: 500;
}

.profile-menu li a:hover, .profile-menu li.active a {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}

.profile-menu li.active a {
  border-left: 3px solid var(--accent-gold);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-box {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
}

.stat-num {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent-gold);
  font-family: var(--font-title);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 5px;
}

/* Tables styling */
.table-container {
  overflow-x: auto;
  margin-top: 20px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

th {
  background: rgba(255,255,255,0.02);
  color: var(--text-secondary);
  font-weight: 600;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
}

td {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  color: var(--text-primary);
}

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

.status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge.success {
  background: rgba(39, 174, 96, 0.15);
  color: var(--success);
  border: 1px solid rgba(39, 174, 96, 0.3);
}

.status-badge.warning {
  background: rgba(242, 153, 74, 0.15);
  color: var(--warning);
  border: 1px solid rgba(242, 153, 74, 0.3);
}

.status-badge.danger {
  background: rgba(235, 87, 87, 0.15);
  color: var(--danger);
  border: 1px solid rgba(235, 87, 87, 0.3);
}

.status-badge.info {
  background: rgba(45, 156, 219, 0.15);
  color: var(--info);
  border: 1px solid rgba(45, 156, 219, 0.3);
}

/* Admin Dashboard Specific */
.admin-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  background: #06050b;
  border-right: 1px solid var(--border-color);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
}

.admin-main {
  background: #090812;
  padding: 40px;
  overflow-y: auto;
}

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

.admin-stats-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
  margin-bottom: 40px;
}

.admin-stat-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 25px;
  position: relative;
  overflow: hidden;
}

.admin-stat-card i {
  position: absolute;
  bottom: 20px;
  right: 20px;
  font-size: 2.5rem;
  color: rgba(147, 112, 219, 0.1);
}

.admin-chart-box {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 40px;
}

/* SVG Chart Line Animation */
.chart-svg {
  width: 100%;
  height: 250px;
}

.chart-line {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawLine 3s forwards ease-out;
}

@keyframes drawLine {
  to { stroke-dashoffset: 0; }
}

.two-col-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 30px;
}

/* Footer Section */
footer {
  background: #050409;
  border-top: 1px solid var(--border-color);
  padding: 60px 15px 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr 1.2fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-box h3 {
  color: var(--text-primary);
  font-size: 1.1rem;
  margin-bottom: 20px;
  font-family: var(--font-title);
}

.footer-box p {
  margin-bottom: 15px;
}

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

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

.footer-links a:hover {
  color: var(--accent-gold);
  padding-left: 5px;
}

.social-icons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition-smooth);
}

.social-icon:hover {
  background: var(--accent-gold);
  color: var(--bg-deep);
  border-color: var(--accent-gold);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  font-size: 0.8rem;
}

/* Mobile responsive menu button */
.mobile-nav-btn {
  display: none;
  font-size: 1.5rem;
  color: var(--text-primary);
  cursor: pointer;
}

/* Mobile view footer nav bar */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #080711;
  border-top: 1px solid var(--border-color);
  z-index: 999;
  grid-template-columns: repeat(5, 1fr);
  padding: 10px 0;
}

.mobile-bar-item {
  text-align: center;
  font-size: 0.65rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.mobile-bar-item i {
  font-size: 1.15rem;
}

.mobile-bar-item.active, .mobile-bar-item:hover {
  color: var(--accent-gold);
}

/* Mobile Navigation Sidebar */
.mobile-sidebar {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100vh;
  background: rgba(20, 17, 44, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 2000;
  transition: right 0.4s cubic-bezier(0.77, 0.2, 0.05, 1.0);
  padding: 80px 30px 30px;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mobile-sidebar.active {
  right: 0;
}

.mobile-sidebar a {
  color: var(--text-primary);
  font-size: 1.2rem;
  font-family: var(--font-title);
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition-smooth);
}

.mobile-sidebar a:hover {
  color: var(--accent-gold);
  padding-left: 10px;
}

.mobile-sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  backdrop-filter: blur(3px);
}

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

.mobile-only {
  display: none !important;
}

/* Responsiveness Rules */
@media (max-width: 992px) {
  .hero {
    min-height: auto;
    padding-top: 100px;
    padding-bottom: 60px;
    position: relative;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 20px;
  }
  .hero-canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.3;
    pointer-events: none;
  }
  .hero-content {
    position: relative;
    z-index: 2;
  }
  .hero-content h1 {
    font-size: 2.2rem;
  }
  .hero-content p {
    margin: 0 auto 20px;
  }
  .hero-btns {
    justify-content: center;
    flex-wrap: wrap;
  }
  .detail-grid, .checkout-grid, .profile-grid, .two-col-grid, .admin-layout {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .mobile-only {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }
  .mobile-only {
    display: block !important;
  }
  .nav-links {
    display: none;
  }
  
  /* Mobile 2-Row Header Layout */
  .header-container {
    flex-wrap: wrap;
    padding: 12px 15px 10px; /* reduce vertical space */
    position: relative;
    justify-content: center; /* horizontally center the logo */
  }
  .logo-link {
    width: auto;
  }
  .mobile-nav-btn {
    display: block;
    position: absolute;
    right: 15px;
    top: 12px; /* align vertically with logo */
    z-index: 2005;
  }
  .nav-actions {
    order: 2; /* move to second row */
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px; /* tighter spacing */
    gap: 15px; /* keep icons spaced out */
  }
  .search-bar-header {
    flex: 1; /* search takes up remaining space on left */
    max-width: none; /* override desktop max-width */
    margin-right: auto;
    padding: 8px 15px; /* taller input box */
  }
  .search-bar-header input {
    font-size: 0.95rem; /* larger, readable text */
  }
  .logo-text {
    font-size: 1.2rem;
  }
  .logo-icon {
    width: 26px;
    height: 26px;
  }
  .inquiry-banner {
    flex-direction: column;
    text-align: center;
    gap: 20px;
    padding: 30px 20px;
  }
  .inquiry-banner-content {
    max-width: 100%;
  }
  .mobile-bottom-bar {
    display: grid;
  }
  body {
    padding-bottom: 90px;
  }
  .section {
    padding: 40px 15px;
  }
  .logo-link span {
    display: none;
  }
  .btn {
    white-space: nowrap;
  }
  .section-header {
    align-items: center;
  }
  
  /* Global Mobile Typography Adjustments */
  body {
    font-size: 0.9rem;
  }
  .section-title {
    font-size: 1.6rem !important;
  }
  .section-subtitle {
    font-size: 0.85rem !important;
  }
  h1 { font-size: 1.8rem !important; }
  h2 { font-size: 1.5rem !important; }
  h3 { font-size: 1.1rem !important; }
  p { font-size: 0.85rem !important; }
  .btn { font-size: 0.85rem !important; padding: 8px 16px !important; }
  
  /* Keep mobile layouts readable instead of forcing every grid into tight columns. */
  .grid-products,
  .features-grid,
  .service-cards,
  .stats-grid,
  [style*="grid-template-columns: repeat(auto-fit"]:not(.youtube-grid),
  [style*="grid-template-columns: repeat(auto-fill"]:not(.youtube-grid) {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  
  /* Force YouTube Videos to 1 Column */
  .youtube-grid {
    grid-template-columns: 1fr !important;
  }
  
  /* Footer Mobile Accordion */
  .footer-accordion-header {
    cursor: pointer;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 10px;
  }
  .footer-accordion-content {
    max-height: 0;
    overflow: hidden;
    margin-bottom: 0;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), margin-bottom 0.4s ease, opacity 0.3s ease;
  }
  .footer-accordion-box.active .footer-accordion-content {
    max-height: 350px; /* High enough to fit content */
    margin-bottom: 20px;
    opacity: 1;
  }
  .footer-accordion-box.active .fa-chevron-down {
    transform: rotate(180deg);
  }
  
  /* Why Choose Us Mobile Carousel */
  #why-choose-us .features-grid {
    display: flex !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 15px !important;
    padding-bottom: 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
  }
  #why-choose-us .features-grid::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
  }
  #why-choose-us .feature-box {
    flex: 0 0 85% !important; /* Take up 85% of screen so the next card peeks out */
    scroll-snap-align: center;
  }
}

/* ========================================================= */
/* CSS Lightweight Animations (Mobile Fallbacks) */
/* ========================================================= */
.mobile-fallback-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(147, 112, 219, 0.08) 0%, transparent 70%);
  pointer-events: none;
}
.mobile-fallback-animation .css-circle {
  position: absolute;
  border: 1px solid rgba(242, 201, 76, 0.15); /* Gold */
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: pulse-ring 4s infinite linear;
}
.mobile-fallback-animation .css-circle:nth-child(1) { width: 150px; height: 150px; animation-duration: 6s; }
.mobile-fallback-animation .css-circle:nth-child(2) { width: 250px; height: 250px; animation-duration: 8s; animation-direction: reverse; border-style: dashed; }
.mobile-fallback-animation .css-circle:nth-child(3) { width: 350px; height: 350px; animation-duration: 12s; border-color: rgba(147, 112, 219, 0.2); } /* Purple */

@keyframes pulse-ring {
  0% { transform: translate(-50%, -50%) rotate(0deg) scale(0.9); opacity: 0.8; }
  50% { transform: translate(-50%, -50%) rotate(180deg) scale(1.1); opacity: 0.4; }
  100% { transform: translate(-50%, -50%) rotate(360deg) scale(0.9); opacity: 0.8; }
}
@keyframes pulse-center {
  0% { transform: translate(-50%, -50%) scale(1); filter: drop-shadow(0 0 10px rgba(242, 201, 76, 0.4)); }
  100% { transform: translate(-50%, -50%) scale(1.15); filter: drop-shadow(0 0 25px rgba(242, 201, 76, 0.9)); }
}

@media (min-width: 769px) {
  .mobile-fallback-animation {
    display: none; /* Hide on desktop where 3D JS runs smoothly */
  }
}

@media (max-width: 768px) {
  .product-card, .feature-box, .service-card {
    padding: 10px !important;
  }
  .product-card h3, .feature-box h3, .service-card h3 {
    font-size: 0.9rem !important;
    margin-bottom: 5px;
    white-space: normal;
  }
  .feature-box p {
    font-size: 0.8rem;
  }
  .feature-icon {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    margin-bottom: 10px;
  }
  
  .product-rating {
    font-size: 0.75rem;
    margin-bottom: 6px;
  }
  .product-price {
    font-size: 1.05rem;
  }
  .btn-card-add {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
  }

  .product-gallery-wrapper {
    height: 300px !important;
  }
  .detail-actions {
    flex-direction: column;
    gap: 15px;
  }
  .qty-selector {
    width: 100%;
    justify-content: space-between;
  }
  #add-to-cart-form-btn, .detail-actions .btn-secondary {
    width: 100%;
  }

  /* Admin Panel Responsiveness */
  .admin-layout {
    display: flex;
    flex-direction: column;
  }
  
  .admin-sidebar {
    height: auto !important;
    min-height: auto;
    padding: 10px 15px !important;
    overflow-x: auto;
    overflow-y: hidden;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-right: none !important;
    border-bottom: 1px solid var(--border-color);
  }
  
  .admin-sidebar > div:first-child, .admin-sidebar > div:last-child {
    display: none; /* Hide logo and user info on mobile to save space */
  }

  .admin-sidebar .profile-menu {
    display: flex;
    flex-direction: row;
    gap: 10px;
    width: max-content;
  }

  .admin-sidebar .profile-menu li {
    margin-bottom: 0 !important;
  }
  
  .admin-sidebar .profile-menu li a {
    white-space: nowrap;
    padding: 8px 12px !important;
    border-radius: 8px;
  }

  .admin-main {
    padding: 20px 10px;
  }

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

  .admin-header-row h1 {
    font-size: 1.5rem !important;
  }

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

  .admin-stat-card {
    padding: 15px;
  }

  .admin-stat-card i {
    font-size: 1.8rem;
    bottom: 10px;
    right: 10px;
  }

  /* Responsive Form Grids */
  .checkout-grid {
    grid-template-columns: 1fr !important;
  }
  
  /* Tables to Mobile Cards */
  .table-container {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  .admin-main table {
    display: block;
    width: 100%;
    border: none;
  }
  .admin-main thead {
    display: none; /* Hide headers */
  }
  .admin-main tbody {
    display: block;
    width: 100%;
  }
  .admin-main tr {
    display: block;
    margin-bottom: 15px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  }
  .admin-main td {
    display: block;
    text-align: left !important;
    padding: 6px 0 !important;
    border-bottom: 1px solid rgba(255,255,255,0.03) !important;
    white-space: normal !important;
  }
  .admin-main td:first-child {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent-gold);
    border-bottom: none !important;
    padding-bottom: 2px !important;
  }
  .admin-main td:last-child {
    border-bottom: none !important;
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
  }
  .admin-main td img {
    max-width: 60px !important;
    height: auto !important;
  }
}

.review-card {
  position: relative;
  border-radius: 18px;
  background: rgba(18, 14, 38, 0.88);
  border: 1px solid rgba(242, 201, 76, 0.15);
  padding: 25px;
  min-height: 240px;
}

.review-tag {
  position: absolute;
  top: 18px;
  right: 18px;
  display: inline-block;
  background: rgba(242, 201, 76, 0.12);
  color: var(--accent-gold);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.review-stars {
  color: var(--accent-gold);
  margin-bottom: 18px;
  font-size: 1rem;
}

.review-text {
  color: var(--text-primary);
  line-height: 1.8;
  margin-bottom: 22px;
}

.reviewer-meta h4 {
  margin: 0 0 6px 0;
  font-size: 1rem;
}

.reviewer-meta span {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.carousel-container {
  position: relative;
}

.testimonial-carousel {
  display: flex;
  gap: 30px;
  overflow-x: auto;
  padding: 10px 40px 20px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.testimonial-carousel::-webkit-scrollbar {
  display: none;
}

.testimonial-carousel-card {
  flex: 0 0 min(360px, calc(100vw - 90px));
  scroll-snap-align: center;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.carousel-btn:hover {
  background: var(--accent-gold);
  color: var(--bg-deep);
}

.carousel-btn.left {
  left: 0;
}

.carousel-btn.right {
  right: 0;
}

.review-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 768px) {
  .review-form-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================================= */
/* Sitewide Responsive Stabilizers */
/* ========================================================= */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.section,
.header-container,
.footer-grid {
  width: min(100%, 1200px);
}

.glass-panel,
.product-card,
.feature-box,
.service-card,
.review-card,
.checkout-summary-box,
.cart-sidebar,
.modal-content,
.table-container {
  min-width: 0;
}

.grid-products,
.features-grid,
.service-cards,
.checkout-grid,
.detail-grid,
.footer-grid,
.profile-grid,
.stats-grid,
.two-col-grid {
  min-width: 0;
}

.product-card-title,
.product-card-title a,
.cart-item-info h4,
.service-card h3,
.feature-box h3,
.review-card h3,
.blog-detail-heading h1 {
  overflow-wrap: anywhere;
  word-break: normal;
}

.btn,
.cart-checkout-btn,
.btn-card-add,
.filter-tab,
.mobile-bar-item {
  min-width: 0;
}

.btn {
  white-space: normal;
  text-align: center;
}

@media (max-width: 1180px) {
  .header-container {
    padding-left: 18px;
    padding-right: 18px;
  }

  .nav-links {
    gap: 18px;
  }

  .search-bar-header {
    max-width: 180px;
  }
}

@media (max-width: 992px) {
  .nav-links {
    display: none;
  }

  .search-bar-header {
    display: flex;
    max-width: 240px;
  }

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

  .detail-grid,
  .checkout-grid,
  .profile-grid,
  .two-col-grid {
    grid-template-columns: 1fr !important;
  }

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

  .service-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .section {
    padding: 36px 16px;
  }

  .glass-panel {
    padding: 18px;
    border-radius: 10px;
  }

  .header-container {
    min-height: 64px;
    gap: 12px;
  }

  .logo-link {
    font-size: 1rem;
    letter-spacing: 0;
    max-width: calc(100vw - 150px);
    overflow: hidden;
  }

  .logo-link img {
    max-width: 180px !important;
    max-height: 42px !important;
    object-fit: contain;
  }

  .nav-actions {
    gap: 12px;
  }

  .action-btn {
    font-size: 1rem;
  }

  .theme-toggle-btn {
    width: 34px;
    height: 34px;
  }

  .grid-products,
  .features-grid,
  .service-cards,
  .stats-grid,
  .footer-grid {
    grid-template-columns: 1fr !important;
  }

  .product-card,
  .feature-box,
  .service-card,
  .review-card {
    padding: 18px !important;
  }

  .product-image-container {
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .filter-bar,
  .filter-actions,
  .mobile-filters-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .filter-select,
  .form-control {
    width: 100%;
  }

  .cart-sidebar {
    width: min(100vw, 420px);
  }

  .cart-item {
    gap: 12px;
  }

  .cart-item-img {
    width: 62px;
    height: 62px;
    flex: 0 0 62px;
  }

  .cart-footer {
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }

  .detail-gallery,
  .detail-info {
    min-width: 0;
  }

  .thumbnail-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px;
  }

  .footer-grid {
    gap: 18px;
  }

  .mobile-bottom-bar {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .mobile-bar-item {
    font-size: 0.68rem;
    line-height: 1.1;
  }

  .mobile-bar-item i {
    font-size: 1rem;
  }
}

@media (max-width: 520px) {
  .section {
    padding-left: 14px;
    padding-right: 14px;
  }

  h1,
  .section-title {
    font-size: 1.75rem !important;
    line-height: 1.15;
  }

  h2 {
    font-size: 1.45rem !important;
    line-height: 1.2;
  }

  .hero-btns,
  .detail-actions,
  .product-footer,
  .section-header {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .hero-btns .btn,
  .detail-actions .btn,
  .detail-actions button {
    width: 100%;
  }

  .cart-sidebar {
    width: 100vw;
  }

  .modal-content {
    width: calc(100vw - 28px);
    max-width: calc(100vw - 28px);
    padding: 22px 16px !important;
  }

  /* .mobile-sidebar {
    width: min(86vw, 320px);
  } */

  .home-announcement-image {
    width: 100% !important;
  }

  #team-slider > .product-card {
    min-width: 82vw !important;
  }

  #related-slider .product-card {
    min-width: 78vw !important;
    max-width: 78vw !important;
  }
}

/* Mobile header final layout: compact row plus searchable second row. */
@media (max-width: 768px) {
  header {
    min-height: 112px;
  }

  .header-container {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    min-height: 112px;
    padding: 10px 14px !important;
    gap: 10px;
  }

  .header-container .logo-link {
    order: 1;
    flex: 1 1 auto;
    width: auto !important;
    max-width: calc(100vw - 150px) !important;
    justify-content: flex-start;
  }

  .header-container .logo-link img {
    height: auto !important;
    max-height: 48px !important;
    max-width: 132px !important;
  }

  .header-container .nav-actions {
    order: initial !important;
    width: auto !important;
    margin-top: 0 !important;
    display: contents !important;
  }

  .header-container .nav-actions > a.action-btn {
    display: none !important;
  }

  .header-container .search-bar-header {
    order: 4;
    display: flex !important;
    flex: 0 0 100%;
    width: 100%;
    max-width: none !important;
    margin: 0 !important;
    padding: 8px 14px;
  }

  .header-container .theme-toggle-btn,
  .header-container #cart-toggle-btn {
    order: 2;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 0 !important;
    position: relative;
  }

  .header-container .mobile-nav-btn {
    order: 3;
    display: inline-flex !important;
    position: static !important;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    z-index: 1;
  }

  .header-container .mobile-nav-btn i {
    font-size: 1.45rem;
  }

  .cart-count {
    top: -6px;
    right: -6px;
  }
}
