/* ==========================================================================
   Myco VPN — Luxury Earthy Dark Olive Shopping Cart UI
   Exact color palette, typography, glassmorphism, and responsive layout
   ========================================================================== */

:root {
  /* Core Palette inspired by the reference design */
  --bg-deep-mushroom: #1a1b15;
  --window-olive-base: rgba(65, 73, 52, 0.78);
  --window-olive-solid: #444d37;
  --header-olive-bar: rgba(62, 68, 49, 0.85);
  --panel-dark-olive: rgba(45, 51, 35, 0.78);
  --panel-border: rgba(255, 255, 255, 0.06);
  --row-divider: rgba(255, 255, 255, 0.07);

  /* Text Colors */
  --text-cream-white: #f4f1ea;
  --text-soft-white: #e5e1d8;
  --text-muted-olive: #a5ab98;
  --text-warm-amber: #d59b58;

  /* Accent Colors */
  --burnt-orange: #c2591a;
  --burnt-orange-hover: #d46521;
  --burnt-orange-active: #aa4b12;
  --header-pill-tan: #eab065;
  --header-pill-tan-hover: #f2bc75;
  --badge-forest-green: #2c4a2e;

  /* Typography */
  --font-serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-persian: 'Vazirmatn', var(--font-sans);

  /* Spacing & Radius */
  --radius-window: 2px;
  --radius-card: 2px;
  --radius-btn: 3px;
  --radius-thumb: 4px;
}

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

html,
body {
  min-height: 100%;
  background-color: var(--bg-deep-mushroom);
  color: var(--text-cream-white);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Screen Reader Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   Macro Mushroom Background & Soft Atmospheric Vignette
   ========================================================================== */
.macro-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url('../images/bg-mushroom.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  filter: brightness(0.68) contrast(1.04) saturate(0.85);
  transform: scale(1.03);
}

.macro-vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 45%, rgba(46, 48, 36, 0.18) 0%, rgba(18, 19, 14, 0.72) 100%),
    linear-gradient(180deg, rgba(24, 25, 18, 0.35) 0%, rgba(19, 20, 14, 0.55) 100%);
  pointer-events: none;
}

/* ==========================================================================
   Outer Showcase Viewport & Centered Store Window
   ========================================================================== */
.page-viewport {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.store-window {
  position: relative;
  width: 100%;
  max-width: 1030px;
  min-height: 675px;
  background: linear-gradient(
    145deg,
    rgba(71, 80, 57, 0.86) 0%,
    rgba(88, 92, 74, 0.80) 48%,
    rgba(61, 71, 49, 0.88) 100%
  );
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: var(--radius-window);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.62),
    0 8px 24px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Ambient Organic Lighting Spots inside Window (matches soft olive/sage bokeh in reference) */
.window-ambient-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(55px);
}

.glow-top-left {
  width: 310px;
  height: 210px;
  top: 38px;
  left: 160px;
  background: rgba(45, 62, 36, 0.62);
}

.glow-bottom-right {
  width: 380px;
  height: 250px;
  bottom: -40px;
  right: 80px;
  background: rgba(58, 76, 46, 0.5);
}

/* ==========================================================================
   Top Header Navigation
   ========================================================================== */
.site-header {
  position: relative;
  z-index: 2;
  height: 58px;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: rgba(58, 64, 46, 0.52);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  color: var(--text-soft-white);
  text-decoration: none;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0.88;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  opacity: 1;
  color: #ffffff;
}

/* Center Minimal Logo */
.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.brand-logo:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.brand-svg {
  width: 86px;
  height: 34px;
  display: block;
}

/* Header Right Controls */
.nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
}

.nav-action-link {
  background: none;
  border: none;
  color: var(--text-soft-white);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  opacity: 0.9;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.nav-action-link:hover {
  opacity: 1;
  color: var(--header-pill-tan);
}

/* Small Warm-Orange/Amber Cart Price Button in Top Right */
.header-cart-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background-color: var(--header-pill-tan);
  color: #1f2219;
  border: none;
  border-radius: 3px;
  padding: 7px 13px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.header-cart-pill:hover {
  background-color: var(--header-pill-tan-hover);
  transform: translateY(-1px);
}

.header-cart-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cart-svg-icon {
  color: #23261c;
}

.header-cart-badge {
  position: absolute;
  top: -6px;
  right: -7px;
  min-width: 13px;
  height: 13px;
  padding: 0 3px;
  border-radius: 999px;
  background-color: var(--badge-forest-green);
  color: #f4f1ea;
  font-size: 8.5px;
  font-weight: 700;
  line-height: 13px;
  text-align: center;
}

/* ==========================================================================
   Main Body & Hero Title
   ========================================================================== */
.window-body {
  position: relative;
  z-index: 2;
  padding: 54px 30px 56px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hero-title-section {
  margin-bottom: 42px;
}

.hero-headline {
  font-family: var(--font-serif), var(--font-persian);
  font-weight: 400;
  font-size: clamp(26px, 3.3vw, 37px);
  line-height: 1.35;
  color: var(--text-cream-white);
  letter-spacing: -0.01em;
  text-align: left;
  unicode-bidi: plaintext;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
}

/* ==========================================================================
   Two-Column Cart Grid Layout
   ========================================================================== */
.cart-layout-grid {
  display: grid;
  grid-template-columns: 1.54fr 1fr;
  gap: 22px;
  align-items: start;
}

.cart-left-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Dark Olive Translucent Card Base */
.glass-card {
  background: var(--panel-dark-olive);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-card);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

/* ==========================================================================
   Left Column: Shopping Cart Products Card
   ========================================================================== */
.cart-items-card {
  padding: 28px 30px 26px;
}

.cart-table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.cart-table thead th {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 13.5px;
  color: var(--text-cream-white);
  padding: 0 8px 14px;
  border-bottom: none;
  letter-spacing: 0.01em;
}

.cart-table thead th.col-remove {
  width: 22px;
  padding-left: 0;
}

.cart-table thead th.col-thumb {
  width: 48px;
}

.cart-table thead th.col-product {
  padding-left: 6px;
}

.cart-table thead th.col-price {
  width: 72px;
}

.cart-table thead th.col-quantity {
  width: 78px;
}

.cart-table thead th.col-subtotal {
  width: 74px;
  text-align: right;
  padding-right: 4px;
}

/* Table Body Rows */
.cart-row {
  border-bottom: 1px solid var(--row-divider);
  transition: background-color 0.2s ease, opacity 0.25s ease;
}

.cart-row td {
  padding: 15px 8px;
  vertical-align: middle;
  font-size: 11.5px;
}

.cart-row td.cell-remove {
  padding-left: 0;
  padding-right: 4px;
  width: 22px;
}

.remove-item-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.28);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 3px;
  transition: color 0.2s ease, transform 0.15s ease;
}

.remove-item-btn:hover {
  color: #e57358;
  transform: scale(1.15);
}

/* Minimal Cream Product Tile (matches the small cream square icon in the reference) */
.cell-thumb {
  width: 48px;
  padding-left: 2px !important;
  padding-right: 8px !important;
}

.product-icon-tile {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-thumb);
  background: #f2efe9;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

/* Product Title in Warm Amber / Ochre */
.cell-product {
  padding-left: 6px !important;
}

.product-name-wrap {
  display: flex;
   flex-direction: column;
  gap: 2px;
}

.product-title-fa {
  font-family: var(--font-persian);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-warm-amber);
  letter-spacing: 0;
  display: inline-block;
  text-align: left;
  unicode-bidi: plaintext;
  transition: color 0.2s ease;
}

.cart-row:hover .product-title-fa {
  color: #e8b06d;
}

/* Price & Subtotal Columns */
.cell-price,
.cell-subtotal {
  color: var(--text-soft-white);
  font-weight: 500;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.cell-subtotal {
  text-align: right;
  padding-right: 4px !important;
}

/* Quantity Control (matches the compact number + small light square stepper from the reference) */
.qty-control {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 52px;
  height: 24px;
  padding: 0 3px 0 7px;
  background: rgba(25, 29, 19, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 2px;
}

.qty-input {
  width: 24px;
  background: transparent;
  border: none;
  color: var(--text-cream-white);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  text-align: left;
  outline: none;
  -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty-stepper-box {
  display: flex;
  flex-direction: column;
  width: 14px;
  height: 16px;
  background: #e8e5de;
  border-radius: 2px;
  overflow: hidden;
}

.qty-step-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #2b3022;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: background-color 0.15s ease;
}

.qty-step-btn:hover {
  background-color: #d5cfc2;
}

/* Cart Card Footer: Update Cart */
.cart-card-footer {
  margin-top: 22px;
  padding-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.update-cart-btn {
  background: none;
  border: none;
  color: var(--text-muted-olive);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.update-cart-btn:hover {
  color: var(--text-cream-white);
}

.restore-cart-btn {
  background: rgba(234, 176, 101, 0.15);
  border: 1px solid rgba(234, 176, 101, 0.4);
  color: var(--header-pill-tan);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.restore-cart-btn:hover {
  background: rgba(234, 176, 101, 0.25);
}

.cart-status-msg {
  font-size: 11px;
  color: #a8d49b;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.cart-status-msg.visible {
  opacity: 1;
}

/* ==========================================================================
   Left Column Bottom: Coupon Code Card
   ========================================================================== */
.coupon-card {
  padding: 26px 30px;
}

.coupon-form {
  display: flex;
  align-items: center;
  gap: 24px;
}

.coupon-input-wrap {
  flex: 1;
}

.coupon-input {
  width: 100%;
  height: 36px;
  padding: 0 14px;
  background: rgba(36, 42, 28, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  color: var(--text-cream-white);
  font-family: var(--font-sans);
  font-size: 11.5px;
  outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.coupon-input::placeholder {
  color: var(--text-muted-olive);
  opacity: 0.78;
}

.coupon-input:focus {
  border-color: rgba(234, 176, 101, 0.45);
  background: rgba(31, 36, 24, 0.75);
}

.apply-coupon-btn {
  background: none;
  border: none;
  color: var(--text-cream-white);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 10px;
  white-space: nowrap;
  transition: color 0.2s ease, transform 0.15s ease;
}

.apply-coupon-btn:hover {
  color: var(--header-pill-tan);
  transform: translateY(-1px);
}

.coupon-feedback {
  margin-top: 8px;
  font-size: 11px;
  min-height: 15px;
  color: var(--text-muted-olive);
}

.coupon-feedback.success {
  color: #a8d49b;
}

.coupon-feedback.error {
  color: #e68a73;
}

/* ==========================================================================
   Right Column: Cart Totals Card
   ========================================================================== */
.totals-card {
  padding: 28px 30px 30px;
}

.totals-heading {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 14px;
  color: var(--text-cream-white);
  margin-bottom: 24px;
  letter-spacing: 0.01em;
}

.totals-rows {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 26px;
}

.totals-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-soft-white);
}

.totals-label {
  color: rgba(244, 241, 234, 0.85);
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.totals-value {
  font-weight: 500;
  color: var(--text-cream-white);
  font-variant-numeric: tabular-nums;
}

.discount-row .discount-value {
  color: #a8d49b;
}

.remove-coupon-inline {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}

.remove-coupon-inline:hover {
  color: #e68a73;
}

/* Burnt Orange Primary CTA Button */
.checkout-cta-btn {
  width: 100%;
  height: 40px;
  background-color: var(--burnt-orange);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-btn);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(194, 89, 26, 0.28);
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.checkout-cta-btn:hover {
  background-color: var(--burnt-orange-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(194, 89, 26, 0.38);
}

.checkout-cta-btn:active {
  background-color: var(--burnt-orange-active);
  transform: translateY(0);
}

/* ==========================================================================
   Luxury Modal (Checkout / Promo / Login)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(15, 17, 12, 0.72);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: #333a28;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 32px 28px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  color: var(--text-cream-white);
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted-olive);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

.modal-close-btn:hover {
  color: #ffffff;
}

.modal-title {
  font-family: var(--font-serif), var(--font-persian);
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 10px;
  color: var(--text-cream-white);
}

.modal-subtitle {
  font-family: var(--font-persian);
  font-size: 13px;
  color: var(--text-soft-white);
  line-height: 1.7;
  margin-bottom: 20px;
}

.modal-summary-box {
  background: rgba(24, 28, 19, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 3px;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 12px;
}

.modal-summary-line {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  color: var(--text-soft-white);
}

.modal-summary-line.total {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 6px;
  padding-top: 10px;
  font-weight: 600;
  color: var(--header-pill-tan);
}

.modal-input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  margin-bottom: 12px;
  background: rgba(24, 28, 19, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  color: var(--text-cream-white);
  font-family: var(--font-sans);
  font-size: 12px;
  outline: none;
}

.modal-input:focus {
  border-color: var(--header-pill-tan);
}

/* ==========================================================================
   Responsive Design (Tablet & Mobile Viewports)
   ========================================================================== */
@media (max-width: 900px) {
  .page-viewport {
    padding: 20px 14px;
  }

  .cart-layout-grid {
    grid-template-columns: 1fr;
  }

  .window-body {
    padding: 36px 20px 40px;
  }
}

@media (max-width: 640px) {
  .site-header {
    grid-template-columns: 1fr auto;
    height: auto;
    padding: 14px 18px;
    row-gap: 12px;
  }

  .brand-logo {
    justify-self: end;
  }

  .nav-right {
    grid-column: 1 / -1;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 10px;
  }

  .hero-headline {
    font-size: 24px;
  }

  .cart-items-card,
  .coupon-card,
  .totals-card {
    padding: 20px 16px;
  }

  .coupon-form {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .apply-coupon-btn {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    text-align: center;
  }
}
