/* ============================================================
   THEME VARIABLES - edit these to restyle the whole site
   ============================================================ */
:root {
    /* Brand colours - Aussie green and gold */
    --color-primary: #006747;        /* Wattle green (deep) */
    --color-primary-dark: #004d35;   /* Darker green for hover */
    --color-accent: #FFB81C;         /* Wattle gold */
    --color-accent-dark: #e0a000;    /* Darker gold */

    /* Neutrals */
    --color-text: #1a1a1a;
    --color-text-muted: #555;
    --color-text-subtle: #888;
    --color-bg: #fafaf6;             /* Warm off-white */
    --color-card: #ffffff;
    --color-border: #e6e4dc;
    --color-image-bg: #f0efe7;

    /* Typography */
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* Layout */
    --max-width: 1200px;
    --radius: 8px;
    --radius-sm: 6px;
}

/* ============================================================
   RESET
   ============================================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-stack);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.5;
}

/* ============================================================
   HEADER
   ============================================================ */
header {
    background: var(--color-card);
    border-bottom: 3px solid var(--color-accent);
    padding: 1.5rem 2rem;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: -0.02em;
    text-decoration: none;
}

.logo span {
    color: var(--color-accent-dark);
}

nav a {
    color: var(--color-text-muted);
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.95rem;
}

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

nav a.nav-active {
    color: var(--color-primary);
    font-weight: 600;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 2rem 2rem;
    text-align: center;
}

.hero h1 {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
    color: var(--color-primary);
}

.hero p {
    color: var(--color-text-muted);
    font-size: 1.05rem;
}

/* ============================================================
   PRODUCT GRID
   ============================================================ */
main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.product {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-image {
    aspect-ratio: 1 / 1;
    background: var(--color-image-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.product-info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-rank {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-accent-dark);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.product-desc {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
    flex: 1;
}

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

/* ============================================================
   ERROR PAGE
   ============================================================ */
.error-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
}

.error-container {
    max-width: 560px;
    text-align: center;
}

.error-code {
    font-size: 6rem;
    font-weight: 800;
    color: var(--color-accent-dark);
    letter-spacing: -0.05em;
    line-height: 1;
    margin-bottom: 1rem;
}

.error-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.error-message {
    color: var(--color-text-muted);
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

.error-message em {
    font-style: italic;
    color: var(--color-primary);
    font-weight: 600;
}

.home-link {
    display: inline-block;
    background: var(--color-primary);
    color: #ffffff;
    text-decoration: none;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
}

.home-link:hover {
    background: var(--color-primary-dark);
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    max-width: var(--max-width);
    width: 100%;
    margin: 2rem auto 0;
    padding: 2rem;
    text-align: center;
    color: var(--color-text-subtle);
    font-size: 0.85rem;
    border-top: 1px solid var(--color-border);
}

footer a {
    color: var(--color-text-subtle);
    text-decoration: underline;
    text-decoration-style: dotted;
}

footer a:hover {
    color: var(--color-primary);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
    .hero h1 { font-size: 1.75rem; }
    .error-code { font-size: 4.5rem; }
    .error-title { font-size: 1.4rem; }
    nav a { margin-left: 1rem; font-size: 0.85rem; }
}

/* ============================================================
   HERO CTA
   ============================================================ */
.hero-cta {
    display: inline-block;
    background: var(--color-primary);
    color: #ffffff;
    text-decoration: none;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    margin-top: 1.5rem;
}

.hero-cta:hover {
    background: var(--color-primary-dark);
}

/* ============================================================
   FEATURED PREVIEW ON HOMEPAGE
   ============================================================ */
.featured-preview {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.featured-preview h2 {
    text-align: center;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-size: 1.5rem;
}

/* ============================================================
   SHOP PAGE
   ============================================================ */
.shop {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 2rem;
}

.shop h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
    text-align: center;
}

.shop-subtitle {
    color: var(--color-text-muted);
    font-size: 1.05rem;
    margin-bottom: 2rem;
    text-align: center;
}

/* ============================================================
   CART PLACEHOLDER
   ============================================================ */
.cart {
    max-width: 600px;
    margin: 0 auto;
    padding: 4rem 2rem;
    text-align: center;
}

.cart h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.cart p {
    color: var(--color-text-muted);
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.cart-note {
    color: var(--color-text-subtle);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

/* ============================================================
   ABOUT / CONTACT TEXT PAGES
   ============================================================ */
.text-page {
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.text-page h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    color: var(--color-primary);
    text-align: center;
}

.text-page p {
    color: var(--color-text);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.text-page p:last-child {
    margin-bottom: 0;
}

.text-page em {
    color: var(--color-primary);
    font-weight: 600;
    font-style: italic;
}

.text-page a {
    color: var(--color-primary);
}

/* ============================================================
   RESPONSIVE - additional pages
   ============================================================ */
@media (max-width: 600px) {
    .shop h1 { font-size: 1.5rem; }
    .text-page h1 { font-size: 1.5rem; }
    .cart h1 { font-size: 1.5rem; }
}

/* Featured grid on the homepage: centre the three cards instead of
   leaving empty grid tracks to the right */
.featured-preview .product-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 280px));
    justify-content: center;
}

/* ============================================================
   CART ITEMS (v1.2 working cart)
   ============================================================ */
.cart-items {
    text-align: left;
    margin: 2rem 0 1rem;
}

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

.cart-item img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

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

.cart-item-name { font-weight: 600; }

.cart-item-qty {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.cart-item-line { font-weight: 700; color: var(--color-primary); }

.cart-item-remove {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 1.3rem;
    padding: 0 0.4rem;
}

.cart-item-remove:hover { color: var(--color-primary); }

.cart-total {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 1rem 0 1.5rem;
}

a.add-to-cart {
    display: inline-block;
    text-decoration: none;
    text-align: center;
}
