:root {
  --bg-canvas: #f4f6fa;
  --bg-card: #ffffff;
  --ink: #111317;
  --ink-secondary: #5e6573;
  --ink-muted: #8b92a0;
  --line: #e9edf3;
  --line-subtle: #f1f4f8;
  --primary: #121316;
  --primary-hover: #22252a;
  --accent-gold: #f59e0b;
  --accent-gold-bg: #fef8eb;
  --accent-red: #e11d48;
  --accent-red-bg: #fff1f2;
  --accent-green: #10b981;
  --accent-green-bg: #ecfdf5;
  --accent-blue: #3b82f6;
  --accent-blue-bg: #eff6ff;
  --font: "Plus Jakarta Sans", "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius-card: 22px;
  --radius-pill: 9999px;
  --shadow-sm: 0 2px 8px rgba(17, 19, 23, 0.03);
  --shadow-md: 0 6px 24px rgba(17, 19, 23, 0.04), 0 2px 6px rgba(17, 19, 23, 0.02);
  --shadow-lg: 0 20px 50px rgba(17, 19, 23, 0.07), 0 4px 12px rgba(17, 19, 23, 0.02);
}

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

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 85% 10%, rgba(245, 158, 11, 0.06), transparent 45%),
    radial-gradient(ellipse at 15% 90%, rgba(59, 130, 246, 0.04), transparent 45%),
    var(--bg-canvas);
  background-attachment: fixed;
  font: 14px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, select, textarea {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
}

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

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

[hidden] {
  display: none !important;
}

/* ===============================
   TOP HEADER
   =============================== */
.shop-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.shop-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  height: 74px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.shop-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.brand-spark {
  color: var(--accent-gold);
  font-size: 20px;
  line-height: 1;
}

.brand-name {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--ink);
}

.brand-name span {
  color: var(--accent-red);
}

.brand-tag {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--ink-muted);
  margin-left: 2px;
}

.shop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-pill {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
  transition: all 0.2s ease;
}

.nav-pill:hover {
  background: #f1f3f7;
  color: var(--ink);
}

.nav-pill.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 3px 12px rgba(18, 19, 22, 0.16);
}

.header-cart-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #f4f6fa;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  transition: all 0.2s;
}

.header-cart-pill:hover {
  background: #eaeef5;
}

.cart-bubble {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  display: grid;
  place-items: center;
}

/* ===============================
   PAGE CONTAINER & BREADCRUMBS
   =============================== */
.page-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 20px;
}

.breadcrumb-nav a:hover {
  color: var(--ink);
}

.breadcrumb-sep {
  color: #cbd2dc;
}

.page-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-title-group h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: var(--ink);
}

.page-subtitle {
  color: var(--ink-secondary);
  font-size: 14px;
  margin-top: 4px;
}

.item-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-secondary);
}

/* ===============================
   GRID LAYOUTS
   =============================== */
.shop-layout-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 32px;
  align-items: start;
}

/* ===============================
   CART ITEMS LIST
   =============================== */
.cart-items-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-item-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 20px;
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cart-item-card:hover {
  box-shadow: var(--shadow-md);
}

.cart-item-image {
  width: 100px;
  height: 100px;
  border-radius: 16px;
  object-fit: cover;
  background: #f4f6fa;
  flex-shrink: 0;
}

.cart-item-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cart-item-category {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.cart-item-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--ink);
  line-height: 1.3;
}

.cart-item-size-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.size-select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8f9fc;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.size-select-wrap select {
  border: none;
  background: transparent;
  outline: none;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}

.cart-item-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 4px;
}

.cart-unit-price {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.cart-old-price {
  font-size: 13px;
  color: var(--ink-muted);
  text-decoration: line-through;
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}

.stepper {
  display: inline-flex;
  align-items: center;
  background: #f6f7fa;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 3px 6px;
}

.stepper-btn {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: #ffffff;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  transition: all 0.15s;
}

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

.stepper-val {
  min-width: 34px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}

.item-total-price {
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
}

.btn-remove-item {
  background: transparent;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  transition: all 0.18s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-remove-item:hover {
  background: var(--accent-red-bg);
  color: var(--accent-red);
}

/* ===============================
   CART EMPTY STATE
   =============================== */
.cart-empty-panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 60px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.empty-icon-wrap {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #f4f6fa;
  display: grid;
  place-items: center;
  font-size: 32px;
}

.cart-empty-panel h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 8px;
}

.cart-empty-panel p {
  color: var(--ink-secondary);
  font-size: 14px;
  max-width: 360px;
  margin: 0 auto 24px;
}

/* ===============================
   ORDER SUMMARY CARD (STICKY)
   =============================== */
.order-summary-card {
  position: sticky;
  top: 98px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 28px 24px;
  box-shadow: var(--shadow-md);
}

.summary-heading {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--ink);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.summary-lines {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-subtle);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--ink-secondary);
}

.summary-row.free {
  color: var(--accent-green);
  font-weight: 700;
}

/* ---- Coupon code box (checkout summary) ---- */
.coupon-box {
  margin: 16px 0 18px;
}

.coupon-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-secondary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}

.coupon-input-row {
  display: flex;
  gap: 8px;
}

.coupon-input-row input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.coupon-input-row input:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.coupon-input-row input:disabled {
  opacity: 0.6;
}

.coupon-input-row button {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 800;
  font-family: inherit;
  color: #fff;
  background: var(--ink);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.coupon-input-row button:hover:not(:disabled) {
  opacity: 0.85;
}

.coupon-input-row button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.coupon-feedback {
  min-height: 16px;
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink-muted);
}

.coupon-feedback.ok {
  color: var(--accent-green);
}

.coupon-feedback.err {
  color: #dc2626;
}

.summary-row-discount {
  color: var(--accent-green);
  font-weight: 700;
}

.summary-row-discount strong {
  color: var(--accent-green);
}

.summary-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 20px 0 22px;
}

.summary-total-label {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}

.summary-total-amount {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--ink);
}

.coupon-box {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.coupon-input {
  flex: 1;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 13px;
  outline: none;
  background: #f9fafc;
}

.coupon-input:focus {
  border-color: var(--primary);
  background: #fff;
}

.coupon-btn {
  height: 42px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  background: #f1f3f7;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  transition: all 0.2s;
}

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

.btn-cta-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(18, 19, 22, 0.2);
  transition: all 0.22s ease;
  text-align: center;
}

.btn-cta-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(18, 19, 22, 0.25);
}

.btn-cta-secondary {
  display: block;
  text-align: center;
  margin-top: 14px;
  color: var(--ink-secondary);
  font-size: 13px;
  font-weight: 600;
  transition: color 0.18s;
}

.btn-cta-secondary:hover {
  color: var(--ink);
}

.perks-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.perk-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.perk-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #f4f6fa;
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}

.perk-text h4 {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}

.perk-text p {
  font-size: 11px;
  color: var(--ink-muted);
}

/* ===============================
   CHECKOUT FORM STYLING
   =============================== */
.checkout-panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 36px 32px;
  box-shadow: var(--shadow-sm);
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-subtle);
}

.section-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-secondary);
  margin-bottom: 7px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0 16px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafbfc;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  outline: none;
  transition: all 0.2s;
}

.form-group textarea {
  height: 84px;
  padding: 12px 16px;
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(18, 19, 22, 0.05);
}

/* Payment Method Selector */
.payment-methods-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 24px;
}

.payment-card-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.payment-card-option input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.payment-card-option.selected {
  border-color: var(--primary);
  background: #fafbfc;
  box-shadow: 0 4px 14px rgba(18, 19, 22, 0.06);
}

.payment-icon {
  font-size: 24px;
}

.payment-info h4 {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

.payment-info p {
  font-size: 11px;
  color: var(--ink-muted);
}

.security-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
}

/* Checkout Review Items */
.checkout-items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 18px;
}

.checkout-item-mini {
  display: flex;
  align-items: center;
  gap: 12px;
}

.checkout-item-mini img {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  object-fit: cover;
  background: #f4f6fa;
  flex-shrink: 0;
}

.checkout-item-meta {
  flex: 1;
  min-width: 0;
}

.checkout-item-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.checkout-item-sub {
  font-size: 11px;
  color: var(--ink-muted);
}

.checkout-item-price {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}

/* Order Success Screen */
.order-success-dialog {
  position: fixed;
  inset: 0;
  margin: auto !important;
  width: min(500px, calc(100% - 32px));
  max-width: 500px;
  max-height: min(92vh, 650px);
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 28px;
  background: #ffffff;
  padding: 36px 28px;
  text-align: center;
  box-shadow: 0 25px 70px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(0, 0, 0, 0.04);
  z-index: 999999;
}

.order-success-dialog:not([open]) {
  display: none !important;
}

.order-success-dialog[open] {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: modalPopIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.order-success-dialog::backdrop {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

@keyframes modalPopIn {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.success-check-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--accent-green-bg);
  color: var(--accent-green);
  display: grid;
  place-items: center;
  font-size: 40px;
  box-shadow: 0 0 0 10px rgba(16, 185, 129, 0.15);
  animation: success-bounce 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes success-bounce {
  0% { transform: scale(0.3) rotate(-20deg); opacity: 0; }
  60% { transform: scale(1.15) rotate(5deg); opacity: 1; }
  85% { transform: scale(0.95) rotate(-2deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.order-number-pill {
  display: inline-block;
  padding: 6px 18px;
  background: #f4f6fa;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--primary);
  margin: 16px 0;
}

/* Toast */
.shop-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.25s ease;
}

.shop-toast.show {
  opacity: 1;
  transform: none;
}

/* ===============================
   RESPONSIVE DESIGN (Mobile & Tablet)
   =============================== */
@media (max-width: 960px) {
  .shop-layout-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .shop-layout-grid > * {
    min-width: 0;
  }

  .order-summary-card {
    position: static;
  }
  .perks-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .page-container {
    padding: 20px 16px 60px;
  }
  .shop-header-inner {
    padding: 0 16px;
    height: 64px;
  }
  .page-title-group h1 {
    font-size: 24px;
  }
  .cart-item-card {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
  }
  .cart-item-image {
    width: 80px;
    height: 80px;
  }
  .cart-item-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--line-subtle);
  }
  .form-row-2,
  .payment-methods-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .checkout-panel {
    min-width: 0;
    max-width: 100%;
    padding: 24px 18px;
  }

  .checkout-panel form,
  .checkout-panel .form-row-2,
  .checkout-panel .form-group {
    min-width: 0;
    max-width: 100%;
  }
}

.checkout-auth-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  margin-bottom: 22px;
  font-size: 13px;
  color: #166534;
  line-height: 1.4;
}

.checkout-auth-banner.guest-banner {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #1e293b;
}

.checkout-auth-banner svg {
  flex-shrink: 0;
}

.checkout-auth-banner .checkout-login-trigger {
  background: transparent;
  border: none;
  color: #2563eb;
  font-weight: 800;
  cursor: pointer;
  padding: 0 4px;
  text-decoration: underline;
  font-size: 13px;
}

/* ===============================
   CUSTOMER AUTH & ACCOUNT STYLES
   =============================== */
.auth-pill-wrapper {
  position: relative;
  display: inline-block;
}

.auth-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  padding: 0 14px;
  height: 40px;
  border-radius: 9999px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  color: #0f172a;
  cursor: pointer;
  font-weight: 700;
  font-size: 12.5px;
}

.auth-nav-btn:hover {
  border-color: #0f172a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.user-pill-name {
  font-weight: 700;
  font-size: 12px;
  color: #0f172a;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.12);
  padding: 8px;
  z-index: 100;
  animation: fadeInDown 0.15s ease;
}

.user-menu-header {
  padding: 8px 12px 10px;
  border-bottom: 1px solid #f1f5f9;
}

.user-menu-header strong {
  display: block;
  font-size: 13px;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu-header span {
  display: block;
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu-items {
  padding-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.user-menu-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.user-menu-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 4px 0;
}

.user-menu-logout {
  color: #dc2626;
}

.user-menu-logout svg {
  color: #dc2626;
}

.user-menu-logout:hover {
  background: #fee2e2;
  color: #b91c1c;
}

/* Auth Dialog Modal */
.auth-modal-dialog {
  width: min(440px, calc(100% - 28px));
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  background: #ffffff;
  padding: 24px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25);
  margin: auto !important;
}

.auth-modal-dialog::backdrop {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
}

.auth-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.auth-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-modal-close {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.auth-modal-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.auth-nav-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 14px;
  margin-bottom: 18px;
  gap: 4px;
}

.auth-tab-btn {
  padding: 9px 0;
  background: transparent;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.auth-tab-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.auth-form-body {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.auth-input-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.auth-input-group label {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}

.auth-field-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  height: 44px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  transition: all 0.15s ease;
}

.auth-field-box:focus-within {
  border-color: #0f172a;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.06);
}

.auth-field-box svg {
  color: #94a3b8;
  flex-shrink: 0;
}

.auth-field-box:focus-within svg {
  color: #0f172a;
}

.auth-field-box input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: #0f172a;
}

.btn-toggle-pwd {
  background: transparent;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.15s ease;
  flex-shrink: 0;
}

.btn-toggle-pwd:hover {
  color: #0f172a;
}

.btn-auth-submit {
  margin-top: 6px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  border: none;
  background: #0f172a;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.16);
}

.btn-auth-submit:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

.btn-auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-switch-note {
  text-align: center;
  font-size: 12.5px;
  color: #64748b;
  margin: 6px 0 0;
}

.auth-link-btn {
  background: transparent;
  border: none;
  color: #2563eb;
  font-weight: 700;
  cursor: pointer;
  padding: 0 4px;
  text-decoration: underline;
}

.auth-feedback-box {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 12px;
}

.auth-feedback-box.error {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #dc2626;
}

.auth-feedback-box.success {
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

/* Orders Modal Styling */
.orders-modal-dialog {
  width: min(640px, calc(100% - 24px));
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.orders-list-body {
  overflow-y: auto;
  max-height: calc(85vh - 120px);
  padding: 4px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.order-history-card {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  background: #ffffff;
  transition: all 0.15s ease;
}

.order-history-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  border-color: #cbd5e1;
}

.order-history-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.order-history-number {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
}

.order-history-date {
  font-size: 11px;
  color: #64748b;
  display: block;
}

.order-status-pill {
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.order-status-pill.pending { background: #fef3c7; color: #b45309; }
.order-status-pill.confirmed { background: #e0f2fe; color: #0369a1; }
.order-status-pill.shipped { background: #f3e8ff; color: #7e22ce; }
.order-status-pill.delivered { background: #dcfce7; color: #15803d; }
.order-status-pill.cancelled { background: #fee2e2; color: #dc2626; }

.order-history-items {
  border-top: 1px dashed #f1f5f9;
  border-bottom: 1px dashed #f1f5f9;
  padding: 10px 0;
  margin: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.order-history-item-row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: #334155;
}

.order-history-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.order-history-total {
  font-weight: 800;
  color: #0f172a;
  font-size: 14.5px;
}

html {
  overflow-x: clip;
}

.coupon-box {
  display: block;
  min-width: 0;
  max-width: 100%;
}

.coupon-input-row {
  min-width: 0;
  max-width: 100%;
}

/* Responsive navigation shared by product, cart, and checkout pages */
.shop-header-inner {
  position: relative;
}

.shop-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.shop-account-link,
.shop-mobile-toggle {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #f4f6fa;
  color: var(--ink);
}

.shop-account-link:hover,
.shop-mobile-toggle:hover {
  background: #eaeef5;
}

.shop-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
}

.shop-mobile-toggle span {
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.shop-mobile-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(6px) rotate(45deg);
}

.shop-mobile-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.shop-mobile-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-6px) rotate(-45deg);
}

.shop-nav .nav-pill {
  white-space: nowrap;
}

@media (max-width: 760px) {
  .shop-header-inner {
    height: 66px;
    padding: 0 18px;
    gap: 10px;
  }

  .shop-brand {
    min-width: 0;
    gap: 6px;
  }

  .brand-name {
    font-size: 21px;
  }

  .brand-tag {
    font-size: 8px;
    letter-spacing: 1.4px;
  }

  .shop-mobile-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .shop-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 14px;
    right: 14px;
    z-index: 110;
    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 16px 38px rgba(17, 19, 23, 0.14);
  }

  .shop-nav.open {
    display: flex;
  }

  .shop-nav .nav-pill {
    padding: 11px 13px;
    border-radius: 10px;
    font-size: 13px;
  }

  .shop-header-actions {
    gap: 6px;
  }

  .shop-account-link,
  .shop-mobile-toggle {
    width: 38px;
    height: 38px;
  }

  .header-cart-pill {
    gap: 6px;
    padding: 8px 11px;
    font-size: 12px;
  }

  .auth-nav-btn {
    width: 38px;
    height: 38px;
    justify-content: center;
    padding: 0;
  }

  .auth-nav-btn .user-pill-name {
    display: none;
  }
}

@media (max-width: 380px) {
  .shop-header-inner {
    padding: 0 10px;
    gap: 6px;
  }

  .brand-name {
    font-size: 19px;
  }

  .brand-tag {
    font-size: 7px;
    letter-spacing: 1px;
  }

  .shop-header-actions {
    gap: 5px;
  }

  .shop-account-link,
  .shop-mobile-toggle,
  .auth-nav-btn {
    width: 34px;
    height: 34px;
  }

  .header-cart-pill {
    gap: 5px;
    padding: 7px 8px;
  }

  .header-cart-pill > span:nth-child(2) {
    display: none;
  }
}
