/* ===== Resets & Global Variables ===== */
:root {
  --bg-dark: #07090F;
  --bg-card: #141824;
  --bg-card-hover: #191E2C;
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  /* --accent-orange: #EA580C;
  --accent-orange-hover: #C2410C;
  --accent-orange-light: #FFEDD5; */
  --accent-orange: #ab8d54;
  --accent-orange-hover: #8f7340;
  --accent-orange-light: #f5ecda;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(171, 141, 84, 0.5);
  --glass-bg: rgba(7, 9, 15, 0.7);

  --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Playfair Display', serif;

  --shadow-small: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-large: 0 20px 25px -5px rgba(0, 0, 0, 0.8), 0 10px 10px -5px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 15px rgba(171, 141, 84, 0.3);

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-primary);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

ul {
  list-style: none;
}

/* ===== Typography ===== */
h1,
h2,
h3,
h4 {
  font-family: var(--font-primary);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--text-main);
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-main);
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
  margin-top: 1rem;
}

/* ===== Header & Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.25rem 0;
  background: transparent;
  transition: all var(--transition-smooth);
}

.navbar.scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 0;
  box-shadow: var(--shadow-small);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #fff, #bbb);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-subtext {
  font-size: 0.65rem;
  letter-spacing: 4px;
  color: var(--text-muted);
  margin-top: 0.2rem;
  font-weight: 500;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-link {
  font-size: 0.95rem;
  color: var(--text-main);
  font-weight: 500;
  position: relative;
  transition: color var(--transition-fast);
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

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

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

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

.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px) scale(0.95);
  background: rgba(7, 9, 15, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 0.75rem;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-smooth);
  box-shadow: var(--shadow-large);
  z-index: 1200;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(5px) scale(1);
}

.dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 15px;
}

.dropdown-menu li a {
  display: block;
  padding: 0.6rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.dropdown-menu li a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent-orange);
  padding-left: 1.5rem;
}

.dropdown-menu>li {
  position: relative;
}

/* Profile Menu Overrides */
.dropdown-menu.profile-menu {
  left: auto;
  right: -10px;
  transform: translateX(0) translateY(10px) scale(0.95);
  transform-origin: top right;
}

.dropdown:hover .dropdown-menu.profile-menu {
  transform: translateX(0) translateY(5px) scale(1);
}

.logout-btn-dropdown {
  background: none;
  border: none;
  padding: 0.6rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  width: 100%;
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.logout-btn-dropdown:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent-orange);
  padding-left: 1.5rem;
}

.category-link {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.submenu-arrow {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.has-submenu:hover>.category-link .submenu-arrow {
  color: var(--accent-orange);
}

.submenu {
  position: absolute;
  top: 0;
  left: 100%;
  min-width: 220px;
  background: rgba(7, 9, 15, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(171, 141, 84, 0.35);
  border-radius: 12px;
  padding: 0.75rem;
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(171, 141, 84, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateX(10px) scale(0.95);
  transition: all var(--transition-smooth);
  z-index: 1300;
}

.has-submenu:hover>.submenu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
}

/* Keep hover connected between parent and submenu */
.has-submenu::after {
  content: '';
  position: absolute;
  top: 0;
  right: -12px;
  width: 12px;
  height: 100%;
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.search-bar {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 30px;
  padding: 0.25rem;
  padding-left: 1rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-bar:focus-within {
  border-color: var(--accent-orange);
  box-shadow: var(--shadow-glow);
  background: rgba(255, 255, 255, 0.08);
}

.search-bar input {
  background: transparent;
  border: none;
  color: var(--text-main);
  outline: none;
  font-size: 0.9rem;
  width: 160px;
  transition: width var(--transition-smooth);
}

.search-bar input:focus {
  width: 220px;
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

.search-btn {
  background: var(--accent-orange);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.search-btn:hover {
  background: var(--accent-orange-hover);
  transform: translateY(-1px);
}

.icons {
  display: flex;
  gap: 1rem;
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  position: relative;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.icon-btn:hover {
  color: var(--accent-orange);
  transform: scale(1.1);
}

/* ===== Hero Section ===== */
.hero {
  height: 90vh;
  min-height: 600px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, #101217, #07090F);
  background-image: url('/assets/hero_bg.png');
  background-size: cover;
  background-position: center;
  z-index: -2;
  transform: scale(1.05);
  animation: slowZoom 20s infinite alternate ease-in-out;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(7, 9, 15, 0.2) 0%, rgba(7, 9, 15, 0.6) 100%),
    radial-gradient(circle at center, transparent 0%, rgba(7, 9, 15, 0.8) 100%);
  z-index: -1;
}

.hero-content {
  max-width: 900px;
  padding: 0 2rem;
  z-index: 1;
  animation: fadeInUp 1s ease-out forwards;
}

/* ===== Buttons ===== */
.btn-primary {
  background: var(--accent-orange);
  color: white;
  border: none;
  padding: 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 15px rgba(171, 141, 84, 0.4);
}

.btn-primary:hover {
  background: var(--accent-orange-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(171, 141, 84, 0.6);
}

.btn-outline {
  background: transparent;
  color: var(--accent-orange);
  border: 1.5px solid var(--accent-orange);
  padding: 0.6rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.btn-outline:hover {
  background: var(--accent-orange);
  color: white;
  box-shadow: 0 4px 12px rgba(171, 141, 84, 0.3);
}

/* ===== Main Content Layout ===== */
.main-content {
  flex: 1;
  padding: 5rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.product-section {
  margin-bottom: 6rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-title {
  font-size: 2.2rem;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.title-underline {
  width: 60px;
  height: 3px;
  background: var(--accent-orange);
  margin: 0 auto;
  border-radius: 2px;
}

/* ===== Product Grid & Cards ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
  transition: all var(--transition-smooth);
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-large);
  border-color: rgba(255, 255, 255, 0.15);
}

.product-img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  min-height: 220px;
  background: radial-gradient(circle at center, #1E253A 0%, #0F131D 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
}

.product-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.css-icon-placeholder {
  width: 80px;
  height: 80px;
  color: rgba(255, 255, 255, 0.3);
  transition: all var(--transition-smooth);
}

.product-card:hover .css-icon-placeholder {
  transform: scale(1.1);
  color: rgba(255, 255, 255, 0.6);
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

.product-details {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-name {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.8rem;
  line-height: 1.4;
  height: 3em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.price-container {
  margin-bottom: 1.5rem;
  font-size: 1rem;
  color: var(--text-muted);
}

.price-original {
  text-decoration: line-through;
  margin-right: 0.5rem;
}

.price-discounted {
  color: var(--accent-orange);
  font-size: 1.25rem;
  font-weight: 600;
}

.view-all-container {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.view-all-btn {
  padding: 0.8rem 3rem;
  border-radius: 30px;
}

/* ===== About Us Section ===== */
.about-section {
  margin-bottom: 6rem;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 2rem;
  padding: 3rem;
  align-items: center;
  transition: all var(--transition-smooth);
}

.about-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-large);
}

.about-image-wrapper {
  background: radial-gradient(circle at center, #1E253A 0%, #0F131D 100%);
  border-radius: 12px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.css-icon-large {
  width: 120px;
  height: 120px;
  color: rgba(255, 255, 255, 0.2);
  transition: all var(--transition-smooth);
}

.about-card:hover .css-icon-large {
  transform: scale(1.05);
  color: rgba(255, 255, 255, 0.4);
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.about-content p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.8;
  text-align: justify;
}

@media (max-width: 900px) {
  .about-card {
    grid-template-columns: 1fr;
    padding: 2rem;
  }
}

/* ===== Forms ===== */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 2px rgba(171, 141, 84, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.form-control.is-invalid {
  border-color: #ef4444;
}

.invalid-feedback {
  color: #ef4444;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.needs-validation .form-control:focus {
  box-shadow: 0 0 0 2px rgba(171, 141, 84, 0.2);
}

/* Keep dropdown option text readable in dark theme */
select,
.form-control[type="select"],
.form-select,
.checkout-select,
.filter-select {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

select option,
.form-select option,
.checkout-select option,
.filter-select option {
  background-color: #141824;
  color: #F8FAFC;
}

select option:checked,
.form-select option:checked,
.checkout-select option:checked,
.filter-select option:checked {
  background-color: var(--accent-orange);
  color: #FFFFFF;
}

/* ===== Footer ===== */
.site-footer {
  background: #040509;
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 2rem 1.5rem;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: var(--text-muted);
  max-width: 300px;
  margin-top: 1rem;
  font-size: 0.95rem;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
}

.footer-logo span {
  font-family: var(--font-primary);
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: var(--text-muted);
}

.footer-links h4,
.footer-contact h4 {
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
  color: white;
}

.footer-links a,
.footer-contact p {
  display: block;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-orange);
  transform: translateX(3px);
  display: inline-block;
}

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===== Cart Page ===== */
.cart-container {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  max-width: 800px;
  margin: 0 auto;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cart-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transition: all var(--transition-fast);
}

.cart-item-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-orange);
}

.item-image {
  width: 100px;
  height: 100px;
  background: radial-gradient(circle at center, #1E253A 0%, #0F131D 100%);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.item-details {
  flex: 1;
}

.item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  height: 100px;
}

.order-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 2rem;
  margin-top: 1rem;
}

.coupon-section {
  margin-bottom: 2rem;
  background: rgba(255, 255, 255, 0.02);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.coupon-input-group {
  display: flex;
  gap: 1rem;
}

.summary-details {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .main-content {
    padding: 7rem 1.25rem 4rem; /* Adjusted for fixed navbar */
  }

  .cart-container {
    gap: 1.5rem;
  }

  .cart-item-card {
    padding: 1.25rem;
    gap: 1.25rem;
  }
}

@media (max-width: 580px) {
  .section-title {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
  }

  .cart-item-card {
    display: flex !important;
    flex-direction: row !important;
    padding: 0.8rem;
    gap: 0.8rem;
    align-items: flex-start;
  }

  .item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    flex-shrink: 0;
  }

  .item-details {
    flex: 1;
    min-width: 0; /* Prevents overflow/stretching */
  }

  .item-details h3 {
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .item-details p {
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
  }

  .item-details form {
    gap: 0.4rem !important;
  }

  .item-details form label {
    font-size: 0.75rem;
  }

  .item-details form input {
    width: 45px !important;
    height: 28px;
    padding: 0.2rem 0.4rem !important;
    font-size: 0.8rem !important;
  }

  .item-actions {
    display: flex !important;
    flex-direction: column !important;
    height: 80px; /* Matched to desktop behavior (column) but shorter */
    width: auto;
    flex-shrink: 0;
    justify-content: space-between;
    align-items: flex-end;
    gap: 0.5rem;
    margin: 0;
    border: none;
    padding: 0;
  }

  .item-actions span {
    font-size: 1rem !important;
  }

  .item-actions button {
    width: 32px !important;
    height: 32px !important;
  }

  .item-actions svg {
    width: 14px !important;
    height: 14px !important;
  }

  .coupon-input-group {
    flex-direction: row;
    gap: 0.6rem;
  }

  .coupon-input-group input {
    flex: 1;
    min-width: 0;
  }

  .coupon-input-group button {
    width: auto;
    padding: 0.8rem 1.2rem !important;
  }

  .order-summary-card {
    padding: 1.25rem;
    margin-top: 0.5rem;
  }
}

/* ===== Animations ===== */
@keyframes slowZoom {
  0% {
    transform: scale(1);
  }

  100% {
    transform: scale(1.1);
  }
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {

  .nav-links,
  .search-bar {
    display: none;
  }

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

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}