/* Loom Theme — base.css
   Light minimalist design system. No border-radius. Inter + Helvetica.
   Colors via CSS vars defined in layout/theme.liquid <style> block.
*/

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body, 'Inter'), 'Helvetica Neue', Helvetica, system-ui, sans-serif;
    background-color: var(--bg, #ffffff);
    color: var(--text, #0a0a0a);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading, 'Inter'), 'Helvetica Neue', Helvetica, system-ui, sans-serif;
    line-height: 1.2;
    color: var(--text, #0a0a0a);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; }

/* ─── Layout ─── */
.container {
    max-width: var(--container, 1280px);
    margin: 0 auto;
    padding: 0 1.5rem;
}
@media (max-width: 640px) { .container { padding: 0 1rem; } }

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: 0;
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: opacity 0.15s ease, background 0.15s ease;
    border: none;
    white-space: nowrap;
}
.btn-primary {
    background: var(--primary, #0a0a0a);
    color: var(--primary-text, #ffffff);
}
.btn-primary:hover { opacity: 0.88; }

.btn-outline {
    background: transparent;
    color: var(--text, #0a0a0a);
    border: 1px solid var(--border-strong, rgba(10,10,10,0.15));
}
.btn-outline:hover { border-color: var(--text, #0a0a0a); }

.btn-ghost {
    background: transparent;
    color: var(--text, #0a0a0a);
    padding: 0.5rem 0.75rem;
}
.btn-ghost:hover { background: var(--surface-raised, #f5f5f5); }

.btn-sm { padding: 0.5rem 1.25rem; font-size: 0.8125rem; }
.btn-lg { padding: 1rem 2.25rem; font-size: 1rem; }

/* ─── Cards ─── */
.card {
    background: var(--bg, #ffffff);
    border: 1px solid var(--border, rgba(10,10,10,0.08));
    border-radius: 0;
    overflow: hidden;
}

/* ─── Product cards ─── */
.product-card {
    background: var(--bg, #ffffff);
    border: 1px solid var(--border, rgba(10,10,10,0.08));
    border-radius: 0;
    overflow: hidden;
    transition: border-color 0.2s ease;
}
.product-card:hover { border-color: var(--border-strong, rgba(10,10,10,0.15)); }
.product-card img { transition: transform 0.5s ease; width: 100%; aspect-ratio: 1; object-fit: cover; }
.product-card:hover img { transform: scale(1.04); }
.product-card__body { padding: 1rem; }
.product-card__title { font-size: 0.9375rem; font-weight: 500; color: var(--text, #0a0a0a); margin-bottom: 0.375rem; }
.product-card__price { font-size: 0.875rem; color: var(--text-muted, rgba(10,10,10,0.6)); }
.product-card__compare-price { text-decoration: line-through; color: var(--text-subtle, rgba(10,10,10,0.35)); margin-right: 0.375rem; }

/* ─── Badges ─── */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 0;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.badge-sale { background: #0a0a0a; color: #ffffff; }
.badge-new  { background: var(--surface-raised, #f5f5f5); color: var(--text, #0a0a0a); border: 1px solid var(--border, rgba(10,10,10,0.08)); }
.badge-out  { background: transparent; color: var(--text-subtle, rgba(10,10,10,0.35)); border: 1px solid var(--border, rgba(10,10,10,0.08)); }

/* ─── Form elements ─── */
.input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg, #ffffff);
    border: 1px solid var(--border-strong, rgba(10,10,10,0.15));
    border-radius: 0;
    color: var(--text, #0a0a0a);
    font-size: 0.9375rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s ease;
}
.input::placeholder { color: var(--text-subtle, rgba(10,10,10,0.35)); }
.input:focus { border-color: var(--text, #0a0a0a); }

.label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted, rgba(10,10,10,0.6));
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
}

select.input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='rgba(10,10,10,0.4)'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.1rem;
    padding-right: 2.5rem;
}

/* ─── Dividers ─── */
.divider { border: none; border-top: 1px solid var(--border, rgba(10,10,10,0.08)); }

/* ─── Section spacing ─── */
.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }
.section-lg { padding: 7rem 0; }
.section-title { font-size: 2rem; font-weight: 700; margin-bottom: 0.75rem; letter-spacing: -0.03em; }
.section-subtitle { color: var(--text-muted, rgba(10,10,10,0.6)); font-size: 1.0625rem; }

/* ─── Header ─── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,0.92);
    border-bottom: 1px solid var(--border, rgba(10,10,10,0.08));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.site-header.transparent {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: transparent;
    border-bottom-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.site-header.transparent.scrolled {
    background: rgba(255,255,255,0.92);
    border-bottom-color: var(--border, rgba(10,10,10,0.08));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.header-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text, #0a0a0a);
    letter-spacing: -0.01em;
}
.header-logo img { height: 36px; width: auto; object-fit: contain; }
.desktop-nav { display: none; align-items: center; gap: 2rem; }
@media (min-width: 768px) { .desktop-nav { display: flex; } }
.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted, rgba(10,10,10,0.6));
    transition: color 0.15s ease;
    position: relative;
}
.nav-link:hover { color: var(--text, #0a0a0a); }
.nav-dropdown {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 50%;
    transform: translateX(-50%);
    min-width: 180px;
    background: var(--bg, #ffffff);
    border: 1px solid var(--border, rgba(10,10,10,0.08));
    border-radius: 0;
    padding: 0.5rem;
    display: none;
    z-index: 100;
    box-shadow: 0 16px 40px rgba(0,0,0,0.08);
}
.nav-item:hover .nav-dropdown { display: block; }
.nav-dropdown a {
    display: block;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--text-muted, rgba(10,10,10,0.6));
    border-radius: 0;
    transition: background 0.1s, color 0.1s;
}
.nav-dropdown a:hover { background: var(--surface-raised, #f5f5f5); color: var(--text, #0a0a0a); }
.header-actions { display: flex; align-items: center; gap: 1rem; }
.header-icon {
    color: var(--text-muted, rgba(10,10,10,0.6));
    transition: color 0.15s ease;
    display: flex;
    align-items: center;
}
.header-icon:hover { color: var(--text, #0a0a0a); }
.header-icon svg { width: 20px; height: 20px; }

/* ─── Announcement bar ─── */
.announcement-bar {
    text-align: center;
    padding: 0.625rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
}
.announcement-bar a:hover { text-decoration: underline; }

/* ─── Mobile nav ─── */
#mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--bg, #ffffff);
    flex-direction: column;
    padding: 1.5rem;
    overflow-y: auto;
}
#mobile-menu.open { display: flex; }
#mobile-menu .menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border, rgba(10,10,10,0.08));
    margin-bottom: 1.5rem;
}
#mobile-menu .close-btn {
    background: var(--surface-raised, #f5f5f5);
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0;
    color: var(--text, #0a0a0a);
    display: flex;
    align-items: center;
}
#mobile-menu nav a {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text, #0a0a0a);
    border-bottom: 1px solid var(--border, rgba(10,10,10,0.06));
}
#mobile-menu nav a:last-child { border-bottom: none; }
#mobile-menu nav a:hover { color: var(--text-muted, rgba(10,10,10,0.6)); }
body.menu-open { overflow: hidden; }

/* ─── Footer ─── */
.site-footer {
    background: var(--surface, #fafafa);
    border-top: 1px solid var(--border, rgba(10,10,10,0.08));
    margin-top: 5rem;
}
.footer-grid { display: grid; gap: 2.5rem; padding: 4rem 0; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); } }
.footer-col-title {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted, rgba(10,10,10,0.6));
    margin-bottom: 1rem;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.625rem; }
.footer-links a {
    font-size: 0.9375rem;
    color: var(--text-muted, rgba(10,10,10,0.6));
    transition: color 0.15s ease;
}
.footer-links a:hover { color: var(--text, #0a0a0a); }
.footer-bottom {
    border-top: 1px solid var(--border, rgba(10,10,10,0.06));
    padding: 1.5rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8125rem;
    color: var(--text-subtle, rgba(10,10,10,0.35));
}
.social-links { display: flex; align-items: center; gap: 0.875rem; }
.social-links a { color: var(--text-subtle, rgba(10,10,10,0.35)); transition: color 0.15s ease; }
.social-links a:hover { color: var(--text, #0a0a0a); }
.social-links svg { width: 18px; height: 18px; }

/* ─── Newsletter block (in footer) ─── */
.newsletter-block { padding: 3.5rem 0; border-bottom: 1px solid var(--border, rgba(10,10,10,0.08)); }
.newsletter-form { display: flex; gap: 0.75rem; max-width: 440px; }
.newsletter-form .input { flex: 1; }
@media (max-width: 480px) { .newsletter-form { flex-direction: column; } }

/* ─── Animations ─── */
.animate-fade { animation: fadeIn 0.35s ease-out both; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Transparent header: first section pads for the fixed header ─── */
.has-transparent-header > div:first-child section { padding-top: calc(64px + 3rem); }

/* ─── Editor mode overlays ─── */
[data-section-id] { position: relative; transition: outline 0.15s; }
[data-section-id].editor-hover    { outline: 2px dashed rgba(99,102,241,0.5); outline-offset: -2px; }
[data-section-id].editor-selected { outline: 2px solid #6366f1; outline-offset: -2px; z-index: 10; }
.editor-section-label {
    position: absolute; top: 0; left: 0;
    background: #6366f1; color: #fff;
    font-size: 11px; font-family: system-ui;
    padding: 2px 8px; z-index: 11;
    pointer-events: none; border-radius: 0;
}
[data-block-id] { position: relative; }
[data-block-id].editor-block-hover    { outline: 2px dashed rgba(139,92,246,0.4); outline-offset: -1px; }
[data-block-id].editor-block-selected { outline: 2px solid #8b5cf6; outline-offset: -1px; z-index: 12; }
.editor-block-label {
    position: absolute; top: 0; right: 0;
    background: #8b5cf6; color: #fff;
    font-size: 10px; font-family: system-ui;
    padding: 1px 6px; z-index: 13;
    pointer-events: none; border-radius: 0;
}

/* Hide hamburger on desktop */
@media (min-width: 768px) { #open-menu { display: none !important; } }
