@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;800&family=Outfit:wght@400;500;700;800&display=swap');

:root {
  /* Color Palette */
  --bg-primary: #0a0a0a;          /* Dark gray / black for backgrounds */
  --bg-secondary: #f4f4f5;        /* Light gray for wrappers */
  --bg-muted: #e4e4e7;            /* Slightly darker gray */
  --fg-primary: #ffffff;          /* White text on dark bg */
  --fg-secondary: #0a0a0a;        /* Dark text on light bg */
  --fg-muted: #71717a;            /* Gray text */
  --accent: #d946ef;              /* Fuchsia/Pink accent if needed */
  --border: #e4e4e7;              /* Border color */
  --success: #10b981;             /* Green */
  --destructive: #ef4444;         /* Red for discounts/errors */
  
  /* Layout */
  --max-w: 32rem; /* The original app max width was roughly sm/md (max-w-lg in tailwind = 32rem) */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
}

/* Base Resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: 'Inter', system-ui, sans-serif;
  scroll-behavior: smooth;
  color: var(--fg-secondary);
  background-color: var(--fg-primary); /* Base body color */
}

/* The app used a mobile-first narrow layout centered on screen */
body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: #f4f4f5; /* Light gray behind the mobile view container */
}

/* Typography elements */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-weight: 800; /* Extra bold */
  line-height: 1.2;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}

select {
  font-family: inherit;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Main Container (Mobile Simulator) */
.app-container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  background-color: var(--fg-primary);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  box-shadow: 0 0 20px rgba(0,0,0,0.05); /* Slight shadow to separate from body background on desktop */
}

/* Utilities */
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.tracking-widest { letter-spacing: 0.1em; }
.tracking-wide { letter-spacing: 0.025em; }
.text-muted { color: var(--fg-muted); }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }

.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.w-full { width: 100%; }

/* Buttons */
.btn-primary {
  background-color: var(--bg-primary);
  color: var(--fg-primary);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: opacity 0.2s;
}
.btn-primary:active {
  opacity: 0.8;
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
  stroke-width: 2;
}

/* Specific additions */
.bg-white { background-color: white; }
.border { border-width: 1px; border-style: solid; }
.rounded-md { border-radius: var(--radius-md); }
.rounded-full { border-radius: 9999px; }
.hover-bg:hover { background-color: var(--bg-secondary); }

.story-ring {
  width: 4.5rem; height: 4.5rem;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--fg-secondary);
  padding: 2px;
  background-clip: content-box;
}
.story-ring video {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.color-dot {
  width: 2.5rem; height: 2.5rem; border-radius: 9999px; transition: all 0.2s;
  border: 2px solid transparent; cursor: pointer;
}
.color-dot.active-color {
  outline: 2px solid var(--fg-secondary);
  outline-offset: 2px;
}
.text-success { color: var(--success); }

/* Cart Drawer */
.cart-drawer-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cart-drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 26rem;
    background-color: white;
    z-index: 100;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.cart-drawer.active {
    transform: translateX(0);
}

.cart-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.cart-drawer-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.cart-drawer-footer {
    padding: 1.5rem;
    background-color: white;
}

.drawer-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.drawer-item img {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: var(--radius-sm);
    background-color: var(--bg-secondary);
    object-fit: cover;
}

.drawer-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.drawer-item-title {
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1.3;
}

.drawer-item-price-old {
    text-decoration: line-through;
    color: var(--fg-muted);
    font-size: 0.75rem;
}

.drawer-item-price-new {
    color: var(--success);
    font-weight: 800;
    font-size: 0.875rem;
}

.drawer-qty-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    width: fit-content;
}

.drawer-qty-btn {
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
    cursor: pointer;
    background: transparent;
}

.drawer-qty-btn:hover { background: var(--bg-secondary); }

.drawer-qty-val {
    padding: 0 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
}
