/* ========================================
   Remove external font dependencies, use system fonts
   ======================================== */

:root {
    --primary: #0e8b8b;
    --primary-dark: #0a6b6b;
    --secondary: #f4a261;
    --ink: #1f2a37;
    --muted: #6b7280;
    --bg: #f8f5f0;
    --surface: #ffffff;
    --surface-2: #f1eee7;
    --border: rgba(31, 42, 55, 0.12);
    --shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
    --glow: 0 12px 30px rgba(14, 139, 139, 0.18);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --container: 1200px;
    
    /* System font stack, no external dependency */
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-display: Georgia, "Times New Roman", serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: radial-gradient(circle at 20% 20%, #ffffff 0%, var(--bg) 45%, #efe9df 100%);
    min-height: 100vh;
}

.site-shell {
    position: relative;
    overflow: hidden;
}

.site-shell::before,
.site-shell::after {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    opacity: 0.35;
    filter: blur(10px);
    z-index: 0;
}

.site-shell::before {
    top: -220px;
    right: -160px;
    background: radial-gradient(circle, rgba(14, 139, 139, 0.35), transparent 70%);
}

.site-shell::after {
    bottom: -260px;
    left: -120px;
    background: radial-gradient(circle, rgba(244, 162, 97, 0.35), transparent 70%);
}

.page {
    position: relative;
    z-index: 1;
    padding-bottom: 80px;
}

.container {
    width: min(100% - 48px, var(--container));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: rgba(248, 245, 240, 0.8);
    border-bottom: 1px solid rgba(31, 42, 55, 0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.brand-logo {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid rgba(14, 139, 139, 0.3);
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #5ad1c9);
    display: grid;
    place-items: center;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.12em;
}

.brand-name {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
}

.nav {
    display: flex;
    gap: 18px;
}

.nav-link {
    text-decoration: none;
    color: var(--muted);
    font-weight: 500;
    position: relative;
    padding-bottom: 6px;
}

.nav-link.active,
.nav-link:hover {
    color: var(--ink);
}

.nav-link.active::after,
.nav-link:hover::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    border-radius: 999px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav-search {
    position: relative;
    display: inline-block;
}

.nav-search input {
    border: 1px solid transparent;
    background: var(--surface);
    border-radius: 999px;
    padding: 10px 42px 10px 16px;
    width: 220px;
    font-size: 14px;
    transition: all 0.2s ease;
    box-shadow: inset 0 0 0 1px rgba(31, 42, 55, 0.08);
    font-family: var(--font-body);
}

.nav-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 139, 139, 0.15);
}

.search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--primary);
    padding: 0;
    border-radius: 50%;
}

.search-btn:hover {
    background: rgba(14, 139, 139, 0.1);
    color: var(--primary-dark);
}

.search-btn:active {
    transform: translateY(-50%) scale(0.9);
}

.search-btn svg {
    width: 16px;
    height: 16px;
}

.cart-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--ink);
    background: var(--surface);
    padding: 8px 16px;
    border-radius: 999px;
    box-shadow: var(--shadow);
    font-weight: 600;
}

.cart-count {
    background: var(--primary);
    color: #fff;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 12px;
}

/* User menu */
.user-menu {
    position: relative;
}

.user-menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: none;
    padding: 8px 16px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    color: var(--ink);
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
}

.user-menu-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.user-menu-btn svg {
    width: 20px;
    height: 20px;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--surface);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--ink);
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(31, 42, 55, 0.08);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: var(--bg);
    color: var(--primary);
}

.dropdown-item svg {
    width: 16px;
    height: 16px;
}

/* Sign-in link */
.login-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    padding: 8px 16px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--ink);
    font-weight: 600;
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
}

.login-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: var(--primary);
}

.login-link svg {
    width: 20px;
    height: 20px;
}

.hero {
    padding: 90px 0 60px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(36px, 5vw, 56px);
    margin: 0 0 18px;
}

.hero p {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.6;
    margin: 0 0 28px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn.primary {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--glow);
}

.btn.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn.ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--border);
}

.btn.ghost:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.hero-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 26px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.hero-card::after {
    content: "";
    position: absolute;
    top: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(244, 162, 97, 0.35), transparent 70%);
}

.hero-card img {
    width: 100%;
    border-radius: var(--radius-md);
    object-fit: cover;
    height: 340px;
}

.section {
    padding: 40px 0 20px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-title h2 {
    font-family: var(--font-display);
    margin: 0;
    font-size: 28px;
}

.section-title p {
    margin: 0;
    color: var(--muted);
}

.category-pill-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.category-pill {
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
}

.category-pill.active {
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}

.highlight-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.highlight-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}

.highlight-card:hover {
    transform: translateY(-6px);
}

.highlight-card h3 {
    margin-top: 0;
    margin-bottom: 8px;
}

.category-section {
    margin-top: 42px;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.category-header h3 {
    margin: 0;
    font-size: 22px;
}

.category-header span {
    color: var(--muted);
    font-size: 14px;
}

.category-spotlight {
    display: grid;
    grid-template-columns: 1.1fr 1.4fr;
    gap: 28px;
    align-items: start;
}

.spotlight-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    position: relative;
    height: 100%;
    max-height: 520px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.spotlight-card .hero-image-wrapper {
    margin-bottom: 18px;
    flex-shrink: 0;
}

.spotlight-card .hero-image-wrapper img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: var(--radius-md);
    display: block;
}

.spotlight-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    flex: 1;
    overflow: hidden;
}

.spotlight-meta h4 {
    margin: 0 0 8px 0;
    font-size: 20px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.spotlight-meta p {
    margin: 0 0 12px 0;
    color: var(--muted);
    line-height: 1.6;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.spotlight-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: auto;
    flex-shrink: 0;
}

.spotlight-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.price {
    font-weight: 700;
    font-size: 20px;
}

.product-grid {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) rgba(14, 139, 139, 0.1);
    padding-bottom: 12px;
}

.product-grid::-webkit-scrollbar {
    height: 8px;
}

.product-grid::-webkit-scrollbar-track {
    background: rgba(14, 139, 139, 0.1);
    border-radius: 4px;
}

.product-grid::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.product-grid::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.product-grid .product-card {
    flex: 0 0 calc(50% - 9px);
    min-width: calc(50% - 9px);
}

/* Note: detailed .product-card styles live in enhancements.css */

.badge {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(14, 139, 139, 0.12);
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
}

.featured-tag {
    position: absolute;
    top: 18px;
    left: 18px;
    background: var(--secondary);
    color: #fff;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-divider {
    margin: 40px 0 0;
    border-top: 1px solid rgba(31, 42, 55, 0.08);
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 60px 0;
}

.product-detail img {
    width: 100%;
    border-radius: var(--radius-lg);
    object-fit: cover;
    box-shadow: var(--shadow);
}

.product-detail h1 {
    font-family: var(--font-display);
    margin-top: 0;
}

.product-detail .detail-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.cart-layout,
.checkout-layout {
    padding: 40px 0 80px;
}

.panel {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow);
}

input[type="text"],
input[type="email"],
input[type="search"],
textarea {
    width: 100%;
    border: 1px solid rgba(31, 42, 55, 0.12);
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 14px;
    font-family: var(--font-body);
    background: #fff;
    transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 139, 139, 0.12);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th,
.table td {
    text-align: left;
    padding: 12px 8px;
    border-bottom: 1px solid rgba(31, 42, 55, 0.08);
}

.empty-state {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    text-align: center;
    box-shadow: var(--shadow);
}

.site-footer {
    padding: 48px 0 28px;
    background: var(--surface-2);
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 24px;
}

.footer-grid h4 {
    margin-top: 0;
}

.footer-grid a {
    text-decoration: none;
    color: var(--muted);
    display: block;
    margin-bottom: 8px;
}

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

.footer-bottom {
    margin-top: 20px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

.fade-up {
    animation: fadeUp 0.4s ease both;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
