/* ========================================
   Altirent.dk - Dual Theme Design System
   Theme A: Luxury Minimal (Aesop-inspired)
   Theme B: Playful Modern (Glossier-inspired)
   ======================================== */

/* ---- Theme A: Luxury Minimal ---- */
:root, .theme-luxury {
    --bg-page: #F7F5F0;
    --bg-card: #FFFFFF;
    --bg-card-alt: #EFECE5;
    --bg-footer: #252525;
    --bg-input: #FFFFFF;
    --text-primary: #252525;
    --text-secondary: #6B6155;
    --text-muted: #A39E96;
    --text-on-accent: #FFFFFF;
    --accent: #8B7355;
    --accent-hover: #6E5A3F;
    --accent-light: #F0EBE3;
    --accent-glow: transparent;
    --border: #E5E0D8;
    --border-hover: #C9C1B5;
    --radius-card: 0;
    --radius-btn: 0;
    --radius-img: 0;
    --shadow-card: none;
    --shadow-card-hover: 0 24px 48px rgba(37,37,37,0.08);
    --glass-bg: rgba(247,245,240,0.92);
    --glass-border: rgba(37,37,37,0.06);
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-mono: 'Inter', system-ui, sans-serif;
    --hero-bg: #2C2926;
    --hero-text: #F7F5F0;
    --hero-muted: rgba(247,245,240,0.5);
    --btn-transform: uppercase;
    --btn-tracking: 0.2em;
    --btn-size: 0.6875rem;
    --btn-weight: 500;
    --card-aspect: 3 / 4;
    --transition-slow: 1.2s;
    --transition-med: 0.6s;
    --nav-radius: 0;
    --nav-top: 0;
    --nav-mx: 0;
}

/* ---- Theme B: Playful Modern ---- */
.theme-playful {
    --bg-page: #FEFCFB;
    --bg-card: #FFFFFF;
    --bg-card-alt: #FFF5F3;
    --bg-footer: #1A1A2E;
    --bg-input: #FFFFFF;
    --text-primary: #1A1A2E;
    --text-secondary: #6E6E82;
    --text-muted: #A5A5B8;
    --text-on-accent: #FFFFFF;
    --accent: #FF3366;
    --accent-hover: #E62E5C;
    --accent-light: #FFE0E6;
    --accent-glow: rgba(255,51,102,0.15);
    --border: #F0EDF5;
    --border-hover: #E0D8EE;
    --radius-card: 1.25rem;
    --radius-btn: 100px;
    --radius-img: 1rem;
    --shadow-card: 0 1px 2px rgba(26,26,46,0.04);
    --shadow-card-hover: 0 20px 40px rgba(26,26,46,0.1);
    --glass-bg: rgba(254,252,251,0.88);
    --glass-border: rgba(240,237,245,0.8);
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
    --font-mono: 'Plus Jakarta Sans', system-ui, sans-serif;
    --hero-bg: #FFF0ED;
    --hero-text: #1A1A2E;
    --hero-muted: #6E6E82;
    --btn-transform: none;
    --btn-tracking: 0;
    --btn-size: 0.9375rem;
    --btn-weight: 600;
    --card-aspect: 1;
    --transition-slow: 0.6s;
    --transition-med: 0.4s;
    --nav-radius: 100px;
    --nav-top: 0.75rem;
    --nav-mx: 1rem;
}

/* ---- Base ---- */
body {
    font-family: var(--font-body);
    background: var(--bg-page);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

/* ---- Glass Header ---- */
.glass-header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    border-radius: var(--nav-radius);
}

#site-header {
    top: var(--nav-top);
    left: var(--nav-mx);
    right: var(--nav-mx);
}

.theme-playful .glass-header {
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 24px rgba(26,26,46,0.06);
}

/* ---- Hero ---- */
.hero-section {
    position: relative;
    overflow: hidden;
}

.theme-luxury .hero-section {
    background: var(--hero-bg);
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.theme-playful .hero-section {
    background: linear-gradient(160deg, #FFF0ED 0%, #FDE8F0 40%, #F0E6FF 100%);
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Gradient blobs for playful theme */
.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: blob-float 20s ease-in-out infinite;
    pointer-events: none;
}
.hero-blob-1 { width: 40vw; height: 40vw; background: #FFD6E0; top: -10%; right: -10%; }
.hero-blob-2 { width: 35vw; height: 35vw; background: #E0D4FF; bottom: -15%; left: -5%; animation-delay: -7s; }
.hero-blob-3 { width: 25vw; height: 25vw; background: #D4F0FF; top: 30%; left: 20%; animation-delay: -14s; }

.theme-luxury .hero-blob { display: none; }

@keyframes blob-float {
    0%, 100% { transform: translate(0,0) scale(1); }
    25% { transform: translate(30px,-50px) scale(1.05); }
    50% { transform: translate(-20px,20px) scale(0.95); }
    75% { transform: translate(40px,30px) scale(1.02); }
}

/* Particles for luxury theme hero */
.particle {
    position: absolute;
    width: 2px; height: 2px;
    background: rgba(247,245,240,0.15);
    border-radius: 50%;
    animation: float-up 12s linear infinite;
}
.theme-playful .particle { display: none; }
.particle:nth-child(1) { left: 10%; animation-duration: 10s; }
.particle:nth-child(2) { left: 25%; animation-duration: 14s; animation-delay: 3s; }
.particle:nth-child(3) { left: 40%; animation-duration: 11s; animation-delay: 6s; }
.particle:nth-child(4) { left: 55%; animation-duration: 13s; animation-delay: 1s; }
.particle:nth-child(5) { left: 70%; animation-duration: 12s; animation-delay: 4s; }
.particle:nth-child(6) { left: 85%; animation-duration: 15s; animation-delay: 2s; }

@keyframes float-up {
    0% { transform: translateY(100vh); opacity: 0; }
    10% { opacity: 0.4; }
    90% { opacity: 0.4; }
    100% { transform: translateY(-10vh); opacity: 0; }
}

/* ---- Hero Text ---- */
.hero-title {
    font-family: var(--font-display);
    color: var(--hero-text);
    letter-spacing: -0.03em;
}

.theme-luxury .hero-title {
    font-weight: 300;
    font-size: clamp(3.5rem, 8vw, 7rem);
    line-height: 0.95;
    max-width: 14ch;
}

.theme-playful .hero-title {
    font-weight: 300;
    font-size: clamp(3rem, 7vw, 5.5rem);
    line-height: 1.05;
    text-align: center;
}

.theme-luxury .hero-title em { font-style: italic; opacity: 0.6; }

.theme-playful .hero-highlight {
    color: var(--accent);
    position: relative;
    display: inline-block;
}
.theme-playful .hero-highlight::after {
    content: '';
    position: absolute;
    bottom: 0.05em; left: -0.05em; right: -0.05em;
    height: 0.15em;
    background: var(--accent-light);
    border-radius: 100px;
    z-index: -1;
    transform: rotate(-1deg);
}

/* ---- CTA Buttons ---- */
.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    font-family: var(--font-body);
    font-size: var(--btn-size);
    font-weight: var(--btn-weight);
    text-transform: var(--btn-transform);
    letter-spacing: var(--btn-tracking);
    text-decoration: none;
    border-radius: var(--radius-btn);
    transition: all 0.5s cubic-bezier(0.16,1,0.3,1);
    position: relative;
    overflow: hidden;
}

.theme-luxury .hero-cta {
    background: transparent;
    border: 1px solid rgba(247,245,240,0.3);
    color: var(--hero-text);
}
.theme-luxury .hero-cta::before {
    content: '';
    position: absolute; inset: 0;
    background: var(--hero-text);
    transform: translateX(-101%);
    transition: transform 0.5s cubic-bezier(0.16,1,0.3,1);
}
.theme-luxury .hero-cta:hover { border-color: var(--hero-text); color: var(--hero-bg); }
.theme-luxury .hero-cta:hover::before { transform: translateX(0); }
.theme-luxury .hero-cta span, .theme-luxury .hero-cta svg { position: relative; z-index: 1; }

.theme-playful .hero-cta {
    background: var(--accent);
    color: var(--text-on-accent);
    border: none;
    box-shadow: 0 4px 16px var(--accent-glow);
}
.theme-playful .hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px var(--accent-glow);
    background: var(--accent-hover);
}

/* ---- Scroll indicator (luxury) ---- */
.scroll-indicator {
    position: absolute;
    bottom: 3rem; left: 50%;
    transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
}
.scroll-indicator span {
    font-family: var(--font-body);
    font-size: 0.625rem; font-weight: 500;
    letter-spacing: 0.2em; text-transform: uppercase;
    color: rgba(247,245,240,0.3);
    writing-mode: vertical-lr;
}
.scroll-line {
    width: 1px; height: 3rem;
    background: rgba(247,245,240,0.2);
    position: relative; overflow: hidden;
}
.scroll-line::after {
    content: ''; position: absolute; top: -100%; left: 0; width: 100%; height: 100%;
    background: rgba(247,245,240,0.6);
    animation: scroll-pulse 2s cubic-bezier(0.4,0,0.2,1) infinite;
}
@keyframes scroll-pulse { 0% { top: -100%; } 100% { top: 100%; } }
.theme-playful .scroll-indicator { display: none; }

/* ---- Product Cards ---- */
.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    overflow: hidden;
    border: 1px solid transparent;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-med) cubic-bezier(0.16,1,0.3,1);
    position: relative;
}
.product-card:hover {
    box-shadow: var(--shadow-card-hover);
}

.theme-luxury .product-card { border: none; }
.theme-luxury .product-card:hover { transform: translateY(-2px); }

.theme-playful .product-card { border: 1px solid var(--border); }
.theme-playful .product-card:hover {
    transform: translateY(-6px);
    border-color: transparent;
    box-shadow: var(--shadow-card-hover), 0 0 0 1px var(--accent-glow);
}

.product-card-image {
    aspect-ratio: var(--card-aspect);
    overflow: hidden;
    position: relative;
}

.theme-luxury .product-card-image { background: #EFECE5; }
.theme-playful .product-card-image { background: linear-gradient(135deg, #FFF5F3, #F8F0FF); }

.product-card-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow) cubic-bezier(0.16,1,0.3,1);
}
.product-card:hover .product-card-image img { transform: scale(1.06); }

/* Quick-add overlay */
.product-card-quickadd {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 1rem;
    transform: translateY(100%); opacity: 0;
    transition: all 0.5s cubic-bezier(0.16,1,0.3,1);
    z-index: 2;
}
.product-card:hover .product-card-quickadd { transform: translateY(0); opacity: 1; }

.theme-luxury .product-card-quickadd button {
    width: 100%; padding: 0.875rem;
    background: var(--text-primary); color: var(--bg-page);
    border: none; border-radius: 0;
    font-family: var(--font-body);
    font-size: 0.6875rem; font-weight: 500;
    letter-spacing: 0.2em; text-transform: uppercase;
    cursor: pointer; transition: background 0.3s;
}
.theme-luxury .product-card-quickadd button:hover { background: var(--accent); }

.theme-playful .product-card-quickadd button {
    width: 100%; padding: 0.875rem;
    background: var(--accent); color: var(--text-on-accent);
    border: none; border-radius: var(--radius-btn);
    font-family: var(--font-body);
    font-size: 0.875rem; font-weight: 600;
    cursor: pointer; transition: all 0.3s;
    box-shadow: 0 4px 16px var(--accent-glow);
}
.theme-playful .product-card-quickadd button:hover { background: var(--accent-hover); }

/* Card info */
.product-card-category {
    font-family: var(--font-body);
    font-size: 0.625rem; font-weight: 500;
    letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.375rem;
}
.theme-playful .product-card-category { color: #7C5CFC; letter-spacing: 0.05em; font-weight: 600; font-size: 0.6875rem; }

.product-card-title {
    font-size: 0.9375rem; font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.theme-luxury .product-card-title {
    font-family: var(--font-display);
    font-size: 1.125rem; font-weight: 400;
}

.product-card-price {
    font-family: var(--font-mono);
    font-size: 0.875rem; font-weight: 400;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}
.theme-playful .product-card-price {
    font-size: 1.125rem; font-weight: 700;
    color: var(--text-primary);
}

/* ---- Category colors ---- */
.cat-color-0 { background: linear-gradient(135deg, #4A6741, #3A5233); }
.cat-color-1 { background: linear-gradient(135deg, #6366F1, #4338CA); }
.cat-color-2 { background: linear-gradient(135deg, #0891B2, #0E7490); }
.cat-color-3 { background: linear-gradient(135deg, #D97706, #B45309); }
.cat-color-4 { background: linear-gradient(135deg, #DC2626, #B91C1C); }
.cat-color-5 { background: linear-gradient(135deg, #7C3AED, #6D28D9); }
.cat-color-6 { background: linear-gradient(135deg, #059669, #047857); }
.cat-color-7 { background: linear-gradient(135deg, #2563EB, #1D4ED8); }

/* ---- Scroll animations ---- */
.animate-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--transition-med) cubic-bezier(0.16,1,0.3,1),
                transform var(--transition-med) cubic-bezier(0.16,1,0.3,1);
}
.animate-in.visible { opacity: 1; transform: translateY(0); }
.animate-in:nth-child(2) { transition-delay: 0.05s; }
.animate-in:nth-child(3) { transition-delay: 0.1s; }
.animate-in:nth-child(4) { transition-delay: 0.15s; }
.animate-in:nth-child(5) { transition-delay: 0.2s; }
.animate-in:nth-child(6) { transition-delay: 0.25s; }

/* ---- Common utilities ---- */
@keyframes cart-pulse { 0% { transform: scale(1); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }
.cart-pulse { animation: cart-pulse 0.3s ease; }

@keyframes badge-pop { 0% { transform: scale(0); opacity: 0; } 70% { transform: scale(1.2); } 100% { transform: scale(1); opacity: 1; } }
.badge-visible { animation: badge-pop 0.3s cubic-bezier(0.16,1,0.3,1) forwards; opacity: 1 !important; transform: scale(1) !important; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.scroll-container { scrollbar-width: none; }
.scroll-container::-webkit-scrollbar { display: none; }

.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.toast {
    position: fixed; bottom: 2rem; left: 50%;
    padding: 0.75rem 1.5rem;
    background: var(--text-primary); color: var(--bg-page);
    border-radius: var(--radius-btn);
    font-family: var(--font-body);
    font-size: 0.875rem; font-weight: 500;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    transform: translateX(-50%) translateY(120%);
    transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
    z-index: 1000; white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); }

.qty-btn {
    width: 2.75rem; height: 2.75rem;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-card);
    border: 1px solid var(--border);
    background: var(--bg-card); color: var(--text-primary);
    font-size: 1rem; font-weight: 600;
    cursor: pointer; transition: all 0.15s;
}
.qty-btn:hover { background: var(--bg-card-alt); border-color: var(--border-hover); }

.price-tag { font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
.header-hidden { transform: translateY(-100%); }
.t-display { font-family: var(--font-display); }

.theme-switch {
    width: 2.25rem; height: 2.25rem;
    display: flex; align-items: center; justify-content: center;
    border-radius: 0.75rem; border: 1px solid var(--border);
    background: var(--bg-card); color: var(--text-secondary);
    cursor: pointer; transition: all 0.2s;
}
.theme-switch:hover { border-color: var(--accent); color: var(--accent); }

*:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- Categories Directory Layout ---- */
.category-directory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}
@media (max-width: 1023px) {
    .category-directory-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 767px) {
    .category-directory-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 479px) {
    .category-directory-grid { grid-template-columns: 1fr; }
}

.category-directory-group {
    padding: 1.5rem;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.category-directory-group:nth-child(4n) { border-right: none; }
@media (max-width: 1023px) {
    .category-directory-group:nth-child(4n) { border-right: 1px solid var(--border); }
    .category-directory-group:nth-child(3n) { border-right: none; }
}
@media (max-width: 767px) {
    .category-directory-group:nth-child(3n) { border-right: 1px solid var(--border); }
    .category-directory-group:nth-child(2n) { border-right: none; }
}
@media (max-width: 479px) {
    .category-directory-group { border-right: none; }
}

.category-directory-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    margin-bottom: 0.75rem;
    padding-bottom: 0.625rem;
    border-bottom: 1px solid var(--border);
    transition: opacity 0.2s;
}
.category-directory-header:hover { opacity: 0.7; }

.category-directory-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    opacity: 0.7;
}
.category-directory-header:hover .category-directory-icon {
    opacity: 1;
}

.category-directory-title {
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex: 1;
}

.category-directory-count {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.category-directory-subs {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-directory-sub {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0;
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.8125rem;
    color: var(--text-secondary);
    transition: color 0.15s;
}
.category-directory-sub:hover {
    color: var(--accent);
}

.category-directory-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 14rem;
    background: var(--bg-card-alt) !important;
}

.category-directory-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.35;
    flex-shrink: 0;
}
.category-directory-sub:hover .category-directory-dot {
    opacity: 1;
}

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) {
    .animate-in { opacity: 1; transform: none; transition: none; }
    .particle, .hero-blob { display: none; }
}
