/*
Theme Name: Simply Sour custom theme by Gravity Projex
Theme URI: https://simplysour.com.au
Description: An artisan sourdough bread bakery theme with subscription management
Author: Gravity Projex
Author URI: https://gravityprojex.com.au
Version: 4.0.0
Text Domain: simplysour
License: Copyright (c) Gravity Projex 2026
Tags: bakery, artisan, sourdough, subscription, local
PROPRIETARY SOFTWARE LICENSE
Copyright (c) 2025 Gravity Projex / Michelle Smith. All Rights Reserved.
CONTACT: admin@gravityprojex.com | Website: https://gravityprojex.com
*/

:root {
  --ss-primary: #FBD1A7;
  --ss-primary-hover: #f5c08a;
  --ss-primary-muted: rgba(251,209,167,0.12);
  --ss-dark: #353C42;
  --ss-gray: #607178;
  --ss-light-gray: #7a8b92;
  --ss-bg: #ffffff;
  --ss-bg-warm: #faf9f7;
  --ss-border: #d9dfe2;
  --ss-white: #ffffff;
  --ss-danger: #d9534f;
  --ss-success: #4a9e7a;
  --ss-warning: #e6a23c;
  --ss-info: #607178;
  --header-height: 72px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--ss-dark);
  background: var(--ss-bg);
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4,h5,h6 { font-family: 'Oswald', -apple-system, sans-serif; font-weight: 700; line-height: 1.15; text-transform: uppercase; letter-spacing: 0.02em; }
a { color: inherit; text-decoration: none; }
.serif { font-family: 'DM Serif Display', Georgia, serif; font-style: italic; color: var(--ss-primary); font-weight: 400; text-transform: none; letter-spacing: normal; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }

/* === HEADER === */
.site-header { background: var(--ss-white); border-bottom: 1px solid var(--ss-border); position: sticky; top: 0; z-index: 1000; height: var(--header-height); }
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
.header-logo img { height: 40px; width: auto; display: block; }
.header-logo-text { font-size: 1.5rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ss-dark); }

.main-nav { display: flex; align-items: center; }
.main-nav ul { display: flex; list-style: none; gap: 2rem; align-items: center; }
.main-nav li { margin: 0; }
.main-nav a { color: var(--ss-gray); font-size: 0.9375rem; font-weight: 500; transition: color 0.2s; }
.main-nav a:hover { color: var(--ss-dark); }

.header-actions { display: flex; align-items: center; gap: 0.75rem; }
#cart-toggle { position: relative; background: none; border: 1.5px solid var(--ss-border); border-radius: 50%; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; padding: 0; }
#cart-toggle:hover { border-color: var(--ss-gray); }
#cart-toggle svg { width: 20px; height: 20px; stroke: var(--ss-dark); }
#cart-count { position: absolute; top: -6px; right: -6px; background: var(--ss-primary); color: var(--ss-dark); width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.6875rem; font-weight: 700; }

.hamburger { display: none; background: none; border: none; cursor: pointer; width: 44px; height: 44px; padding: 10px; flex-direction: column; justify-content: center; gap: 5px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--ss-dark); transition: all 0.3s; border-radius: 2px; }
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav-overlay { display: none; position: fixed; top: var(--header-height); left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.4); z-index: 998; opacity: 0; transition: opacity 0.3s; }
.mobile-nav-overlay.open { opacity: 1; }
.mobile-nav { display: none; position: fixed; top: var(--header-height); left: 0; right: 0; background: var(--ss-white); z-index: 999; transform: translateY(-100%); transition: transform 0.3s ease; border-bottom: 1px solid var(--ss-border); box-shadow: 0 8px 24px rgba(0,0,0,0.08); max-height: calc(100vh - var(--header-height)); overflow-y: auto; }
.mobile-nav.open { transform: translateY(0); }
.mobile-nav ul { list-style: none; padding: 0.5rem 0; }
.mobile-nav li { border-bottom: 1px solid var(--ss-border); }
.mobile-nav li:last-child { border-bottom: none; }
.mobile-nav a { display: block; padding: 1rem 1.5rem; color: var(--ss-dark); font-size: 1.0625rem; font-weight: 500; transition: background 0.2s; }
.mobile-nav a:hover { background: var(--ss-bg); }

@media (max-width: 768px) {
  .main-nav { display: none; }
  .hamburger { display: flex; }
  .mobile-nav { display: block; }
  .mobile-nav-overlay { display: block; pointer-events: none; }
  .mobile-nav-overlay.open { pointer-events: auto; }
}

/* === BUTTONS === */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.875rem 2rem; background: var(--ss-primary); color: var(--ss-dark); border: 2px solid transparent; border-radius: 9999px; font-family: inherit; font-size: 0.9375rem; font-weight: 600; text-decoration: none; cursor: pointer; transition: all 0.25s; white-space: nowrap; line-height: 1; }
.btn:hover { background: var(--ss-primary-hover); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(251,209,167,0.35); }
.btn-outline { background: transparent; border-color: var(--ss-gray); color: var(--ss-gray); }
.btn-outline:hover { background: var(--ss-primary-muted); border-color: var(--ss-primary); color: var(--ss-dark); transform: translateY(-2px); }
.btn-dark { background: var(--ss-dark); color: var(--ss-white); }
.btn-dark:hover { background: #2a2f34; box-shadow: 0 6px 16px rgba(53,60,66,0.3); }
.btn-sm { padding: 0.5rem 1.25rem; font-size: 0.8125rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* === HERO === */
.hero-split { padding: 3.5rem 0 4.5rem; background: var(--ss-bg); }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.hero-text { max-width: 560px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1.25rem; background: var(--ss-primary-muted);
  border-radius: 9999px; margin-bottom: 2rem;
}
.hero-badge span { font-size: 0.875rem; font-weight: 500; color: var(--ss-light-gray); }
.hero-heading {
  font-size: 3.75rem; font-weight: 300; line-height: 1.08;
  margin-bottom: 1.5rem; letter-spacing: -0.02em;
}
.hero-heading .serif { font-size: inherit; font-weight: 400; }
.hero-desc {
  font-size: 1.125rem; color: var(--ss-gray); line-height: 1.75;
  margin-bottom: 2rem; max-width: 480px;
}
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-image { position: relative; }
.hero-image-wrap {
  position: relative; border-radius: 1.5rem; overflow: hidden;
  box-shadow: 0 20px 50px rgba(45,45,45,0.12);
}
.hero-image-wrap img { width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block; }
.bake-day-badge {
  position: absolute; bottom: 1.5rem; right: 1.5rem;
  background: rgba(255,255,255,0.96); backdrop-filter: blur(8px);
  padding: 0.75rem 1.25rem; border-radius: 0.75rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.bake-day-label { display: block; font-size: 0.6875rem; color: var(--ss-gray); text-transform: uppercase; letter-spacing: 0.06em; line-height: 1; margin-bottom: 0.25rem; }
.bake-day-value { display: block; font-size: 1.125rem; font-weight: 700; color: var(--ss-dark); line-height: 1; }

@media (max-width: 968px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; text-align: center; }
  .hero-text { max-width: 100%; margin: 0 auto; }
  .hero-heading { font-size: 2.75rem; }
  .hero-desc { margin-inline: auto; }
  .hero-buttons { justify-content: center; }
  .hero-image-wrap { max-width: 480px; margin: 0 auto; }
}
@media (max-width: 480px) { .hero-heading { font-size: 2.25rem; } .hero-split { padding: 2rem 0 3rem; } }

/* Old hero (index.php fallback) */
.hero-section { background: var(--ss-dark); color: white; padding: 4rem 0; text-align: center; }
.hero-section h1 { font-size: 2.75rem; font-weight: 300; margin-bottom: 1rem; }
.hero-section .serif { color: var(--ss-primary); }
.hero-section p { font-size: 1.125rem; opacity: 0.8; margin-bottom: 2rem; }
@media (max-width: 768px) { .hero-section { padding: 3rem 0; } .hero-section h1 { font-size: 2rem; } }

/* === SECTIONS === */
.section { padding: 4rem 0; }
.section-title { font-size: 2.25rem; font-weight: 300; text-align: center; margin-bottom: 1rem; }
.section-title .serif { color: var(--ss-primary); }
.section-description { text-align: center; color: var(--ss-gray); max-width: 600px; margin: 0 auto 2.5rem; font-size: 1.0625rem; line-height: 1.7; }
.text-center { text-align: center; }

/* === PRODUCT GRID === */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; padding: 1rem 0; }
.product-card { background: white; border-radius: 1rem; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.06); transition: all 0.3s; border: 1px solid var(--ss-border); }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0,0,0,0.08); border-color: transparent; }
.product-card img { width: 100%; height: 280px; object-fit: cover; }
.product-info { padding: 1.5rem; }
.product-title { font-size: 1.0625rem; font-weight: 600; margin-bottom: 0.5rem; }
.product-desc { color: var(--ss-gray); font-size: 0.875rem; margin-bottom: 0.75rem; line-height: 1.6; }
.product-price { font-size: 1.25rem; font-weight: 700; color: var(--ss-dark); margin-bottom: 1rem; }
.product-badge { display: inline-block; padding: 0.25rem 0.75rem; background: var(--ss-dark); color: var(--ss-white); font-size: 0.75rem; font-weight: 600; border-radius: 9999px; margin-bottom: 0.75rem; }

/* === FEATURES === */
.features-section { padding: 4rem 0; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; text-align: center; }
.feature-icon { width: 4rem; height: 4rem; background: var(--ss-primary-muted); border-radius: 1rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; transition: all 0.3s; }
.feature-icon svg { width: 2rem; height: 2rem; color: var(--ss-gray); stroke: var(--ss-gray); }
.features-grid > div:hover .feature-icon { background: rgba(251,209,167,0.22); transform: scale(1.05); }

/* === SUBSCRIPTIONS === */
.subscription-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; padding: 1rem 0; }
.subscription-card { background: white; border: 2px solid var(--ss-border); border-radius: 1rem; padding: 2rem; transition: all 0.3s; }
.subscription-card:hover { border-color: var(--ss-dark); transform: translateY(-4px); box-shadow: 0 12px 32px rgba(53,60,66,0.1); }
.subscription-card.featured { border-color: var(--ss-dark); position: relative; }
.subscription-card.featured::before { content: 'Most Popular'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--ss-dark); color: var(--ss-white); padding: 0.25rem 1rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; }
.subscription-title { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.5rem; }
.subscription-price { font-size: 2rem; font-weight: 700; color: var(--ss-dark); margin-bottom: 1rem; }
.subscription-price span { font-size: 1rem; font-weight: 400; color: var(--ss-gray); }
.subscription-features { list-style: none; margin-bottom: 1.5rem; }
.subscription-features li { padding: 0.5rem 0; color: var(--ss-gray); display: flex; align-items: center; gap: 0.5rem; }
.subscription-features li::before { content: '✓'; color: var(--ss-gray); font-weight: 700; }

/* === FOOTER === */
.site-footer { background: var(--ss-white); border-top: 1px solid var(--ss-border); padding: 3.5rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.footer-brand img { max-height: 60px; width: auto; margin-bottom: 1rem; }
.footer-brand p { color: var(--ss-gray); font-size: 0.875rem; line-height: 1.7; }
.footer-col h4 { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ss-dark); margin-bottom: 1rem; }
.footer-col a { display: block; padding: 0.35rem 0; color: var(--ss-gray); font-size: 0.9375rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--ss-dark); }
.footer-col p { color: var(--ss-gray); font-size: 0.9375rem; line-height: 1.7; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 1.5rem; border-top: 1px solid var(--ss-border); flex-wrap: wrap; gap: 1rem; }
.footer-bottom p { font-size: 0.8125rem; color: var(--ss-light-gray); }
.footer-bottom a { color: var(--ss-gray); font-weight: 600; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* === FORMS === */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; margin-bottom: 0.5rem; font-weight: 600; color: var(--ss-dark); font-size: 0.9375rem; }
.form-input, .form-textarea, .form-select { width: 100%; padding: 0.75rem 1rem; border: 1.5px solid var(--ss-border); border-radius: 0.625rem; font-family: inherit; font-size: 1rem; transition: border-color 0.2s; background: var(--ss-white); }
.form-input:focus, .form-textarea:focus, .form-select:focus { outline: none; border-color: var(--ss-primary); }
.form-textarea { resize: vertical; min-height: 120px; }

/* === BADGES === */
.badge { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-gray { background: #f3f4f6; color: #374151; }

/* === PORTAL === */
.portal-layout { display: grid; grid-template-columns: 260px 1fr; min-height: calc(100vh - var(--header-height)); }
.portal-sidebar { background: var(--ss-white); border-right: 1px solid var(--ss-border); padding: 2rem 1.25rem; position: sticky; top: var(--header-height); height: calc(100vh - var(--header-height)); overflow-y: auto; }
.portal-sidebar h2 { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.25rem; }
.portal-sidebar .portal-user { font-size: 0.875rem; color: var(--ss-gray); margin-bottom: 1.5rem; }
.portal-nav { display: flex; flex-direction: column; gap: 0.25rem; }
.portal-nav a { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; border-radius: 0.5rem; font-size: 0.9375rem; font-weight: 500; color: var(--ss-gray); transition: all 0.2s; }
.portal-nav a:hover { background: rgba(96,113,120,0.06); color: var(--ss-dark); }
.portal-nav a.active { background: rgba(96,113,120,0.1); color: var(--ss-dark); font-weight: 600; }
.portal-nav svg { width: 20px; height: 20px; flex-shrink: 0; }
.portal-nav-divider { height: 1px; background: var(--ss-border); margin: 0.75rem 0; }
.portal-main { padding: 2rem 2.5rem; background: var(--ss-bg); min-height: 100%; }
.portal-main h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 1.5rem; }
.portal-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin-bottom: 2rem; }
.portal-stat { background: var(--ss-white); border: 1px solid var(--ss-border); border-radius: 0.75rem; padding: 1.5rem; }
.portal-stat .stat-value { font-size: 2rem; font-weight: 800; line-height: 1; margin-bottom: 0.25rem; }
.portal-stat .stat-label { font-size: 0.875rem; color: var(--ss-gray); }
.portal-table { width: 100%; background: var(--ss-white); border-radius: 0.75rem; overflow: hidden; border: 1px solid var(--ss-border); border-collapse: collapse; }
.portal-table th { background: var(--ss-bg); padding: 0.875rem 1.25rem; text-align: left; font-size: 0.75rem; font-weight: 700; color: var(--ss-light-gray); text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--ss-border); }
.portal-table td { padding: 0.875rem 1.25rem; font-size: 0.9375rem; border-bottom: 1px solid var(--ss-border); vertical-align: middle; }
.portal-table tr:last-child td { border-bottom: none; }
.portal-table tr:hover td { background: rgba(96,113,120,0.02); }
.portal-section { display: none; }
.portal-section.active { display: block; }
.portal-form { background: var(--ss-white); border: 1px solid var(--ss-border); border-radius: 0.75rem; padding: 2rem; margin-bottom: 1.5rem; }
.portal-form h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 1.5rem; }
.portal-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 968px) {
  .portal-layout { grid-template-columns: 1fr; }
  .portal-sidebar { position: static; height: auto; display: none; border-right: none; border-bottom: 1px solid var(--ss-border); }
  .portal-sidebar.open { display: block; }
  .portal-main { padding: 1.5rem; }
  .portal-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .portal-form-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) { .portal-stat-grid { grid-template-columns: 1fr; } }

/* === TOAST === */
.ss-toast { position: fixed; top: 1.25rem; right: 1.25rem; background: var(--ss-success); color: white; padding: 1rem 1.5rem; border-radius: 0.625rem; box-shadow: 0 8px 24px rgba(0,0,0,0.15); z-index: 10001; font-weight: 600; font-size: 0.9375rem; transform: translateY(-20px); opacity: 0; transition: all 0.3s; pointer-events: none; }
.ss-toast.active { transform: translateY(0); opacity: 1; }
.ss-toast.error { background: var(--ss-danger); }

/* === CONTACT === */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.contact-info-card { background: var(--ss-white); border: 1px solid var(--ss-border); border-radius: 0.75rem; padding: 1.5rem; margin-bottom: 1rem; }
.contact-info-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.25rem; }
.contact-info-card p { color: var(--ss-gray); font-size: 0.9375rem; }
@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; } }

/* === ABOUT === */
.about-content { max-width: 720px; margin: 0 auto; }
.about-content p { font-size: 1.0625rem; color: var(--ss-gray); line-height: 1.8; margin-bottom: 1.5rem; }

/* === HONEYPOT === */
.ss-hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; overflow: hidden; }

/* === PRINT === */
@media print { .site-header, .site-footer, #cart-sidebar, #cart-overlay, #checkout-modal, .mobile-nav, .ss-toast, .hamburger { display: none !important; } }
body.admin-bar .site-header { top: 32px; }
body.admin-bar .mobile-nav, body.admin-bar .mobile-nav-overlay { top: calc(var(--header-height) + 32px); }
@media (max-width: 782px) { body.admin-bar .site-header { top: 46px; } body.admin-bar .mobile-nav, body.admin-bar .mobile-nav-overlay { top: calc(var(--header-height) + 46px); } }

/* ============================================================
   RECIPE PORTAL — Dashboard styles
   ============================================================ */
.recipe-portal-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
/* Recipe list card hover */
#recipe-list-grid > div:hover {
    box-shadow: 0 4px 16px rgba(53,60,66,0.08);
}
