/* ============ CSS Variables ============ */
:root {
  --bg-dark: #1a1714;
  --bg-warm: #f8f5f0;
  --bg-cream: #faf7f2;
  --text-dark: #1a1714;
  --text-light: #f8f5f0;
  --text-muted: #6b6560;
  --accent: #c4956a;
  --accent-hover: #b38559;
  --accent-light: #e8d4c0;
  --border: #e0dbd5;
  --shadow: rgba(26, 23, 20, 0.08);
  --shadow-dark: rgba(26, 23, 20, 0.15);
  
  --font-display: 'Fraunces', serif;
  --font-body: 'DM Sans', sans-serif;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  
  --transition: 0.3s ease;
}

/* ============ Reset & Base ============ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-warm);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ============ Navigation ============ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(248, 245, 240, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-dark);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition);
}

.nav-link:hover {
  color: var(--accent);
}

.cart-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dark);
  padding: 0.5rem;
  transition: color var(--transition);
}

.cart-btn:hover {
  color: var(--accent);
}

.cart-count {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--accent);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============ Cart Sidebar ============ */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 200;
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 420px;
  height: 100vh;
  background: var(--bg-cream);
  transform: translateX(100%);
  transition: transform var(--transition);
  z-index: 201;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 20px var(--shadow-dark);
}

.cart-sidebar.active {
  transform: translateX(0);
}

.cart-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-header h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.cart-close {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 2rem;
}

.cart-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.cart-item-image {
  width: 80px;
  height: 80px;
  background: var(--accent-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.cart-item-details {
  flex: 1;
}

.cart-item-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.cart-item-price {
  color: var(--accent);
  font-weight: 600;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  background: white;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  transition: all var(--transition);
}

.qty-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}

.cart-item-qty {
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  margin-left: auto;
}

.cart-item-remove:hover {
  color: #c44;
}

.cart-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.cart-empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.cart-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border);
  background: white;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.cart-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(196, 149, 106, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--text-dark);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* ============ Hero Section ============ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--bg-warm) 0%, var(--bg-cream) 50%, #f0ebe3 100%);
  z-index: -1;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: 20%;
  right: 10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-light) 0%, transparent 70%);
  opacity: 0.5;
}

.hero-content {
  max-width: 600px;
  margin: 0 auto 0 10%;
}

.hero-tag {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent-hover);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-xl);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 480px;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-visual {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  width: 400px;
  height: 400px;
}

.floating-card {
  position: absolute;
  background: white;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px var(--shadow);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: float 6s ease-in-out infinite;
}

.floating-card .card-icon {
  font-size: 1.5rem;
}

.floating-card span {
  font-weight: 600;
  color: var(--text-dark);
}

.card-1 {
  top: 10%;
  left: 20%;
  animation-delay: 0s;
}

.card-2 {
  top: 45%;
  right: 10%;
  animation-delay: 2s;
}

.card-3 {
  bottom: 15%;
  left: 30%;
  animation-delay: 4s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

/* ============ Products Section ============ */
.products-section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.category-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 3rem;
}

.tab {
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.product-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow);
  transition: all var(--transition);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px var(--shadow-dark);
}

.product-image {
  height: 220px;
  background: linear-gradient(135deg, var(--accent-light) 0%, #f0e6d8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  position: relative;
}

.product-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--accent);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

.product-info {
  padding: 1.5rem;
}

.product-category {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.product-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.product-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

.product-add-btn {
  padding: 0.5rem 1rem;
  background: var(--text-dark);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
}

.product-add-btn:hover {
  background: var(--accent);
  transform: scale(1.05);
}

/* ============ Category Sections ============ */
.category-section {
  padding: 6rem 2rem;
  background: var(--bg-cream);
}

.category-section.alt {
  background: var(--bg-dark);
  color: var(--text-light);
}

.category-section.alt .category-tag {
  background: rgba(196, 149, 106, 0.2);
  color: var(--accent);
}

.category-section.alt .feature-list li::before {
  color: var(--accent);
}

.category-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.category-content.reverse {
  direction: rtl;
}

.category-content.reverse > * {
  direction: ltr;
}

.category-tag {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent-hover);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-xl);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.category-info h2 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.category-info p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

.feature-list {
  list-style: none;
}

.feature-list li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

.category-preview {
  display: flex;
  justify-content: center;
  align-items: center;
}

.preview-cards {
  display: flex;
  gap: -20px;
}

.preview-card {
  width: 120px;
  height: 160px;
  background: linear-gradient(135deg, var(--accent-light), #f0e6d8);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px var(--shadow);
  transform: rotate(-5deg);
}

.preview-card:nth-child(2) {
  transform: rotate(0deg) translateX(-20px);
  z-index: 1;
}

.preview-card:nth-child(3) {
  transform: rotate(5deg) translateX(-40px);
}

.preview-notepad {
  width: 200px;
  height: 260px;
  background: #fffef8;
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  border-top: 20px solid var(--accent);
}

.notepad-line {
  height: 2px;
  background: #e8e4dc;
  margin-bottom: 1.5rem;
}

/* ============ Signup Section ============ */
.signup-section {
  padding: 6rem 2rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: white;
  text-align: center;
}

.signup-content {
  max-width: 500px;
  margin: 0 auto;
}

.signup-content h2 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.signup-content p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.signup-form {
  display: flex;
  gap: 0.75rem;
  max-width: 400px;
  margin: 0 auto 1rem;
}

.signup-form input {
  flex: 1;
  padding: 1rem 1.25rem;
  border: none;
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: 1rem;
}

.signup-form .btn {
  background: var(--text-dark);
  color: white;
}

.signup-form .btn:hover {
  background: #2a2520;
}

.signup-note {
  font-size: 0.85rem;
  opacity: 0.7;
}

/* ============ About Section ============ */
.about-section {
  padding: 6rem 2rem;
  text-align: center;
}

.about-content {
  max-width: 700px;
  margin: 0 auto;
}

.about-tag {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent-hover);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-xl);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.about-content h2 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.about-content p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* ============ Success Page ============ */
.success-section {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem;
  text-align: center;
}

.success-content {
  max-width: 500px;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  font-size: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
}

.success-content h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.success-message {
  font-size: 1.25rem;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.success-detail {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.success-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* ============ Footer ============ */
.footer {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 4rem 2rem 2rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-brand {
  margin-bottom: 2rem;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.5rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.9rem;
}

/* ============ Toast ============ */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text-dark);
  color: white;
  padding: 1rem 2rem;
  border-radius: var(--radius-lg);
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 300;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============ Responsive ============ */
@media (max-width: 968px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 6rem;
  }
  
  .hero-content {
    margin: 0 auto;
  }
  
  .hero-visual {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    margin-top: 3rem;
    width: 300px;
    height: 200px;
  }
  
  .category-content,
  .category-content.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    text-align: center;
  }
  
  .category-preview {
    order: -1;
    margin-bottom: 2rem;
  }
  
  .nav-links {
    gap: 1rem;
  }
  
  .nav-link {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
  }
  
  .category-tabs {
    flex-wrap: wrap;
  }
  
  .signup-form {
    flex-direction: column;
  }
  
  .success-actions {
    flex-direction: column;
  }
}
