/* =========================
LAYOUT CSS
========================= */

/* =========================
ROOT TOKENS
========================= */

:root {
  --site-bg: #0b0f0c;
  --dark-section: #101512;
  --dark-soft: #161c18;

  --color-black: #111111;
  --color-white: #ffffff;
  --color-gray: #f7f7f7;

  --accent: #c6a76b;
  --accent-soft: #e7d2a4;

  --text-primary: #f5f5f5;
  --text-secondary: rgba(255, 255, 255, 0.72);

  --container-width: 1200px;

  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 20px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 80px;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;

  --shadow-soft: 0 8px 22px rgba(0, 0, 0, 0.18);
  --shadow-hover: 0 18px 40px rgba(0, 0, 0, 0.28);
}

/* =========================
RESET
========================= */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =========================
BASE
========================= */

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  background: var(--site-bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 140px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

main {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

/* =========================
CONTAINER
========================= */

.container {
  width: min(92%, var(--container-width));
  margin: 0 auto;
}

/* =========================
TYPOGRAPHY
========================= */

h1,
h2,
h3 {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: #ffffff;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.05;
}

h2 {
  font-size: clamp(2rem, 3.4vw, 2.75rem);
  line-height: 1.1;
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.2;
}

p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* =========================
GLOBAL SPACING
========================= */

section {
  padding: 80px 0;
}

/* =========================
UTILITIES
========================= */

.hidden {
  display: none !important;
}

.visible {
  opacity: 1;
  transform: none;
}

.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.fade-up.visible,
.fade-in.visible {
  opacity: 1;
  transform: none;
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* =========================
PAGE FADE
========================= */

@keyframes pageFade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === NAVBAR ALIGNMENT FIX === */
.nav-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  justify-self: end;
  width: 100%;
  gap: 16px;
}

.cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* === SHOP GRID POLISH === */
.product-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
  padding: 40px 20px 80px;
}

.shop-products .product-grid {
  max-width: 1200px;
  margin: 0 auto;
}

.shop-products .product-card img {
  height: 240px;
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding: 30px 20px 60px;
  }

  .shop-products .product-card img {
    height: 200px;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
COMPONENTS CSS
========================= */

/* =========================
GLOBAL BUTTONS
========================= */

button,
.btn {
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease, opacity 0.25s ease;
}

button:hover,
.btn:hover {
  transform: translateY(-2px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  line-height: 1;
}

.btn-primary {
  background: linear-gradient(135deg, #d4a017, #f5c542);
  color: #111;
  box-shadow: 0 8px 24px rgba(212, 160, 23, 0.22);
}

.btn-primary:hover {
  box-shadow: 0 12px 30px rgba(212, 160, 23, 0.34);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.92);
  color: #111;
}

.btn-secondary:hover {
  background: #fff;
}

.btn-outline {
  background: transparent;
  color: #d4af37;
  border: 1px solid rgba(212, 175, 55, 0.9);
}

.btn-outline:hover {
  background: #d4af37;
  color: #111;
  box-shadow: 0 10px 24px rgba(212, 175, 55, 0.22);
}

/* =========================
LOGO
========================= */

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  font-size: 22px;
  font-weight: 700;
}

.logo img {
  height: 42px;
  width: auto;
  display: block;
  transition: transform 0.25s ease;
}

.logo img:hover {
  transform: scale(1.05);
}

/* =========================
NAV LINKS
========================= */

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: inherit;
  font-weight: 500;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.nav-links a:hover {
  opacity: 0.72;
}

/* =========================
CART BUTTON
========================= */

.cart-btn {
  position: relative;
  background: none;
  font-size: 20px;
  color: inherit;
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -8px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

/* =========================
CART OVERLAY
========================= */

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1000;
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* =========================
CART DRAWER
========================= */

.cart-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(380px, 100%);
  height: 100%;
  background: #101512;
  color: #e6e6e6;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(.22, .61, .36, 1);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.cart-drawer.active {
  transform: translateX(0);
}

.cart-header {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cart-header h3 {
  font-size: 18px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
}

.cart-upsell h4 {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 10px;
}

.cart-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: block;
  padding-bottom: 124px;
}

.cart-items {
  min-height: 0;
  overflow: visible;
  padding: 20px;
}

.cart-upsell {
  padding: 0 20px 20px;
  pointer-events: auto;
}

.cart-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  display: grid;
  gap: 12px;
  padding: 20px;
  background: #101512;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cart-total,
.cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-size: 15px;
}

.checkout-btn,
.cart-checkout {
  position: relative;
  z-index: 21;
  width: 100%;
  min-height: 54px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #d4a017 0%, #f5c542 55%, #ffdf7a 100%);
  color: #111;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow:
    0 10px 26px rgba(212, 160, 23, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transform: none !important;
  overflow: hidden;
}

.checkout-btn:hover,
.cart-checkout:hover {
  transform: none !important;
  box-shadow:
    0 14px 32px rgba(212, 160, 23, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  filter: brightness(1.03);
}

.checkout-btn:active,
.cart-checkout:active {
  transform: scale(0.985) !important;
  box-shadow:
    0 6px 18px rgba(212, 160, 23, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.checkout-btn::before,
.cart-checkout::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.16) 35%,
    transparent 70%
  );
  transform: translateX(-120%);
  transition: transform 0.6s ease;
  pointer-events: none;
}

.checkout-btn:hover::before,
.cart-checkout:hover::before {
  transform: translateX(120%);
}

.checkout-btn span {
  pointer-events: none;
}

/* =========================
CART ITEMS
========================= */

.cart-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cart-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 10px;
}

.cart-item-info {
  flex: 1;
}

.cart-item-title {
  margin-bottom: 4px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.cart-item-price {
  margin-bottom: 6px;
  color: #d4af37;
  font-size: 13px;
}

.cart-subtotal {
  margin-top: 4px;
  font-size: 13px;
  opacity: 0.65;
}

.cart-qty {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-qty button {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #f2f2f2;
  color: #111;
}

.cart-remove {
  background: none;
  font-size: 16px;
  opacity: 0.6;
  color: inherit;
}

/* =========================
PRODUCT CARD
========================= */

.product-card {
  position: relative;
  display: block;
  overflow: hidden;
  background: #161c18;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.3);
  border-color: rgba(212, 175, 55, 0.3);
}

.product-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
  pointer-events: none;
  z-index: 0;
}

.product-card:hover::after {
  background: rgba(0, 0, 0, 0.1);
}

.product-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, filter 0.35s ease;
}

.product-card:hover img {
  transform: scale(1.05);
  filter: brightness(1.05);
}

.product-card a,
.product-card button,
.product-card .product-card-media,
.product-card .product-card-content {
  position: relative;
  z-index: 2;
}

.product-card button {
  width: 100%;
  margin-top: 10px;
  padding: 10px 16px;
  border-radius: 10px;
  background: #111;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.product-card button:hover {
  background: #000;
}

.product-card button:active {
  transform: scale(0.97);
}

.product-info {
  padding: 18px;
}

.product-title {
  margin-bottom: 6px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: #fff;
}

.product-price {
  font-size: 15px;
  font-weight: 600;
  color: #d4af37;
  margin-bottom: 12px;
}

.product-urgency {
  margin-top: 10px;
  color: #d4af37;
  font-size: 14px;
}

.product-shipping {
  margin-top: 4px;
  font-size: 13px;
  opacity: 0.8;
}

/* =========================
PRODUCT PAGE MEDIA
========================= */

.product-image {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.product-image img {
  transition: transform 0.45s ease;
  cursor: zoom-in;
}

.product-image:hover img {
  transform: scale(1.08);
}

.product-thumbnails {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.product-thumbnails img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  cursor: pointer;
  border-radius: 8px;
  border: 2px solid transparent;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.product-thumbnails img:hover {
  border-color: #d4af37;
  transform: translateY(-2px);
}

/* =========================
PRODUCT PAGE CONTENT
========================= */

.product-option-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.product-option-label {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.product-option-select {
  width: 100%;
  padding: 12px 14px;
  background: #101512;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
}

.product-option-select:focus {
  outline: none;
  border-color: #d4af37;
}

.product-variant-selectors {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 20px 0 24px;
}

.product-purchase-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 18px 0 20px;
}

#product-title {
  max-width: 320px;
  margin: 0 0 16px;
  font-size: 48px;
  line-height: 0.95;
  color: #fff;
}

#product-price {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #d4af37;
}

#product-description {
  max-width: 420px;
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.82);
  white-space: normal;
  overflow-wrap: break-word;
}

#add-to-cart-btn {
  width: fit-content;
  min-width: 140px;
}

/* =========================
PRODUCT TRUST
========================= */

.product-trust {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 260px;
  margin-top: 18px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(212, 160, 23, 0.18);
  border-radius: 14px;
}

.product-trust::before {
  content: "Why choose this product";
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.72);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.trust-item:last-child {
  border-bottom: none;
}

.trust-item::before {
  content: "✔";
  color: #d4a017;
  font-size: 14px;
}

/* =========================
STICKY ADD TO CART
========================= */

#add-to-cart-btn,
#sticky-add-to-cart {
  background: linear-gradient(135deg, #d4a017, #f5c542);
  color: #111;
  border: none;
  border-radius: 10px;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(212, 160, 23, 0.22);
}

#add-to-cart-btn:hover,
#sticky-add-to-cart:hover {
  opacity: 0.98;
  box-shadow: 0 12px 30px rgba(212, 160, 23, 0.35);
}

#add-to-cart-btn:disabled,
#sticky-add-to-cart:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.sticky-cart {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 760px;
  z-index: 999;
  display: none;
}

.sticky-cart-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: rgba(17, 17, 17, 0.92);
  border: 1px solid rgba(212, 160, 23, 0.2);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
}

#sticky-product-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
}

#sticky-add-to-cart {
  flex-shrink: 0;
  min-width: 160px;
  padding: 12px 18px;
}

/* =========================
MOBILE MENU
========================= */

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  padding: 40px 30px;
  background: #fff;
  color: #111;
  transform: translateX(100%);
  transition: transform 0.35s ease;
  z-index: 1200;
  display: none;
}

.mobile-menu.active {
  display: block;
  transform: translateX(0);
}

.mobile-links {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 40px;
  list-style: none;
}

.mobile-links a {
  text-decoration: none;
  color: inherit;
  font-size: 18px;
}

.mobile-close {
  background: none;
  font-size: 22px;
  color: inherit;
}

/* =========================
CART TOAST
========================= */

.cart-toast {
  position: fixed;
  right: 30px;
  bottom: 30px;
  z-index: 1200;
  padding: 14px 22px;
  border-radius: 10px;
  background: #111;
  color: #fff;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.cart-toast.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: none;
}

/* =========================
PAYMENT ICONS
========================= */

.payment-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.payment-icons img {
  width: auto;
  height: 26px;
  opacity: 0.92;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.payment-icons img:hover {
  opacity: 1;
  transform: scale(1.05);
}

/* =========================
CART ICON ANIMATION
========================= */

.cart-bounce {
  animation: cartBounce 0.4s ease;
}

@keyframes cartBounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* =========================
SHOP STATES
========================= */

.shop-loading {
  padding: 80px 0;
  text-align: center;
  opacity: 0.7;
}

.shop-loading span {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 0 4px;
  border-radius: 50%;
  background: #d4af37;
  animation: loadingDots 1.2s infinite;
}

.shop-loading span:nth-child(2) {
  animation-delay: 0.2s;
}

.shop-loading span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes loadingDots {
  0% { transform: scale(0); }
  50% { transform: scale(1); }
  100% { transform: scale(0); }
}

.shop-empty {
  max-width: 500px;
  margin: auto;
  padding: 100px 20px;
  text-align: center;
  opacity: 0.8;
}

.shop-empty h2 {
  margin-bottom: 10px;
}

.shop-empty p {
  margin-bottom: 20px;
  color: #aaa;
}

/* =========================
RESPONSIVE
========================= */

@media (max-width: 768px) {
  .product-card img {
    height: 220px;
  }

  #product-title {
    font-size: 36px;
    max-width: none;
  }

  #product-description {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .sticky-cart {
    bottom: 12px;
    width: calc(100% - 20px);
  }

  .sticky-cart-inner {
    padding: 12px;
    gap: 12px;
  }

  #sticky-product-title {
    font-size: 13px;
  }

  #sticky-add-to-cart {
    min-width: 140px;
  }
}

@media (min-width: 901px) {
  .mobile-menu,
  .mobile-menu-btn {
    display: none !important;
  }
}

.cart-trust {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  opacity: 0.8;
}

.cart-trust span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-empty {
  text-align: center;
  padding: 40px 10px;
  opacity: 0.7;
}

.cart-empty span {
  font-size: 13px;
  opacity: 0.6;
}

body.checkout-loading #checkout-btn {
  opacity: 0.92;
  filter: saturate(0.9);
  box-shadow:
    0 8px 22px rgba(212, 160, 23, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  cursor: wait;
}

body.checkout-loading #checkout-btn::before {
  transform: none;
  opacity: 0;
}

body.checkout-loading #checkout-btn::after {
  content: "🔒";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  line-height: 1;
  opacity: 0.92;
  pointer-events: none;
}