/* =========================================================
   ORGANIC GROCERY STORE
   GLOBAL DESIGN SYSTEM + COMPONENT STYLES
========================================================= */


/* =========================================================
   LOCAL FONTS
========================================================= */

@font-face {
    font-family: "Manrope";
    src: url("../fonts/Manrope/static/Manrope-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Manrope";
    src: url("../fonts/Manrope/static/Manrope-Medium.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Manrope";
    src: url("../fonts/Manrope/static/Manrope-SemiBold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Manrope";
    src: url("../fonts/Manrope/static/Manrope-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "DM Serif Display";
    src: url("../fonts/DM_Serif_Display/DMSerifDisplay-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "DM Serif Display";
    src: url("../fonts/DM_Serif_Display/DMSerifDisplay-Italic.ttf") format("truetype");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}


/* =========================================================
   GLOBAL RESET
========================================================= */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    min-height: 100vh;

    background:
        var(--color-cream);

    color: var(--color-text);

    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-weight-regular);
    line-height: var(--leading-normal);

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    text-rendering: optimizeLegibility;
}

body,
button,
input,
textarea,
select {
    -webkit-font-smoothing: antialiased;
}

img,
picture,
svg {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    border: 0;
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

main {
    display: block;
}


/* =========================================================
   TYPOGRAPHY
========================================================= */

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-text);
    font-weight: var(--font-weight-bold);
    line-height: var(--leading-tight);
}

h1,
h2 {
    font-family: var(--font-display);
    font-weight: var(--font-weight-regular);
    letter-spacing: var(--tracking-tight);
}

h1 {
    font-size: var(--text-6xl);
}

h2 {
    font-size: var(--text-4xl);
}

h3 {
    font-size: var(--text-2xl);
}

h4 {
    font-size: var(--text-xl);
}

h5 {
    font-size: var(--text-lg);
}

h6 {
    font-size: var(--text-base);
}

p {
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
}

strong,
b {
    font-weight: var(--font-weight-bold);
}

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

.text-muted {
    color: var(--color-text-secondary);
}

.text-center {
    text-align: center;
}


/* =========================================================
   GLOBAL LAYOUT
========================================================= */

.container {
    width: min(
        calc(100% - (var(--container-padding) * 2)),
        var(--container-max-width)
    );

    margin-inline: auto;
}

.section {
    padding-block: var(--space-20);
}

.section-header {
    margin-bottom: var(--space-10);
}

.section-header-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-8);
}

.section-title {
    margin-bottom: var(--space-3);
}

.section-description {
    max-width: var(--content-max-width);
}

.section-header.text-center .section-description {
    margin-inline: auto;
}


/* =========================================================
   BACKGROUND UTILITIES
========================================================= */

.bg-white {
    background-color: var(--color-white);
}

.bg-cream {
    background-color: var(--color-cream);
}

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


/* =========================================================
   EYEBROWS
========================================================= */

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);

    margin-bottom: var(--space-4);

    color: var(--eyebrow-color);

    font-size: var(--text-xs);
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--tracking-widest);
    line-height: 1.2;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";

    width: 22px;
    height: 1px;

    background-color: var(--eyebrow-accent);
}


/* =========================================================
   LINKS
========================================================= */

.text-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);

    color: var(--color-primary);

    font-size: var(--text-sm);
    font-weight: var(--font-weight-bold);

    transition:
        color var(--transition-base),
        gap var(--transition-base);
}

.text-link::after {
    content: "→";

    font-size: 1rem;

    transition: transform var(--transition-base);
}

.text-link:hover {
    color: var(--color-primary-dark);
    gap: var(--space-3);
}

.text-link:hover::after {
    transform: translateX(3px);
}


/* =========================================================
   BUTTONS
========================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);

    min-height: 48px;

    padding-inline: var(--space-6);

    border: 1px solid transparent;
    border-radius: var(--radius-full);

    font-size: var(--text-sm);
    font-weight: var(--font-weight-semibold);
    line-height: 1;

    white-space: nowrap;

    transition:
        background-color var(--transition-base),
        color var(--transition-base),
        border-color var(--transition-base),
        transform var(--transition-fast),
        box-shadow var(--transition-base);
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

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

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background-color: var(--color-sage);
    color: var(--color-text);
}

.btn-secondary:hover {
    background-color: var(--color-primary-light);
    color: var(--color-white);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

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

.btn:disabled,
.btn[disabled] {
    opacity: 0.5;
    pointer-events: none;
}


/* =========================================================
   FORMS
========================================================= */

input,
textarea,
select {
    width: 100%;

    min-height: var(--input-height);

    padding: 0 var(--space-4);

    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);

    background-color: var(--input-background);
    color: var(--color-text);

    outline: none;

    transition:
        border-color var(--transition-base),
        box-shadow var(--transition-base),
        background-color var(--transition-base);
}

textarea {
    min-height: 140px;
    padding-block: var(--space-3);
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: var(--color-text-light);
}

input:hover,
textarea:hover,
select:hover {
    border-color: var(--color-border-dark);
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--input-border-focus);
    box-shadow: var(--focus-ring);
}

input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    min-height: 18px;

    padding: 0;

    accent-color: var(--color-primary);
}


/* =========================================================
   ACCESSIBILITY
========================================================= */

:focus-visible {
    outline: 3px solid rgba(201, 120, 82, 0.5);
    outline-offset: 3px;
}

::selection {
    background-color: var(--selection-background);
    color: var(--selection-color);
}

.sr-only {
    position: absolute;

    width: 1px;
    height: 1px;

    padding: 0;
    margin: -1px;

    overflow: hidden;

    clip: rect(0, 0, 0, 0);
    white-space: nowrap;

    border: 0;
}


/* =========================================================
   SITE HEADER
========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);

    height: var(--header-height);

    background-color: rgba(248, 246, 239, 0.96);

    border-bottom: 1px solid transparent;

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    transition:
        background-color var(--transition-base),
        border-color var(--transition-base),
        box-shadow var(--transition-base);
}

.site-header.is-scrolled {
    background-color: rgba(248, 246, 239, 0.98);
    border-bottom-color: var(--color-border);
    box-shadow: var(--shadow-header);
}

.navbar {
    position: relative;

    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;

    height: 100%;

    gap: var(--space-10);
}


/* =========================================================
   LOGO
========================================================= */

.logo {
    display: inline-block;

    color: var(--color-primary);

    font-family: var(--font-display);
    font-size: 1.85rem;
    line-height: 1;

    letter-spacing: -0.03em;
}

.logo::first-letter {
    color: var(--color-terracotta);
}


/* =========================================================
   DESKTOP NAVIGATION
========================================================= */

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: var(--space-8);
}

.nav-links a {
    position: relative;

    display: inline-flex;
    align-items: center;

    min-height: 44px;

    color: var(--color-text-secondary);

    font-size: var(--text-sm);
    font-weight: var(--font-weight-semibold);

    transition: color var(--transition-base);
}

.nav-links a::after {
    content: "";

    position: absolute;
    left: 0;
    bottom: 4px;

    width: 100%;
    height: 1px;

    background-color: var(--color-primary);

    transform: scaleX(0);
    transform-origin: right;

    transition: transform var(--transition-base);
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: scaleX(1);
    transform-origin: left;
}


/* =========================================================
   NAV ACTIONS
========================================================= */

.nav-actions {
    display: flex;
    align-items: center;

    gap: var(--space-2);
}

.nav-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 40px;

    padding-inline: var(--space-3);

    border-radius: var(--radius-full);

    color: var(--color-text-secondary);

    font-size: var(--text-xs);
    font-weight: var(--font-weight-semibold);

    transition:
        background-color var(--transition-base),
        color var(--transition-base);
}

.nav-actions a:hover {
    background-color: var(--color-sage-light);
    color: var(--color-primary);
}

.nav-actions a:last-child {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.nav-actions a:last-child:hover {
    background-color: var(--color-primary-dark);
}


/* =========================================================
   MOBILE MENU BUTTON
========================================================= */

.menu-toggle {
    display: none;

    width: 44px;
    height: 44px;

    padding: 10px;

    background: transparent;
    border-radius: var(--radius-md);

    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.menu-toggle span {
    display: block;

    width: 21px;
    height: 2px;

    background-color: var(--color-primary);

    border-radius: var(--radius-full);

    transition:
        transform var(--transition-base),
        opacity var(--transition-base);
}

.navbar.nav-open .menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.navbar.nav-open .menu-toggle span:nth-child(2) {
    opacity: 0;
}

.navbar.nav-open .menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* =========================================================
   HERO
========================================================= */

.hero {
    padding-top: var(--space-16);
    padding-bottom: var(--space-24);

    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;

    gap: clamp(3rem, 7vw, 7rem);
}

.hero-copy {
    position: relative;

    max-width: 600px;

    padding-block: var(--space-8);
}

.hero-copy::before {
    content: "";

    position: absolute;

    top: 0;
    left: -80px;

    width: 180px;
    height: 180px;

    border-radius: 50%;

    background-color: var(--color-sage-light);

    opacity: 0.65;

    z-index: -1;
}

.hero h1 {
    max-width: 600px;

    margin-bottom: var(--space-6);

    font-size: clamp(3.4rem, 6vw, 5.5rem);

    line-height: 0.98;
}

.hero-description {
    max-width: 520px;

    margin-bottom: var(--space-8);

    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    gap: var(--space-3);
}
.hero-media {
    position: relative;

    overflow: hidden;

    border-radius: var(--radius-xl);

    background-color: var(--color-sage-light);

    box-shadow: var(--shadow-lg);
}

.hero-media::after {
    content: "";

    position: absolute;
    inset: 0;

    border: 1px solid rgba(255, 255, 255, 0.28);

    border-radius: inherit;

    pointer-events: none;
}

.hero-media img {
    display: block;

    width: 100%;
    height: auto;

    object-fit: contain;
}


/* =========================================================
   CATEGORY SECTION
========================================================= */

.categories-section {
    background-color: var(--color-white);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: var(--grid-gap-md);
}

.category-card {
    position: relative;

    overflow: hidden;

    border-radius: var(--radius-lg);

    background-color: var(--color-sage-pale);

    box-shadow: var(--shadow-xs);

    transition:
        transform var(--transition-base),
        box-shadow var(--transition-base);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.category-card a {
    display: block;
}

.category-image {
    position: relative;

    aspect-ratio: 1.25 / 1;

    overflow: hidden;
}

.category-image::after {
    content: "";

    position: absolute;
    inset: 0;

    background: var(--category-image-overlay);

    opacity: 0.55;

    transition: opacity var(--transition-base);
}

.category-card:hover .category-image::after {
    opacity: 0.72;
}

.category-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform var(--transition-slow);
}

.category-card:hover .category-image img {
    transform: scale(1.04);
}

.category-content {
    padding: var(--space-5) var(--space-5) var(--space-6);
}

.category-content h3 {
    margin-bottom: var(--space-2);

    color: var(--color-primary);

    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 400;
}

.category-content p {
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
}


/* =========================================================
   PRODUCT GRID
========================================================= */

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: var(--grid-gap-md);
}


/* =========================================================
   PRODUCT CARD
========================================================= */

.product-card {
    min-width: 0;

    background-color: var(--color-white);

    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);

    overflow: hidden;

    transition:
        transform var(--transition-base),
        box-shadow var(--transition-base),
        border-color var(--transition-base);
}

.product-card:hover {
    transform: translateY(-4px);

    border-color: var(--color-border);

    box-shadow: var(--shadow-md);
}

.product-image-link {
    display: block;
}

.product-image {
    position: relative;

    aspect-ratio: 1 / 1;

    overflow: hidden;

    background-color: var(--product-image-bg);
}

.product-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform var(--transition-slow);
}

.product-card:hover .product-image img {
    transform: scale(1.035);
}

.product-badge {
    position: absolute;

    top: var(--space-3);
    left: var(--space-3);

    z-index: 2;

    display: inline-flex;
    align-items: center;

    min-height: 28px;

    padding-inline: var(--space-3);

    border-radius: var(--radius-full);

    background-color: var(--color-terracotta);

    color: var(--color-white);

    font-size: var(--text-xs);
    font-weight: var(--font-weight-bold);
    line-height: 1;
}

.product-content {
    padding: var(--space-5);
}

.product-category {
    display: block;

    margin-bottom: var(--space-2);

    color: var(--color-text-light);

    font-size: var(--text-xs);
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
}

.product-name {
    margin-bottom: var(--space-3);

    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 400;
    line-height: var(--leading-snug);
}

.product-name a {
    transition: color var(--transition-base);
}

.product-name a:hover {
    color: var(--color-primary-light);
}

.product-meta {
    display: flex;
    align-items: baseline;

    gap: var(--space-1);

    margin-bottom: var(--space-5);
}

.product-price {
    color: var(--color-primary);

    font-size: var(--text-lg);
    font-weight: var(--font-weight-bold);
}

.product-unit {
    color: var(--color-text-light);

    font-size: var(--text-sm);
}

.product-add-button {
    width: 100%;

    min-height: 42px;

    padding-inline: var(--space-4);
}


/* =========================================================
   BRAND / STORY SECTION
========================================================= */

.brand-section {
    background-color: var(--color-cream);
}

.brand-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);

    align-items: center;

    gap: clamp(3rem, 8vw, 8rem);
}

.brand-media {
    position: relative;

    padding: var(--space-5) 0 var(--space-5) var(--space-5);
}

.brand-media::before {
    content: "";

    position: absolute;
    inset: 0;

    border: 1px solid var(--color-sage);

    border-radius: var(--radius-xl);

    transform: translate(-1px, 1px);
}

.brand-media img {
    position: relative;
    z-index: 1;

    width: 100%;

    aspect-ratio: 1 / 1.05;

    object-fit: cover;

    border-radius: var(--radius-xl);

    box-shadow: var(--shadow-md);
}

.brand-copy {
    max-width: 560px;
}

.brand-copy h2 {
    margin-bottom: var(--space-6);

    font-size: clamp(2.4rem, 4vw, 3.5rem);
}

.brand-copy p {
    margin-bottom: var(--space-4);

    font-size: var(--text-base);
}

.brand-copy .btn {
    margin-top: var(--space-4);
}


/* =========================================================
   PROMOTIONAL BANNER
========================================================= */

.promo-section {
    padding-block: var(--space-20);

    background-color: var(--color-white);
}

.promo-banner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);

    min-height: 420px;

    overflow: hidden;

    border-radius: var(--radius-xl);

    background-color: var(--color-primary);

    box-shadow: var(--shadow-lg);
}

.promo-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: clamp(2rem, 5vw, 5rem);
}

.promo-copy .eyebrow {
    color: var(--color-sage-light);
}

.promo-copy h2 {
    max-width: 560px;

    margin-bottom: var(--space-5);

    color: var(--color-white);

    font-size: clamp(2.4rem, 4vw, 3.75rem);
}

.promo-copy p {
    max-width: 480px;

    margin-bottom: var(--space-8);

    color: rgba(255, 255, 255, 0.76);
}

.promo-copy .btn {
    align-self: flex-start;

    background-color: var(--color-terracotta);
}

.promo-copy .btn:hover {
    background-color: var(--color-terracotta-dark);
}

.promo-media {
    min-height: 420px;

    overflow: hidden;
}

.promo-media img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}


/* =========================================================
   TESTIMONIALS
========================================================= */

.testimonials-section {
    background-color: var(--color-white);
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: var(--grid-gap-md);
}

.testimonial-card {
    display: flex;
    flex-direction: column;

    min-height: 260px;

    padding: var(--space-8);

    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);

    background-color: var(--color-surface-soft);
}

.testimonial-rating {
    margin-bottom: var(--space-5);

    color: var(--color-terracotta);

    font-size: var(--text-sm);
    letter-spacing: 0.12em;
}

.testimonial-card blockquote {
    flex: 1;

    color: var(--color-text);

    font-family: var(--font-display);
    font-size: var(--text-xl);
    line-height: var(--leading-snug);
}

.testimonial-card footer {
    display: flex;
    flex-direction: column;

    gap: 2px;

    margin-top: var(--space-6);
}

.testimonial-card footer strong {
    color: var(--color-primary);

    font-size: var(--text-sm);
}

.testimonial-card footer span {
    color: var(--color-text-light);

    font-size: var(--text-xs);
}


/* =========================================================
   NEWSLETTER
========================================================= */

.newsletter-section {
    padding-block: var(--space-16);

    background-color: var(--color-sage-light);
}

.newsletter-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);

    align-items: center;

    gap: var(--space-12);
}

.newsletter-copy h2 {
    max-width: 600px;

    margin-bottom: var(--space-4);

    font-size: clamp(2.2rem, 4vw, 3.2rem);
}

.newsletter-copy p {
    max-width: 540px;
}

.newsletter-form {
    display: flex;
    align-items: center;

    gap: var(--space-2);

    padding: var(--space-2);

    background-color: var(--color-white);

    border: 1px solid var(--color-border);

    border-radius: var(--radius-full);

    box-shadow: var(--shadow-sm);
}

.newsletter-form input {
    min-height: 46px;

    border: 0;
    box-shadow: none;

    background: transparent;
}

.newsletter-form input:focus {
    box-shadow: none;
}

.newsletter-form .btn {
    flex-shrink: 0;

    min-height: 46px;
}

.form-message {
    margin-top: var(--space-3);

    color: var(--color-success);

    font-size: var(--text-sm);
    font-weight: var(--font-weight-semibold);
}


/* =========================================================
   FOOTER
========================================================= */

.site-footer {
    padding-top: var(--space-16);

    background-color: var(--color-primary);

    color: var(--color-white);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1.4fr;

    gap: var(--space-16);

    padding-bottom: var(--space-16);
}

.footer-brand {
    max-width: 300px;
}

.footer-brand .logo {
    color: var(--color-white);

    margin-bottom: var(--space-5);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.68);

    font-size: var(--text-sm);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: var(--space-8);
}

.footer-column h3 {
    margin-bottom: var(--space-5);

    color: var(--color-white);

    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: var(--font-weight-bold);
}

.footer-column ul {
    display: flex;
    flex-direction: column;

    gap: var(--space-3);
}

.footer-column a {
    color: rgba(255, 255, 255, 0.64);

    font-size: var(--text-sm);

    transition:
        color var(--transition-base),
        transform var(--transition-base);
}

.footer-column a:hover {
    color: var(--color-white);
}

.footer-bottom {
    padding-block: var(--space-6);

    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);

    font-size: var(--text-xs);
}


/* =========================================================
   SHOP PAGE
========================================================= */

.shop-header {
    padding-bottom: var(--space-12);
}

.shop-header h1 {
    max-width: 760px;

    margin-bottom: var(--space-5);

    font-size: clamp(3rem, 5vw, 4.5rem);
}

.shop-section {
    padding-bottom: var(--space-24);
}

.shop-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);

    align-items: start;

    gap: var(--space-10);
}


/* =========================================================
   SHOP SIDEBAR
========================================================= */

.shop-sidebar {
    position: sticky;
    top: calc(var(--header-height) + var(--space-6));

    padding: var(--space-6);

    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);

    background-color: var(--color-white);
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding-bottom: var(--space-5);

    border-bottom: 1px solid var(--color-border);
}

.filter-header h2 {
    font-family: var(--font-primary);
    font-size: var(--text-lg);
    font-weight: var(--font-weight-bold);
    letter-spacing: normal;
}

.filter-clear {
    color: var(--color-terracotta);

    background: transparent;

    font-size: var(--text-xs);
    font-weight: var(--font-weight-bold);
}

.filter-clear:hover {
    color: var(--color-terracotta-dark);
}

.filter-group {
    padding-block: var(--space-6);

    border-bottom: 1px solid var(--color-border-light);
}

.filter-group:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.filter-group h3 {
    margin-bottom: var(--space-4);

    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: var(--font-weight-bold);
    letter-spacing: normal;
}

.category-filters {
    display: flex;
    flex-direction: column;

    gap: var(--space-2);
}

.category-filters label,
.filter-checkbox {
    display: flex;
    align-items: center;

    gap: var(--space-3);

    min-height: 32px;

    color: var(--color-text-secondary);

    font-size: var(--text-sm);

    cursor: pointer;
}

.category-filters label:hover,
.filter-checkbox:hover {
    color: var(--color-primary);
}

.price-filter {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: var(--space-2);
}

.price-filter label {
    grid-column: span 2;

    margin-top: var(--space-2);

    color: var(--color-text-secondary);

    font-size: var(--text-xs);
}

.price-filter input {
    min-height: 42px;
}


/* =========================================================
   SHOP TOOLBAR
========================================================= */

.shop-products {
    min-width: 0;
}

.shop-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;

    gap: var(--space-3);

    margin-bottom: var(--space-5);
}

.shop-search input {
    min-height: 48px;
}

.shop-sort select {
    min-height: 48px;
}

.shop-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: var(--space-5);
}

.shop-results-header p {
    color: var(--color-text-light);

    font-size: var(--text-sm);
}

.shop-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.shop-empty-state {
    padding: var(--space-16) var(--space-8);

    border: 1px dashed var(--color-border-dark);
    border-radius: var(--radius-lg);

    background-color: var(--color-surface-soft);

    text-align: center;
}

.shop-empty-state h2 {
    margin-bottom: var(--space-3);

    font-size: var(--text-3xl);
}

.shop-empty-state p {
    max-width: 480px;

    margin-inline: auto;
    margin-bottom: var(--space-6);
}


/* =========================================================
   PRODUCT DETAIL
========================================================= */

.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);

    align-items: start;

    gap: clamp(3rem, 7vw, 7rem);

    padding-block: var(--space-16) var(--space-24);
}

.product-detail-image {
    position: relative;

    overflow: hidden;

    aspect-ratio: 1 / 1;

    border-radius: var(--radius-xl);

    background-color: var(--product-image-bg);
}

.product-detail-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.product-detail-image .product-badge {
    top: var(--space-5);
    left: var(--space-5);
}

.product-detail-content {
    padding-top: var(--space-4);
}

.product-back-link {
    display: inline-flex;

    margin-bottom: var(--space-8);

    color: var(--color-text-secondary);

    font-size: var(--text-sm);
    font-weight: var(--font-weight-semibold);

    transition: color var(--transition-base);
}

.product-back-link:hover {
    color: var(--color-primary);
}

.product-detail-content > .product-category {
    margin-bottom: var(--space-3);
}

.product-detail-content h1 {
    margin-bottom: var(--space-5);

    font-size: clamp(2.75rem, 5vw, 4.25rem);
}

.product-description {
    max-width: 600px;

    margin-bottom: var(--space-6);

    font-size: var(--text-lg);
}

.product-detail-price {
    display: flex;
    align-items: baseline;

    gap: var(--space-2);

    padding-block: var(--space-5);

    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.product-detail-price .product-price {
    font-size: var(--text-2xl);
}

.product-quantity {
    margin-top: var(--space-6);
    margin-bottom: var(--space-5);
}

.product-quantity label {
    display: block;

    margin-bottom: var(--space-3);

    color: var(--color-text);

    font-size: var(--text-sm);
    font-weight: var(--font-weight-semibold);
}

.quantity-control {
    display: inline-grid;
    grid-template-columns: 44px 64px 44px;

    height: 44px;

    overflow: hidden;

    border: 1px solid var(--color-border-dark);
    border-radius: var(--radius-full);

    background-color: var(--color-white);
}

.quantity-control button {
    display: grid;
    place-items: center;

    background-color: transparent;

    color: var(--color-primary);

    font-size: var(--text-lg);

    transition: background-color var(--transition-base);
}

.quantity-control button:hover {
    background-color: var(--color-sage-pale);
}

.quantity-control input {
    min-height: 42px;

    padding: 0;

    border: 0;
    border-radius: 0;

    box-shadow: none;

    text-align: center;

    font-weight: var(--font-weight-semibold);
}

.quantity-control input:focus {
    box-shadow: none;
}

.product-detail-add {
    width: 100%;

    min-height: 54px;

    font-size: var(--text-base);
}

.product-info-list {
    margin-top: var(--space-8);

    border-top: 1px solid var(--color-border);
}

.product-info-list > div {
    display: flex;
    justify-content: space-between;
    gap: var(--space-5);

    padding-block: var(--space-4);

    border-bottom: 1px solid var(--color-border-light);

    font-size: var(--text-sm);
}

.product-info-list span {
    color: var(--color-text-secondary);
}

.product-info-list strong {
    color: var(--color-text);
}


/* =========================================================
   GENERAL CARD / PANEL SYSTEM
========================================================= */

.card,
.panel {
    border: 1px solid var(--color-border);

    border-radius: var(--radius-lg);

    background-color: var(--color-white);

    box-shadow: var(--shadow-xs);
}

.card-body,
.panel-body {
    padding: var(--space-6);
}


/* =========================================================
   ACCOUNT / AUTH / CHECKOUT FOUNDATIONS
========================================================= */

.auth-page,
.account-page,
.checkout-page {
    padding-block: var(--space-16) var(--space-24);
}

.auth-container {
    width: min(100%, 520px);

    margin-inline: auto;
}

.auth-card {
    padding: clamp(1.5rem, 5vw, 3rem);

    border: 1px solid var(--color-border);

    border-radius: var(--radius-xl);

    background-color: var(--color-white);

    box-shadow: var(--shadow-sm);
}

.auth-card h1 {
    margin-bottom: var(--space-3);

    font-size: clamp(2.5rem, 5vw, 3.5rem);
}

.auth-card > p {
    margin-bottom: var(--space-8);
}

.form-group {
    margin-bottom: var(--space-5);
}

.form-group label {
    display: block;

    margin-bottom: var(--space-2);

    color: var(--color-text);

    font-size: var(--text-sm);
    font-weight: var(--font-weight-semibold);
}

.form-actions {
    margin-top: var(--space-6);
}

.form-actions .btn {
    width: 100%;
}

.auth-footer {
    margin-top: var(--space-6);

    text-align: center;

    font-size: var(--text-sm);
}

.auth-footer a {
    color: var(--color-primary);
    font-weight: var(--font-weight-semibold);
}

.auth-footer a:hover {
    text-decoration: underline;
}


/* =========================================================
   EMPTY STATES
========================================================= */

.empty-state {
    padding: var(--space-16) var(--space-8);

    border: 1px dashed var(--color-border-dark);
    border-radius: var(--radius-lg);

    background-color: var(--color-surface-soft);

    text-align: center;
}

.empty-state h2 {
    margin-bottom: var(--space-3);
}

.empty-state p {
    max-width: 500px;

    margin-inline: auto;
    margin-bottom: var(--space-6);
}


/* =========================================================
   DIVIDERS
========================================================= */

.divider {
    width: 100%;
    height: 1px;

    background-color: var(--color-border);
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

}

/* =========================================================
   CART PAGE
========================================================= */

.cart-section {
    padding-bottom: var(--space-24);
}


/* =========================================================
   CART LAYOUT
========================================================= */

.cart-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        340px;

    align-items: start;

    gap: var(--space-10);
}


/* =========================================================
   CART ITEMS
========================================================= */

.cart-items {
    display: flex;
    flex-direction: column;

    gap: var(--space-4);
}


/* =========================================================
   INDIVIDUAL CART ITEM
========================================================= */

.cart-item {
    display: grid;

    grid-template-columns:
        96px
        minmax(0, 1fr)
        auto
        auto;

    align-items: center;

    gap: var(--space-5);

    padding: var(--space-5);

    background-color: var(--color-white);

    border: 1px solid var(--color-border-light);

    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-xs);

    transition:
        border-color var(--transition-base),
        box-shadow var(--transition-base),
        transform var(--transition-base);
}

.cart-item:hover {
    border-color: var(--color-border);

    box-shadow: var(--shadow-sm);

    transform: translateY(-1px);
}


/* =========================================================
   SMALL CART IMAGE
========================================================= */

.cart-item-image {
    display: block;

    width: 96px;
    height: 96px;

    overflow: hidden;

    border-radius: var(--radius-md);

    background-color: var(--product-image-bg);
}

.cart-item-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform var(--transition-base);
}

.cart-item-image:hover img {
    transform: scale(1.03);
}


/* =========================================================
   CART ITEM DETAILS
========================================================= */

.cart-item-details {
    min-width: 0;
}

.cart-item-details .product-category {
    margin-bottom: var(--space-1);
}

.cart-item-details h2 {
    margin-bottom: var(--space-2);

    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 400;
    line-height: var(--leading-snug);
}

.cart-item-details h2 a {
    transition: color var(--transition-base);
}

.cart-item-details h2 a:hover {
    color: var(--color-primary-light);
}

.cart-item-unit {
    color: var(--color-text-light);

    font-size: var(--text-sm);
}


/* =========================================================
   CART ITEM QUANTITY
========================================================= */

.cart-item-actions {
    display: flex;
    flex-direction: column;

    align-items: center;

    gap: var(--space-2);
}

.cart-item-quantity .quantity-control {
    display: grid;

    grid-template-columns:
        36px
        48px
        36px;

    width: 120px;
    height: 40px;

    overflow: hidden;

    border: 1px solid var(--color-border);

    border-radius: var(--radius-full);

    background-color: var(--color-cream);
}

.cart-item-quantity .quantity-control button {
    display: grid;
    place-items: center;

    background: transparent;

    color: var(--color-primary);

    font-size: var(--text-base);
    font-weight: var(--font-weight-semibold);

    transition:
        background-color var(--transition-base),
        color var(--transition-base);
}

.cart-item-quantity .quantity-control button:hover {
    background-color: var(--color-sage-pale);
}

.cart-item-quantity .quantity-control input {
    width: 100%;
    min-height: 38px;

    padding: 0;

    border: 0;
    border-radius: 0;

    background: transparent;

    box-shadow: none;

    color: var(--color-text);

    text-align: center;

    font-size: var(--text-sm);
    font-weight: var(--font-weight-semibold);
}

.cart-item-quantity .quantity-control input:focus {
    box-shadow: none;
}


/* =========================================================
   CART REMOVE ×
========================================================= */

.cart-item-remove {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 28px;
    height: 28px;

    border-radius: var(--radius-full);

    background: transparent;

    color: var(--color-text-light);

    font-size: 1.25rem;
    font-weight: 400;

    line-height: 1;

    transition:
        background-color var(--transition-base),
        color var(--transition-base);
}

.cart-item-remove:hover {
    background-color: var(--color-sage-pale);

    color: var(--color-primary);
}


/* =========================================================
   CART ITEM TOTAL
========================================================= */

.cart-item-total {
    min-width: 82px;

    text-align: right;
}

.cart-item-total strong {
    color: var(--color-primary);

    font-size: var(--text-base);
    font-weight: var(--font-weight-bold);
}


/* =========================================================
   ORDER SUMMARY
========================================================= */

.cart-summary {
    position: sticky;

    top: calc(
        var(--header-height) +
        var(--space-6)
    );

    padding: var(--space-6);

    border: 1px solid var(--color-border-light);

    border-radius: var(--radius-lg);

    background-color: var(--color-white);

    box-shadow: var(--shadow-sm);
}

.cart-summary-header {
    padding-bottom: var(--space-5);

    border-bottom: 1px solid var(--color-border-light);
}

.cart-summary-header .eyebrow {
    margin-bottom: var(--space-2);
}

.cart-summary-header h2 {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 400;
}

.cart-summary-row {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: var(--space-4);

    padding-block: var(--space-4);

    color: var(--color-text-secondary);

    font-size: var(--text-sm);
}

.cart-summary-row strong {
    color: var(--color-text);

    font-weight: var(--font-weight-semibold);
}

.cart-summary-divider {
    width: 100%;
    height: 1px;

    background-color: var(--color-border);
}

.cart-summary-row.cart-total {
    padding-block: var(--space-5);

    color: var(--color-text);
}

.cart-summary-row.cart-total strong {
    color: var(--color-primary);

    font-size: var(--text-xl);
}

.cart-checkout-button {
    width: 100%;

    margin-top: var(--space-3);
}

.continue-shopping {
    display: flex;

    justify-content: center;

    margin-top: var(--space-4);

    color: var(--color-text-secondary);

    font-size: var(--text-sm);
    font-weight: var(--font-weight-semibold);

    transition: color var(--transition-base);
}

.continue-shopping:hover {
    color: var(--color-primary);
}


/* =========================================================
   EMPTY CART
========================================================= */

.cart-empty {
    max-width: 680px;

    margin-inline: auto;

    padding: var(--space-16) var(--space-8);

    border: 1px solid var(--color-border-light);

    border-radius: var(--radius-xl);

    background-color: var(--color-white);

    box-shadow: var(--shadow-xs);

    text-align: center;
}

.cart-empty h2 {
    margin-bottom: var(--space-3);

    font-size: var(--text-3xl);
}

.cart-empty p {
    max-width: 500px;

    margin-inline: auto;

    margin-bottom: var(--space-6);
}


/* =========================================================
   PRODUCT CARD — CART CONTROL
========================================================= */

/*
 * The cart control intentionally uses the same
 * footprint as the normal product-card button.
 */

.product-cart-control {
    position: relative;

    width: 100%;

    min-height: 42px;

    padding: 0;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 2px;
}


/* =========================================================
   PRODUCT CARD QUANTITY ROW
========================================================= */

.product-cart-quantity-row {
    display: grid;

    grid-template-columns:
        1fr
        1fr
        1fr;

    width: 100%;
    height: 42px;

    overflow: hidden;

    border: 1px solid var(--color-border);

    border-radius: var(--radius-full);

    background-color: var(--color-cream);

    transition:
        border-color var(--transition-base),
        box-shadow var(--transition-base);
}

.product-cart-control:hover
.product-cart-quantity-row {
    border-color: var(--color-sage);
}


/* =========================================================
   PRODUCT CARD +/- BUTTONS
========================================================= */

.product-cart-quantity-row button {
    display: grid;

    place-items: center;

    background: transparent;

    color: var(--color-primary);

    font-size: var(--text-base);
    font-weight: var(--font-weight-semibold);

    transition:
        background-color var(--transition-base),
        color var(--transition-base);
}

.product-cart-quantity-row button:hover {
    background-color: var(--color-sage-pale);
}


/* =========================================================
   PRODUCT CARD QUANTITY NUMBER
========================================================= */

.product-cart-quantity {
    display: grid;

    place-items: center;

    color: var(--color-text);

    font-size: var(--text-sm);
    font-weight: var(--font-weight-semibold);
}


/* =========================================================
   PRODUCT CARD ×
========================================================= */

.product-cart-remove {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 24px;
    height: 18px;

    margin-inline: auto;

    background: transparent;

    color: var(--color-text-light);

    font-size: 1rem;
    font-weight: 400;

    line-height: 1;

    transition:
        color var(--transition-base),
        transform var(--transition-base);
}

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

    transform: scale(1.08);
}

/* =========================================================
   CART REMOVE / CROSS ACTION
========================================================= */

.cart-item-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;

    margin-top: var(--space-2);

    padding: 0;

    background: transparent;

    color: var(--color-text-light);

    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1;

    border-radius: var(--radius-full);

    opacity: 0.7;

    transition:
        color var(--transition-base),
        background-color var(--transition-base),
        opacity var(--transition-base),
        transform var(--transition-fast);
}

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

    background-color: rgba(201, 120, 82, 0.08);

    opacity: 1;

    transform: scale(1.06);
}

.cart-item-remove:active {
    transform: scale(0.96);
}
