/* Custom fonts */
@font-face {
    font-family: 'PP Hatton';
    src: url('/fonts/PPHatton-Ultrabold.woff2') format('woff2'),
         url('/fonts/PPHatton-Ultrabold.woff') format('woff');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PP Hatton';
    src: url('/fonts/PP Hatton Ultralight 200.otf') format('opentype');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PP Hatton';
    src: url('/fonts/PP Hatton Medium 500.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PP Hatton';
    src: url('/fonts/PP Hatton Bold 700.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Charlotte';
    src: url('/fonts/Charlotte.woff2') format('woff2'),
         url('/fonts/Charlotte.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Font utility classes */
.font-display {
    font-family: 'PP Hatton', serif;
    font-weight: 800;
}

.font-script {
    font-family: 'Charlotte', cursive;
}

/* Navigation font (Hatton italic) */
.font-nav {
    font-family: 'PP Hatton', serif;
    font-style: italic;
    font-weight: 500; /* medium weight */
}

/* Icon stroke utility */
.icon-stroke {
    stroke: var(--primary-red);
    stroke-width: 1.5;
    fill: none;
}

:root {
    --primary-green: #2F5233;
    --primary-red: #E9425C;
    --light-green: #E8F5E9;
    --light-red: #FFEBEE;
    --accent-green: #4CAF50;
    --accent-red: #e53935;
    --text-dark: #333;
    --text-light: #fff;
    --border-color: #ddd;
    --hover-bg: rgba(255, 255, 255, 0.1);
    --space-section: 4rem; /* default vertical padding for major sections on desktop */
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header Styles */
.site-header {
    background-color: #ffffff;
    padding: 0.75rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 50;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.logo {
    color: var(--primary-red);
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    font-family: 'PP Hatton', serif;
}

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

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-family: 'PP Hatton', serif;
    font-style: italic;
    position: relative;
    transition: color 0.2s;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: var(--primary-red);
    transition: width 0.2s ease;
}

.nav-links a:hover {
    color: var(--primary-red);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.language-btn {
    padding: 0.25rem 0.75rem;
    border: 2px solid var(--primary-red);
    border-radius: 0.375rem;
    color: var(--primary-red);
    font-weight: 600;
    transition: all 0.2s ease;
    background: transparent;
}

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

.language-btn.active {
    background: var(--primary-red);
    color: #fff;
}

/* Footer Styles */
.site-footer {
    background-color: var(--primary-red);
    color: white;
    padding: 1.5rem 0;
    margin-top: 2rem;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 1rem;
}

.footer-section {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.footer-section a {
    color: white;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: var(--light-red);
}

.footer-bottom {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.875rem;
}

/* Hero Section */
.hero-section {
    background-color: #ffffff;
    color: var(--text-dark);
    padding: 3rem 0;
    border-top: 4px solid var(--primary-red);
}

.hero-section h1,
.hero-section p {
    color: var(--text-dark);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Image Gallery */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.gallery-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.gallery-image:hover {
    transform: scale(1.05);
}

.main-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 0.5rem;
}

/* Variations */
.variation-option {
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.variation-option:hover {
    border-color: #4a5568;
}

.variation-option.selected {
    border-color: #2d3748;
    background-color: #2d3748;
    color: white;
}

.variation-option.unavailable {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Quantity Input */
.quantity-input {
    width: 80px;
    text-align: center;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.5rem;
    transition: border-color 0.2s;
}

.quantity-input:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 1px var(--primary-red);
}

/* Add to Cart Button */
.add-to-cart-btn {
    background-color: var(--primary-red);
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    display: inline-block;
    width: 100%;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: background-color 0.2s, transform 0.2s;
}

.add-to-cart-btn:hover {
    background-color: #d83c54;
    transform: scale(1.03);
}

.add-to-cart-btn:disabled {
    background-color: #a0aec0;
    cursor: not-allowed;
    pointer-events: none;
}

/* Waitlist button */
.join-waitlist-btn {
    background-color: var(--primary-red);
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    display: inline-block;
    width: 100%;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: background-color 0.2s, transform 0.2s;
}

.join-waitlist-btn:hover {
    background-color: #d83c54;
    transform: scale(1.03);
}

/* Loading Animation */
.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

/* Product Container */
.product-container {
    background-color: transparent;
    padding: 0;
}

/* Individual Product Card */
.product-card {
    background: #ffffff;
    border: 1px solid #e5e7eb; /* gray-200 */
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.product-card h3 {
    font-family: 'PP Hatton', serif;
    font-weight: 600;
    font-size: 1.25rem;
}

/* Typography */
.product-title {
    font-size: 1.875rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.product-description {
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Error and Success States */
.error-message {
    color: #e53e3e;
    text-align: center;
    padding: 2rem 0;
}

.error-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.success-message {
    color: #38a169;
    text-align: center;
    padding: 2rem 0;
}

/* Spacing Utilities */
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-8 { gap: 2rem; }

/* Responsive Design */
@media (max-width: 768px) {
    .main-nav {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        justify-content: center;
    }

    .footer-section {
        flex-direction: column;
        gap: 0.25rem;
        align-items: center;
    }

    .footer-section a,
    .footer-bottom {
        font-size: 0.875rem;
    }

    .footer-section span {
        display: none;
    }

    .footer-bottom {
        margin-top: 0.5rem;
    }

    :root { --space-section: 2.5rem; }

    /* Large header scrolls with content on mobile */
    .site-header {
        position: static;
        top: auto;
        z-index: auto;
    }

    /* Compact sticky bar shown after scroll */
    .compact-header {
        /* Note: base styles now defined globally; keep this block empty or remove */
    }
    .compact-header.visible {}

    /* Reset logo back to sticky within header rather than fixed */
    .site-header .logo {
        position: static;
        top: auto;
        left: auto;
        right: auto;
    }

    /* Remove body padding that was added previously */
    body {
        padding-top: 0;
    }

    /* Collapsed variant when nav should be hidden (class added via JS) */
    .site-header.collapsed {
        padding-top: 0.25rem; /* slimmer vertical padding */
        padding-bottom: 0.25rem;
    }
    .site-header.collapsed .nav-links,
    .site-header.collapsed .language-switcher {
        display: none;
    }
}

/* Mobile grid: one card per row at small phone widths */
@media (max-width: 640px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

/* Cart Styles */
.cart-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-count {
    background-color: var(--primary-red);
    color: white;
    border-radius: 50%;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    min-width: 1.5rem;
    text-align: center;
}

.cart-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 1rem 0;
}

.cart-dropdown.hidden {
    display: none;
}

.cart-items {
    max-height: 400px;
    overflow-y: auto;
}

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

.cart-item button {
    color: var(--primary-red);
    font-size: 1.5rem;
    padding: 0.25rem 0.5rem;
    border: none;
    background: none;
    cursor: pointer;
}

.cart-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.cart-total {
    font-weight: bold;
    font-size: 1.25rem;
}

/* Primary checkout/pay button */
.checkout-btn {
    background-color: var(--primary-red);
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: background-color 0.2s, transform 0.2s;
}

.checkout-btn:hover {
    background-color: #d83c54;
    transform: scale(1.03);
}

/* Toast container for non-blocking notifications */
#toast-container {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 10000;
}

/* Toast message styles */
.toast {
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  color: #fff;
  font-weight: 500;
  opacity: 0.95;
}

.toast.success {
  background-color: #16a34a; /* green-600 */
}

.toast.error {
  background-color: #dc2626; /* red-600 */
}

/* Button system */
.btn, .btn-primary {
    --btn-bg: var(--primary-red);
    --btn-text: #fff;
    background: var(--btn-bg);
    color: var(--btn-text);
    border: 2px solid transparent;
    padding: 0.75rem 2rem;
    border-radius: 9999px; /* pill */
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.2s, color 0.2s;
}

.btn:hover, .btn-primary:hover {
    transform: scale(1.05);
    filter: brightness(0.95);
}

/* Outline modifier */
.btn--outline {
    --btn-bg: transparent;
    --btn-text: var(--primary-red);
    color: var(--btn-text);
    border-color: var(--primary-red);
}

.text-brand {
    color: var(--primary-red);
}

/* ===============================
   Desktop refinements (≥1024 px)
   =============================== */
@media (min-width: 1024px) {
    /* Slightly shrink the overall scale so the layout breathes more */
    html {
        font-size: 15px; /*  ~6-7 % smaller than the default 16 px  */
    }

    /* Give the hero content more horizontal padding so the text block doesn't span too wide */
    .hero-section .container {
        padding-left: 6vw;
        padding-right: 6vw;
    }

    /* Tweak headline sizes/spacing for a calmer look */
    .hero-section h1 .h-script-lg {
        font-size: 5.5rem;   /* override for large desktop */
        line-height: 1.1;
    }
    .hero-section h1 .h-display-lg {
        font-size: 4.75rem;
        line-height: 1.1;
        margin-top: -0.5rem;
        margin-left: 2.5rem;
    }

    /* Navigation tweaks – a little tighter & lower profile */
    .site-header {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    .main-nav .nav-links {
        gap: 1.5rem; /* was 2rem */
    }
}

/* Let content stretch slightly more on very large screens */
@media (min-width: 1280px) {
    .container {
        max-width: 1440px;
    }
}

/* ========== Generic section spacing utilities ========== */
.section {
    padding-block: var(--space-section);
}

@media (max-width: 768px) {
    :root { --space-section: 2.5rem; }
}

.section--border {
    border-inline-start: 4px solid var(--primary-red);
    padding-inline-start: 1.5rem; /* matches Tailwind pl-6 */
}

/* ========== Typography Tokens ========== */
.h-script-lg {
    font-family: 'Charlotte', cursive;
    color: var(--primary-red);
    font-weight: 400;
    font-size: 4.5rem; /* mobile */
    line-height: 1.1;
}
@media (min-width: 768px) {
    .h-script-lg { font-size: 5.5rem; }
}

.h-script-md {
    font-family: 'Charlotte', cursive;
    color: var(--primary-red);
    font-weight: 400;
    font-size: 3.75rem;
    line-height: 1.1;
}
@media (min-width: 768px) {
    .h-script-md { font-size: 5rem; }
}

.h-display-lg {
    font-family: 'PP Hatton', serif;
    color: var(--primary-red);
    font-weight: 800;
    font-size: 3.75rem;
    line-height: 1.1;
}
@media (min-width: 768px) {
    .h-display-lg { font-size: 5rem; }
}

.h-display-md {
    font-family: 'PP Hatton', serif;
    color: var(--primary-red);
    font-weight: 800;
    font-size: 2.25rem;
    line-height: 1.2;
}
@media (min-width: 768px) {
    .h-display-md { font-size: 3rem; }
}

/* Adjust hero headline sizing (after new token classes) */
@media (min-width: 1024px) {
    .hero-section h1 .h-script-lg {
        font-size: 5.5rem; /* same as before */
    }
    .hero-section h1 .h-display-lg {
        font-size: 4.75rem;
    }
}

/* Reduce root font size a bit further on ultra-wide desktop screens */
@media (min-width: 1536px) {
    html { font-size: 14px; }
}

/* Compact header base (hidden by default) */
.compact-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 60;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-100%);
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.compact-header.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* Hide compact header entirely on desktop */
@media (min-width: 769px) {
    .compact-header { display: none; }
} 