/* === Marshall Brand Colors === */
:root {
  --gold: #C8A85C;
  --gold-light: #D4BA7A;
  --gold-dark: #A88B3E;
  --black: #000000;
  --gray-950: #0A0A0A;
  --gray-900: #111111;
  --gray-800: #1A1A1A;
}

/* === Tailwind Extensions === */
.bg-gold { background-color: var(--gold) !important; }
.bg-gold-light { background-color: var(--gold-light) !important; }
.text-gold { color: var(--gold) !important; }
.text-gold-light { color: var(--gold-light) !important; }
.border-gold { border-color: var(--gold) !important; }

/* === Global === */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === Marshall Logo Font === */
.marshall-logo {
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.15em;
}

/* === Header === */
#site-header {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

#site-header.scrolled {
  background: rgba(0, 0, 0, 0.95);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

/* === Navigation Links === */
.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #9CA3AF;
  transition: color 0.2s;
  position: relative;
}

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

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background: var(--gold);
  border-radius: 1px;
}

.mobile-nav-link {
  display: block;
  padding: 0.75rem 0;
  font-size: 1rem;
  font-weight: 500;
  color: #D1D5DB;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: color 0.2s;
}

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

/* === Product Dropdown Menu (Desktop) === */
.product-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  right: auto;
  min-width: 700px;
  width: auto;
  background: rgba(10, 10, 10, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(8px);
  transition: all 0.25s ease;
  z-index: 100;
}

.product-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.submenu-dropdown-menu {
  min-width: 240px;
  max-width: 280px;
  width: auto;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  padding: 0.8rem 0.9rem;
}

.submenu-dropdown-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  justify-items: center;
}

.submenu-dropdown-item {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  max-width: 240px;
  text-align: center;
  padding: 0.75rem 0.95rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #D1D5DB;
  background: rgba(255,255,255,0.04);
  border-radius: 0.9rem;
  transition: all 0.2s ease;
}

.submenu-dropdown-item:hover {
  background: rgba(200, 168, 92, 0.15);
  color: var(--gold);
}

.product-dropdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}

.product-dropdown-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.55rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #bbb;
  border-radius: 0.5rem;
  transition: all 0.15s;
  white-space: nowrap;
}

.product-dropdown-item:hover {
  background: rgba(200, 168, 92, 0.1);
  color: var(--gold);
}

.product-dropdown-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  font-size: 0.62rem;
  padding: 0.18rem 0.5rem;
  background: #fef08a;
  color: #111827;
  font-weight: 700;
  border-radius: 9999px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: box-shadow 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
}

.product-dropdown-badge.new {
  background: #fbbf24;
  animation: new-badge-pulse 2.2s ease-in-out infinite;
}

.product-dropdown-badge.discontinued {
  background: #7f8894;
  color: #111827;
}

.product-dropdown-badge.md-recommend {
  background: #f9a8d4;
  color: #111827;
}

.mobile-product-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.28rem;
  font-size: 0.62rem;
  padding: 0.18rem 0.46rem;
  border-radius: 9999px;
  font-weight: 700;
  vertical-align: middle;
  background: #fef08a;
  color: #111827;
  transition: box-shadow 0.25s ease, transform 0.25s ease, opacity 0.25s ease, filter 0.25s ease;
}

.mobile-product-badge.new {
  background: #fbbf24;
  animation: new-badge-pulse 2.2s ease-in-out infinite;
}

.mobile-product-badge.discontinued {
  background: #7f8894;
  color: #111827;
}

.mobile-product-badge.md-recommend {
  background: #f9a8d4;
  color: #111827;
}

@keyframes new-badge-pulse {
  0%, 100% {
    background-color: #fbbf24;
    box-shadow: 0 0 0 rgba(74, 222, 128, 0);
  }
  50% {
    background-color: #4ade80;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.2);
  }
}

/* === Mobile Product Dropdown === */
.mobile-product-panel {
  padding: 0.25rem 0 0.5rem 0.5rem;
  max-height: 50vh;
  overflow-y: auto;
}

.mobile-product-item {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: #999;
  transition: color 0.15s;
}

.mobile-product-item:hover {
  color: var(--gold);
}

.mobile-dropdown-arrow,
.dropdown-arrow {
  transition: transform 0.2s;
}

.rotate-180 {
  transform: rotate(180deg);
}

/* === Hero Swiper Slider === */
.hero-swiper {
  width: 100%;
  height: 100%;
}

.hero-swiper .swiper-slide {
  overflow: hidden;
}

.hero-slide-bg {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.1);
  transition: transform 6s ease-out;
}

.hero-swiper .swiper-slide-active .hero-slide-bg {
  transform: scale(1);
}

/* Hero Pagination */
.hero-pagination {
  bottom: 70px !important;
  z-index: 25 !important;
}

.hero-pagination .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.4);
  opacity: 1;
  transition: all 0.3s;
}

.hero-pagination .swiper-pagination-bullet-active {
  background: var(--gold);
  width: 28px;
  border-radius: 5px;
}

/* Hero Navigation Buttons */
.hero-nav-btn {
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  backdrop-filter: blur(4px);
}

.hero-nav-btn:hover {
  background: rgba(200, 168, 92, 0.3);
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-50%) scale(1.1);
}

/* Swiper touch override – allow horizontal swipe through the overlay content */
.hero-swiper .swiper-wrapper {
  will-change: transform;
}

/* Let swipe events pass through the overlay to Swiper */
#home > .z-10,
#home > .z-20:not(.hero-nav-btn) {
  pointer-events: none;
}

#home > .z-20 a,
#home > .z-20 button,
#home .hero-nav-btn,
#home .hero-pagination {
  pointer-events: auto;
}

/* Mobile: larger touch area for swiping */
@media (max-width: 767px) {
  .hero-nav-btn { display: none !important; }
  .hero-pagination { bottom: 60px !important; }
}

/* === Animations === */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 1s ease-out;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

/* === Filter Buttons === */
.filter-btn {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #9CA3AF;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
}

.filter-btn.active {
  color: #000;
  background: var(--gold);
  border-color: var(--gold);
}

/* === Product Card === */
.product-card {
  background: #111;
  border: 1px solid #222;
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s;
  cursor: pointer;
}

.product-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(200, 168, 92, 0.15);
}

.product-card .card-image {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #0A0A0A;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

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

.product-card .card-image .placeholder-icon {
  font-size: 4rem;
  color: #333;
}

.product-card .card-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.22rem 0.65rem;
  background: #fef08a;
  color: #111827;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 9999px;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.product-card .card-badge.card-badge--discontinued {
  background: #8f97a3;
  color: #111827;
}

.product-card .card-badge.card-badge--md {
  background: #f9a8d4;
  color: #111827;
}

.product-card .card-badge.card-badge--new {
  background: linear-gradient(135deg, #fbbf24 0%, #4ade80 100%);
  color: #111827;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.18);
}

.product-card .card-category {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.25rem 0.5rem;
  background: var(--gold);
  color: #111827;
  font-size: 0.65rem;
  font-weight: 600;
  border-radius: 0.25rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.product-card .card-body {
  padding: 1.25rem;
}

.product-card .card-title {
  font-size: 1rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.25rem;
}

.product-card .card-subtitle {
  font-size: 0.8rem;
  color: #777;
  margin-bottom: 0.75rem;
}

.product-card .card-desc {
  font-size: 0.8rem;
  color: #999;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .card-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid #222;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-card .card-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
  transition: color 0.2s;
}

.product-card .card-link:hover {
  color: var(--gold-light);
}

/* === Modal === */
#product-modal.show {
  display: block;
}

#product-modal .modal-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #0A0A0A;
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

#product-modal .modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* === Scroll Top Button === */
#scroll-top-btn.show {
  opacity: 1;
  pointer-events: auto;
}

/* === Product Card Animation on Scroll === */
.product-card {
  opacity: 0;
  transform: translateY(20px);
}

.product-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* === Responsive Adjustments === */
@media (max-width: 640px) {
  #product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .product-card .card-body {
    padding: 0.75rem;
  }

  .product-card .card-title {
    font-size: 0.85rem;
  }

  .product-card .card-subtitle {
    font-size: 0.7rem;
    margin-bottom: 0.5rem;
  }

  .product-card .card-desc {
    display: none;
  }

  .product-card .card-footer {
    padding: 0.5rem 0.75rem;
  }
}

/* === Scrollbar === */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #0A0A0A;
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* === Selection === */
::selection {
  background: var(--gold);
  color: black;
}
