/**
 * ==============================================================================
 * PAVLOV SHOP — DESIGN SYSTEM STYLESHEET
 * Primary visual truth faithfully implementing the Claude Design files.
 * ==============================================================================
 */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@400;500;600&family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,300,0..1&display=swap');

:root {
  /* Brand Colours */
  --ink: #111315;
  --graphite: #3A3F44;
  --slate: #6B7178;
  --line-strong: #C9CED2;
  --line: #E4E7E9;
  --mist: #F4F6F6;
  --paper: #FFFFFF;
  
  --pavlov-cyan: #0EC0DF;
  --cyan-700: #0A7F95;
  --cyan-50: #E7F8FB;
  
  --sale: #C8412F;
  --sale-bg: #FBEAE7;
  --success: #16663F;
  --success-bg: #E6F4EC;
  --warning: #8A5A12;
  --warning-bg: #FBF1E0;
  --night: #0B0D0E;
  
  /* Typography */
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans: 'Instrument Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Elevation */
  --shadow-e0: 0 0 0 1px var(--line);
  --shadow-e1: 0 1px 2px rgba(17,19,21,.06), 0 4px 12px rgba(17,19,21,.06);
  --shadow-e2: 0 12px 40px rgba(17,19,21,.16);
  
  /* Radii */
  --radius-sharp: 0px;
  --radius-btn: 4px;
  --radius-panel: 8px;
  --radius-pill: 999px;
  
  /* Container & Gutters */
  --container-max: 1440px;
  --gutter: clamp(16px, 4vw, 64px);
  --section-pad: clamp(48px, 6vw, 96px);
}

/* Base Reset & Document */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--cyan-700);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--ink);
  text-decoration: underline;
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
}

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

/* Material Symbols Outlined Icons */
.ms, .material-symbols-outlined {
  font-family: 'Material Symbols Outlined' !important;
  font-weight: 300;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--mist);
}
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 4px;
}

/* ==========================================================================
   LAYOUT CONTAINERS & GRIDS
   ========================================================================== */
.container {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  width: 100%;
}

.container-narrow {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  width: 100%;
}

.section {
  padding-top: var(--section-pad);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: clamp(20px, 3vw, 32px);
  flex-wrap: wrap;
}

/* Responsive Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 12px;
}

@media (min-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px 16px;
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 48px 24px;
  }
}

/* Horizontal Scroll Rails */
.scroll-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 78%;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  margin-left: calc(-1 * var(--gutter));
  margin-right: calc(-1 * var(--gutter));
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  padding-bottom: 8px;
  scroll-padding-left: var(--gutter);
}

@media (min-width: 768px) {
  .scroll-rail {
    grid-auto-columns: 38%;
    gap: 16px;
  }
}

@media (min-width: 1024px) {
  .scroll-rail {
    grid-auto-columns: 24%;
    gap: 20px;
  }
}

.scroll-rail > * {
  scroll-snap-align: start;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
.font-serif { font-family: var(--font-serif); }
.font-sans { font-family: var(--font-sans); }
.font-mono { font-family: var(--font-mono); }

.display-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(44px, 6.4vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0;
}

.editorial-h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(36px, 4.4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
}

.section-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

.concept-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan-700);
}

.concept-label.muted {
  color: var(--slate);
}

.body-lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--graphite);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-btn);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  text-decoration: none !important;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
  border: 0;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper) !important;
}
.btn-primary:hover {
  background: #2A2E32;
}
.btn-primary:focus-visible {
  outline: 2px solid var(--pavlov-cyan);
  outline-offset: 3px;
}

.btn-accent {
  background: var(--pavlov-cyan);
  color: var(--ink) !important;
}
.btn-accent:hover {
  background: #0BAECB;
}
.btn-accent:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.btn-secondary {
  background: var(--paper);
  color: var(--ink) !important;
  border: 1.5px solid var(--ink);
}
.btn-secondary:hover {
  background: var(--mist);
}

.btn-lg {
  height: 56px;
  padding: 0 32px;
  font-size: 16px;
}

.btn-sm {
  height: 36px;
  padding: 0 16px;
  font-size: 13px;
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  border-radius: var(--radius-btn);
}
.btn-icon:hover {
  background: var(--mist);
}

.btn-pill {
  border-radius: var(--radius-pill);
}

/* ==========================================================================
   INPUTS & FORMS
   ========================================================================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.form-input, .form-select, .form-textarea {
  height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-btn);
  padding: 0 14px;
  font-size: 16px;
  background: var(--paper);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px #CFF3F9;
}

.form-textarea {
  height: auto;
  padding: 12px 14px;
  resize: vertical;
}

.search-input-wrap {
  height: 48px;
  background: var(--mist);
  border: 1px solid var(--mist);
  border-radius: var(--radius-btn);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  transition: all 0.15s ease;
}
.search-input-wrap:focus-within {
  border-color: var(--ink);
  background: var(--paper);
  box-shadow: 0 0 0 3px #CFF3F9;
}
.search-input-wrap input {
  border: 0;
  background: transparent;
  outline: none;
  font-size: 15px;
  flex: 1;
  min-width: 0;
}

/* ==========================================================================
   BADGES & PILLS
   ========================================================================== */
.badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 5px 8px;
  display: inline-block;
  line-height: 1;
}

.badge-dark {
  background: var(--ink);
  color: var(--paper);
}

.badge-cyan {
  background: var(--pavlov-cyan);
  color: var(--ink);
}

.badge-outline {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--ink);
}

.badge-sale {
  background: var(--sale-bg);
  color: var(--sale);
}

.status-pill {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.status-delivered { background: var(--success-bg); color: var(--success); }
.status-production { background: var(--cyan-50); color: var(--cyan-700); }
.status-pending { background: var(--warning-bg); color: var(--warning); }
.status-failed { background: var(--sale-bg); color: var(--sale); }

/* ==========================================================================
   PRODUCT CARD COMPONENT
   Faithfully implementing ProductCard.dc.html
   ========================================================================== */
.product-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  position: relative;
}

.product-card-media {
  position: relative;
  aspect-ratio: 4/5;
  background: repeating-linear-gradient(135deg, #ECEFF0 0 1px, #F4F6F6 1px 11px);
  cursor: pointer;
  overflow: hidden;
  border-radius: var(--radius-sharp);
}

.product-card-media.tone-dark {
  background: repeating-linear-gradient(135deg, #23272B 0 1px, #1A1D20 1px 11px);
}

.product-card-media.tone-cyan {
  background: repeating-linear-gradient(135deg, #CBEFF5 0 1px, #E1F6FA 1px 11px);
}

.product-card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}

.product-card-wishlist {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 22px;
  z-index: 3;
  color: var(--ink);
  transition: transform 0.15s ease, color 0.15s ease;
}
.product-card-wishlist.active {
  color: var(--sale);
  font-variation-settings: 'FILL' 1;
}

.product-card-quick-add {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  background: var(--paper);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 6px 20px rgba(17,19,21,.12);
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
  z-index: 5;
}

.product-card:hover .product-card-quick-add {
  transform: translateY(0);
  opacity: 1;
}

.product-card-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
  color: var(--ink);
  text-decoration: none !important;
}

.product-card-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.product-card-price {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
}

.product-card-mrp {
  font-size: 13px;
  color: var(--slate);
  text-decoration: line-through;
}

.product-card-discount {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sale);
}

.product-card-swatches {
  display: flex;
  gap: 6px;
  align-items: center;
  min-height: 24px;
}

.swatch-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: inline-block;
}

.product-card-rating {
  font-size: 12.5px;
  color: var(--slate);
  margin-left: auto;
  white-space: nowrap;
}

/* ==========================================================================
   NAVIGATION, HEADER & FOOTER
   ========================================================================== */
.announcement-bar {
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  padding: 9px 16px;
  line-height: 1.3;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.header-top-row {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand-logo-wrap {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex: none;
}

.brand-logo-img {
  height: 38px;
  width: auto;
  display: block;
}

.header-user-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.header-cart-btn {
  width: auto;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.header-nav-row {
  display: flex;
  align-items: center;
  gap: 32px;
  border-top: 1px solid #EEF0F1;
}

.nav-link {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--graphite);
  padding: 14px 0;
  text-decoration: none !important;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--ink);
  border-bottom-color: var(--pavlov-cyan);
}

.cart-counter {
  min-width: 22px;
  height: 22px;
  border-radius: var(--radius-pill);
  background: var(--pavlov-cyan);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 22px;
  text-align: center;
  padding: 0 6px;
  display: inline-block;
}

.site-footer {
  background: var(--night);
  color: var(--paper);
  margin-top: clamp(64px, 8vw, 120px);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr));
  gap: 48px 32px;
  padding-top: clamp(48px, 6vw, 80px);
  padding-bottom: 48px;
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 20px;
  }
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 20px var(--gutter) 28px;
  border-top: 1px solid #23272B;
  font-size: 13px;
  color: #9AA1A7;
}

/* ==========================================================================
   DRAWER & MODAL
   ========================================================================== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 13, 14, 0.45);
  z-index: 70;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-content {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(360px, 88%);
  background: var(--paper);
  z-index: 71;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: var(--shadow-e2);
  transform: translateX(-100%);
  transition: transform 0.25s ease;
}

.drawer-overlay.open .drawer-content {
  transform: translateX(0);
}

/* Toast Notification */
.toast-notice {
  position: fixed;
  left: 50%;
  bottom: 80px;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  padding: 12px 20px;
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 99;
  box-shadow: var(--shadow-e2);
  animation: toastFadeIn 0.2s ease;
}

@keyframes toastFadeIn {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ==========================================================================
   RESPONSIVE UTILITIES & MOBILE SYSTEM
   ========================================================================== */
@media (min-width: 1024px) {
  .d-lg-none { display: none !important; }
  .desktop-only { display: block !important; }
  .desktop-flex { display: flex !important; }
  .mobile-only { display: none !important; }
  .mobile-flex { display: none !important; }
}

@media (max-width: 1023px) {
  .d-lg-none { display: inline-flex !important; }
  .desktop-only { display: none !important; }
  .desktop-flex { display: none !important; }
  .mobile-only { display: block !important; }
  .mobile-flex { display: flex !important; }

  .site-header {
    border-bottom: 1px solid var(--line);
  }

  .site-header .container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .header-top-row {
    height: 56px !important;
    display: grid !important;
    grid-template-columns: 44px 1fr 44px !important;
    align-items: center !important;
    gap: 0 !important;
    padding: 0 !important;
    position: relative !important;
  }

  .header-menu-btn {
    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center !important;
    justify-self: start !important;
    background: transparent !important;
    border: 0 !important;
    cursor: pointer !important;
  }

  .brand-logo-wrap {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    justify-self: center !important;
    width: 100% !important;
    text-align: center !important;
  }

  .header-top-row .brand-logo-img {
    height: 30px !important;
    max-width: 140px !important;
    width: auto !important;
    object-fit: contain !important;
    margin: 0 auto !important;
    display: block !important;
  }

  .site-header .search-input-wrap.desktop-search {
    display: none !important;
  }

  .header-user-actions {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    justify-self: end !important;
    width: 44px !important;
  }

  .header-cart-btn {
    position: relative !important;
    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center !important;
    justify-self: end !important;
    background: transparent !important;
    border: 0 !important;
    text-decoration: none !important;
  }

  .header-cart-btn .cart-counter {
    position: absolute !important;
    top: 4px !important;
    right: 2px !important;
    min-width: 18px !important;
    height: 18px !important;
    line-height: 18px !important;
    font-size: 11px !important;
    padding: 0 4px !important;
  }

  .header-nav-row {
    display: none !important;
  }

  .mobile-search-bar {
    display: block !important;
    padding: 0 2px 10px 2px !important;
  }

  .mobile-search-bar .search-input-wrap {
    height: 44px !important;
    background: #F4F6F6 !important;
    border: 1px solid #E4E7E9 !important;
    border-radius: 4px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 0 12px !important;
  }

  .mobile-search-bar .search-input-wrap input {
    font-size: 15px !important;
  }

  /* Responsive tables */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  /* Hero adjustments */
  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  /* Scroll rail mobile scrollbars */
  .scroll-rail::-webkit-scrollbar {
    display: none;
  }
  .scroll-rail {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  /* Buttons touch target */
  .btn {
    min-height: 44px;
  }

  /* PDP Responsive */
  .pdp-grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  .pdp-gallery-desktop {
    display: flex !important;
    flex-direction: column-reverse !important;
    gap: 12px !important;
  }

  .pdp-gallery-desktop > div:first-child {
    flex-direction: row !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px !important;
    gap: 8px !important;
  }

  .pdp-gallery-desktop > div:first-child button {
    width: 64px !important;
    height: 76px !important;
    flex: none !important;
  }

  /* Customizer studio */
  .custom-studio-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  .custom-preview-sticky {
    position: relative !important;
    top: 0 !important;
  }
}

@media (max-width: 640px) {
  .hero-media-composite {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
    aspect-ratio: auto !important;
  }
  .hero-media-composite > div:first-child {
    aspect-ratio: 4/5;
    min-height: 280px;
  }
  .hero-media-composite > div:not(:first-child) {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 20px 8px !important;
  }

  .product-card-title {
    font-size: 13.5px !important;
  }

  .product-card-price {
    font-size: 14px !important;
  }

  .product-card-mrp {
    font-size: 11.5px !important;
  }

  .product-card-discount {
    font-size: 11px !important;
  }

  .section {
    padding-top: clamp(28px, 5vw, 44px);
    padding-bottom: clamp(28px, 5vw, 44px);
  }
}

