/* Apple Juice E-commerce - Static CSS Version */
/* Based on Tailwind V4 with custom theme variables */

/* CSS Variables - Light Theme */
:root {
  --font-size: 16px;
  --background: #ffffff;
  --foreground: oklch(0.145 0 0);
  --card: #ffffff;
  --card-foreground: oklch(0.145 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.145 0 0);
  --primary: #8B0000;
  --primary-foreground: oklch(1 0 0);
  --secondary: oklch(0.95 0.0058 12);
  --secondary-foreground: #450a0a;
  --muted: #fef2f2;
  --muted-foreground: #7f1d1d;
  --accent: #fee2e2;
  --accent-foreground: #450a0a;
  --destructive: #B91C1C;
  --destructive-foreground: #ffffff;
  --border: rgba(139, 0, 0, 0.1);
  --input: transparent;
  --input-background: #fef2f2;
  --switch-background: #fecaca;
  --ring: oklch(0.708 0.2 12);
  --radius: 0.625rem;
}

/* CSS Variables - Dark Theme */
.dark {
  --background: oklch(0.11 0.01 12);
  --foreground: oklch(0.95 0.01 12);
  --card: oklch(0.15 0.01 12);
  --card-foreground: oklch(0.95 0.01 12);
  --popover: oklch(0.15 0.01 12);
  --popover-foreground: oklch(0.95 0.01 12);
  --primary: oklch(0.55 0.25 12);
  --primary-foreground: oklch(0.98 0.01 12);
  --secondary: oklch(0.2 0.02 12);
  --secondary-foreground: oklch(0.9 0.01 12);
  --muted: oklch(0.18 0.02 12);
  --muted-foreground: oklch(0.65 0.05 12);
  --accent: oklch(0.2 0.02 12);
  --accent-foreground: oklch(0.9 0.01 12);
  --destructive: oklch(0.45 0.25 12);
  --destructive-foreground: oklch(0.98 0.01 12);
  --border: oklch(0.25 0.02 12);
  --input: oklch(0.18 0.02 12);
  --ring: oklch(0.5 0.15 12);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: var(--font-size);
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--foreground);
  background-color: var(--background);
  min-height: 100vh;
}

/* Typography */
h1 { font-size: 2.25rem; font-weight: 700; line-height: 1.3; }
h2 { font-size: 1.875rem; font-weight: 600; line-height: 1.4; }
h3 { font-size: 1.5rem; font-weight: 600; line-height: 1.4; }
h4 { font-size: 1.25rem; font-weight: 500; line-height: 1.5; }
p { font-size: 1rem; font-weight: 400; line-height: 1.6; }
button { font-size: 1rem; font-weight: 500; line-height: 1.5; }
input { font-size: 1rem; font-weight: 400; line-height: 1.5; }

/* Utility Classes */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1rem; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.hidden { display: none !important; }
.block { display: block; }
.flex { display: flex; }
.grid { display: grid; }
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

/* Layout */
.min-h-screen { min-height: 100vh; }
.max-w-7xl { max-width: 80rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-lg { max-width: 32rem; }
.max-w-md { max-width: 28rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.w-96 { width: 24rem; }

/* Spacing */
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.m-4 { margin: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 0.75rem; }
.mr-4 { margin-right: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }

/* Flexbox */
.flex-1 { flex: 1; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.space-x-2 > * + * { margin-left: 0.5rem; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-x-6 > * + * { margin-left: 1.5rem; }
.space-x-8 > * + * { margin-left: 2rem; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }

/* Grid */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Colors */
.bg-background { background-color: var(--background); }
.bg-card { background-color: var(--card); }
.bg-muted { background-color: var(--muted); }
.bg-red-50 { background-color: #fef2f2; }
.bg-red-100 { background-color: #fee2e2; }
.bg-red-500 { background-color: #ef4444; }
.bg-red-600 { background-color: #dc2626; }
.bg-red-700 { background-color: #b91c1c; }
.bg-red-800 { background-color: #991b1b; }
.bg-red-900 { background-color: #7f1d1d; }
.bg-red-950 { background-color: #450a0a; }
.bg-white { background-color: #ffffff; }
.bg-black { background-color: #000000; }
.bg-yellow-400 { background-color: #facc15; }
.bg-green-600 { background-color: #16a34a; }
.bg-blue-600 { background-color: #2563eb; }
.bg-purple-600 { background-color: #9333ea; }
.bg-indigo-600 { background-color: #4f46e5; }
.bg-orange-600 { background-color: #ea580c; }

.text-foreground { color: var(--foreground); }
.text-muted-foreground { color: var(--muted-foreground); }
.text-red-500 { color: #ef4444; }
.text-red-800 { color: #991b1b; }
.text-white { color: #ffffff; }
.text-black { color: #000000; }
.text-gray-400 { color: #9ca3af; }
.text-gray-800 { color: #1f2937; }
.text-red-100 { color: #fee2e2; }
.text-yellow-300 { color: #fde047; }

/* Borders */
.border { border: 1px solid var(--border); }
.border-t { border-top: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }
.border-l { border-left: 1px solid var(--border); }
.border-border { border-color: var(--border); }
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-full { border-radius: 9999px; }

/* Shadow */
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }

/* Typography weights */
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Size */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-6xl { font-size: 3.75rem; }

/* Icons */
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-12 { width: 3rem; }
.w-32 { width: 8rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-8 { height: 2rem; }
.h-12 { height: 3rem; }
.h-16 { height: 4rem; }
.h-32 { height: 8rem; }

/* Transitions */
.transition-colors { transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out; }
.transition-all { transition: all 0.15s ease-in-out; }
.transition-transform { transition: transform 0.3s ease-in-out; }
.duration-300 { transition-duration: 300ms; }
.ease-in-out { transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }

/* Hover states */
.hover\:bg-red-900:hover { background-color: #7f1d1d; }
.hover\:bg-red-700:hover { background-color: #b91c1c; }
.hover\:bg-muted:hover { background-color: var(--muted); }
.hover\:bg-white:hover { background-color: #ffffff; }
.hover\:text-foreground:hover { color: var(--foreground); }
.hover\:shadow-lg:hover { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.hover\:underline:hover { text-decoration: underline; }

/* Component-specific styles */
.nav-link {
  color: var(--muted-foreground);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.nav-link:hover {
  color: var(--foreground);
  background-color: var(--muted);
}

.nav-link-mobile {
  display: block;
  color: var(--muted-foreground);
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.nav-link-mobile:hover {
  color: var(--foreground);
  background-color: var(--muted);
}

.card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 2rem;
  transition: box-shadow 0.15s ease-in-out;
}

.product-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
}

.product-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-sale {
  background-color: #ef4444;
  color: #ffffff;
}

.badge-bestseller {
  background-color: #eab308;
  color: #000000;
}

.category-badge {
  display: inline-block;
  background-color: var(--muted);
  color: var(--muted-foreground);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.price-current {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--foreground);
}

.price-original {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-decoration: line-through;
}

.star-rating {
  display: flex;
  align-items: center;
}

.star {
  color: #eab308;
  fill: #eab308;
}

.star-empty {
  color: #d1d5db;
  fill: #d1d5db;
}

.star-half {
  color: #eab308;
  fill: url(#half);
}

/* Gradient backgrounds */
.bg-gradient-to-r {
  background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

.from-red-50 {
  --tw-gradient-from: #fef2f2;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(254, 242, 242, 0));
}

.to-red-100 {
  --tw-gradient-to: #fee2e2;
}

.from-red-500 {
  --tw-gradient-from: #ef4444;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(239, 68, 68, 0));
}

.to-red-600 {
  --tw-gradient-to: #dc2626;
}

.from-red-600 {
  --tw-gradient-from: #dc2626;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(220, 38, 38, 0));
}

.to-red-800 {
  --tw-gradient-to: #991b1b;
}

.from-red-800 {
  --tw-gradient-from: #991b1b;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(153, 27, 27, 0));
}

.to-red-900 {
  --tw-gradient-to: #7f1d1d;
}

.from-red-950\/20 {
  --tw-gradient-from: rgba(69, 10, 10, 0.2);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(69, 10, 10, 0));
}

.to-red-900\/20 {
  --tw-gradient-to: rgba(127, 29, 29, 0.2);
}

/* Dark theme specific */
.dark .from-red-950\/20 {
  --tw-gradient-from: rgba(69, 10, 10, 0.2);
}

.dark .to-red-900\/20 {
  --tw-gradient-to: rgba(127, 29, 29, 0.2);
}

.dark .from-red-800 {
  --tw-gradient-from: #991b1b;
}

.dark .to-red-900 {
  --tw-gradient-to: #7f1d1d;
}

/* Background utilities */
.bg-white\/80 { background-color: rgba(255, 255, 255, 0.8); }
.bg-white\/20 { background-color: rgba(255, 255, 255, 0.2); }
.bg-white\/10 { background-color: rgba(255, 255, 255, 0.1); }
.bg-black\/50 { background-color: rgba(0, 0, 0, 0.5); }
.bg-black\/20 { background-color: rgba(0, 0, 0, 0.2); }

/* Backdrop utilities */
.backdrop-blur-sm { backdrop-filter: blur(4px); }

/* Animation */
.animate-spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Transform utilities */
.transform { transform: var(--tw-transform); }
.rotate-12 { transform: rotate(12deg); }
.-translate-y-1\/2 { transform: translateY(-50%); }
.translate-x-full { transform: translateX(100%); }

/* Positioning */
.top-0 { top: 0; }
.top-2 { top: 0.5rem; }
.top-4 { top: 1rem; }
.top-1\/2 { top: 50%; }
.right-0 { right: 0; }
.right-2 { right: 0.5rem; }
.right-4 { right: 1rem; }
.bottom-2 { bottom: 0.5rem; }
.left-2 { left: 0.5rem; }
.left-3 { left: 0.75rem; }
.-top-1 { top: -0.25rem; }
.-top-4 { top: -1rem; }
.-right-1 { right: -0.25rem; }
.-right-4 { right: -1rem; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }

/* Responsive Grid */
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:flex { display: flex; }
  .md\:hidden { display: none; }
  .md\:flex-row { flex-direction: row; }
  .md\:max-w-lg { max-width: 32rem; }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:text-6xl { font-size: 3.75rem; }
  .lg\:flex { display: flex; }
  .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
}

@media (max-width: 639px) {
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .sm\:w-96 { width: 24rem; }
  .sm\:flex-row { flex-direction: row; }
  .sm\:mt-0 { margin-top: 0; }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .grid-cols-1 { grid-template-columns: 1fr; }
  .text-4xl { font-size: 2rem; }
  .text-6xl { font-size: 2.5rem; }
  .py-20 { padding-top: 3rem; padding-bottom: 3rem; }
  .py-16 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
}

/* Focus states */
.focus\:outline-none:focus { outline: none; }
.focus\:ring-2:focus { box-shadow: 0 0 0 3px var(--ring); }
.focus\:ring-red-800:focus { box-shadow: 0 0 0 3px rgba(153, 27, 27, 0.5); }

/* Object fit */
.object-fit { object-fit: cover; }

/* Line height */
.leading-none { line-height: 1; }

/* Max height */
.max-h-\[90vh\] { max-height: 90vh; }

/* Fill */
.fill-red-500 { fill: #ef4444; }

/* Text decoration */
.underline { text-decoration: underline; }
.line-through { text-decoration: line-through; }

/* Text transform */
.uppercase { text-transform: uppercase; }

/* Opacity */
.opacity-75 { opacity: 0.75; }
.opacity-90 { opacity: 0.9; }

/* Custom component styles */
.toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  z-index: 60;
  min-width: 300px;
  animation: slideIn 0.3s ease-out;
}

.toast.success {
  border-left: 4px solid #10b981;
}

.toast.error {
  border-left: 4px solid #ef4444;
}

.toast.info {
  border-left: 4px solid #3b82f6;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--muted);
}

::-webkit-scrollbar-thumb {
  background: var(--muted-foreground);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--foreground);
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
}