/* ========================================
   GreenMarket — Экологичный маркетплейс
   Цвета: зелёный акцент, тёплый белый фон
   ======================================== */

:root {
    --primary: #2d7d46;
    --primary-dark: #1e5c31;
    --primary-light: #4caf7a;
    --primary-pale: #e8f5e9;
    --accent: #ff9800;
    --accent-light: #fff3e0;
    --danger: #e53935;
    --danger-light: #ffebee;
    --text: #1a1a1a;
    --text-secondary: #5a5a5a;
    --text-muted: #8a8a8a;
    --bg: #faf9f7;
    --bg-card: #ffffff;
    --bg-warm: #f5f3ef;
    --border: #e8e4df;
    --border-light: #f0ede8;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --shadow: 0 4px 20px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.1);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 24px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Sans 3', -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   HEADER
   ======================================== */
.header {
    background: var(--bg-card);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-top {
    background: var(--primary);
    color: white;
    font-size: 13px;
    padding: 6px 0;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-location {
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0.9;
}

.header-location .material-icons { font-size: 16px; }

.header-top-right {
    display: flex;
    gap: 20px;
}

.header-link {
    color: white;
    text-decoration: none;
    opacity: 0.85;
    transition: var(--transition);
    font-weight: 500;
}

.header-link:hover { opacity: 1; text-decoration: underline; }

.header-main {
    padding: 14px 0;
}

.header-main .container {
    display: flex;
    align-items: center;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon {
    font-size: 32px;
    line-height: 1;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.logo-text span {
    color: var(--text);
    font-weight: 400;
}

.search-bar {
    flex: 1;
    max-width: 600px;
    display: flex;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 12px 48px 12px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-family: var(--font-body);
    background: var(--bg-warm);
    transition: var(--transition);
    outline: none;
}

.search-bar input:focus {
    border-color: var(--primary-light);
    background: var(--bg-card);
    box-shadow: 0 0 0 4px rgba(45,125,70,0.08);
}

.search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.search-btn:hover { background: var(--primary-dark); }

.search-btn .material-icons { font-size: 18px; }

.header-actions {
    display: flex;
    gap: 8px;
}

.header-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.header-action:hover {
    background: var(--primary-pale);
    color: var(--primary);
}

.header-action .material-icons { font-size: 24px; }

.header-action-label {
    font-size: 12px;
    font-weight: 500;
}

.cart-badge {
    position: absolute;
    top: 2px;
    right: 6px;
    background: var(--accent);
    color: white;
    font-size: 11px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 8px 0;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition);
    z-index: 101;
}

#user-menu-trigger:hover .user-dropdown,
.user-dropdown:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: block;
    padding: 10px 18px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
    white-space: nowrap;
}

.user-dropdown a:hover {
    background: var(--primary-pale);
    color: var(--primary);
}

.header-nav {
    border-top: 1px solid var(--border-light);
    padding: 10px 0;
    overflow-x: auto;
}

.nav-categories {
    display: flex;
    gap: 8px;
}

.nav-category {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: var(--transition);
}

.nav-category:hover,
.nav-category.active {
    background: var(--primary-pale);
    color: var(--primary);
}

.nav-category .material-icons { font-size: 18px; }

/* ========================================
   HERO
   ======================================== */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 80px 0;
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 56px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--text);
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 440px;
}

.hero-btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 16px 36px;
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(45,125,70,0.25);
}

.hero-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(45,125,70,0.35);
}

.hero-image {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4/3;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.hero-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(45,125,70,0.08) 0%, transparent 60%);
    pointer-events: none;
}

/* ========================================
   SECTIONS
   ======================================== */
.section {
    padding: 60px 0;
}

.section-highlight {
    background: var(--bg-warm);
}

.section-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--text);
}

/* ========================================
   CATEGORIES
   ======================================== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

.category-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px 16px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--primary-light);
}

.category-card .material-icons {
    font-size: 36px;
    color: var(--primary);
    margin-bottom: 12px;
    display: block;
}

.category-card span:last-child {
    font-size: 14px;
    font-weight: 600;
    display: block;
}

/* ========================================
   PRODUCTS
   ======================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-light);
    cursor: pointer;
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-pale);
}

.product-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--bg-warm);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    z-index: 2;
}

.product-badge.badge-hit { background: var(--danger); }
.product-badge.badge-new { background: var(--primary); }

.product-info {
    padding: 14px;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 6px;
}

.product-price-current {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.product-price-old {
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.product-discount {
    font-size: 12px;
    color: var(--danger);
    font-weight: 600;
}

.product-name {
    font-size: 14px;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    color: var(--accent);
}

.product-rating .material-icons { font-size: 14px; }

.product-actions {
    display: flex;
    gap: 8px;
    padding: 0 14px 14px;
}

.btn-add-cart {
    flex: 1;
    background: var(--primary-pale);
    color: var(--primary);
    border: none;
    padding: 10px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition);
}

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

/* ========================================
   FEATURES
   ======================================== */
.features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.feature {
    text-align: center;
    padding: 32px 24px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

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

.feature-icon {
    font-size: 40px !important;
    color: var(--primary);
    margin-bottom: 16px;
}

.feature h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.feature p {
    font-size: 14px;
    color: var(--text-muted);
}

/* ========================================
   CATALOG PAGE
   ======================================== */
.catalog-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    padding: 24px 0;
}

.catalog-sidebar {
    position: sticky;
    top: 140px;
    height: fit-content;
}

.catalog-sidebar h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 14px;
    margin-top: 24px;
}

.catalog-sidebar h3:first-child { margin-top: 0; }

.sidebar-categories {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-category {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    transition: var(--transition);
}

.sidebar-category:hover,
.sidebar-category.active {
    background: var(--primary-pale);
    color: var(--primary);
}

.sidebar-category .material-icons { font-size: 20px; }

.sort-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sort-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.sort-options label:hover { background: var(--bg-warm); }

.sort-options input[type="radio"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
}

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

.catalog-header h1 {
    font-family: var(--font-display);
    font-size: 28px;
}

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

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
}

.pagination button {
    padding: 10px 16px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
}

.pagination button:hover,
.pagination button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ========================================
   PRODUCT DETAIL
   ======================================== */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    padding: 32px 0;
}

.product-detail-gallery {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-warm);
    aspect-ratio: 1;
}

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

.product-detail-info h1 {
    font-family: var(--font-display);
    font-size: 32px;
    margin-bottom: 16px;
}

.product-detail-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-muted);
}

.product-detail-price {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--primary-pale);
    border-radius: var(--radius);
}

.product-detail-price .current {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}

.product-detail-price .old {
    font-size: 20px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.product-detail-price .discount {
    background: var(--danger);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
}

.product-detail-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.product-detail-desc {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
}

.product-detail-reviews {
    margin-top: 32px;
}

.product-detail-reviews h3 {
    font-family: var(--font-display);
    font-size: 22px;
    margin-bottom: 20px;
}

.review-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.review-author {
    font-weight: 600;
}

.review-date {
    font-size: 13px;
    color: var(--text-muted);
}

.review-rating {
    color: var(--accent);
    margin-bottom: 6px;
}

.review-text {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ========================================
   CART
   ======================================== */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    padding: 24px 0;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 20px;
    align-items: center;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    margin-bottom: 12px;
    border: 1px solid var(--border-light);
}

.cart-item-image {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-warm);
}

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

.cart-item-info h3 {
    font-size: 16px;
    margin-bottom: 6px;
}

.cart-item-info .price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.qty-btn:hover {
    background: var(--primary-pale);
    border-color: var(--primary);
}

.cart-item-qty {
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.cart-item-remove {
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    transition: var(--transition);
}

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

.cart-summary {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border-light);
    height: fit-content;
    position: sticky;
    top: 140px;
}

.cart-summary h3 {
    font-family: var(--font-display);
    font-size: 20px;
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 15px;
}

.summary-row.total {
    font-size: 20px;
    font-weight: 700;
    padding-top: 16px;
    border-top: 2px solid var(--border);
    margin-top: 16px;
}

.cart-empty {
    text-align: center;
    padding: 80px 20px;
}

.cart-empty .material-icons {
    font-size: 64px;
    color: var(--border);
    margin-bottom: 16px;
}

/* ========================================
   ORDERS
   ======================================== */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px 0;
}

.order-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.order-card:hover {
    box-shadow: var(--shadow);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.order-id {
    font-weight: 700;
    font-size: 16px;
}

.order-status {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.order-status.pending { background: var(--accent-light); color: var(--accent); }
.order-status.processing { background: #e3f2fd; color: #1976d2; }
.order-status.shipped { background: var(--primary-pale); color: var(--primary); }
.order-status.delivered { background: #e8f5e9; color: #388e3c; }
.order-status.cancelled { background: var(--danger-light); color: var(--danger); }

.order-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

.order-info div strong {
    display: block;
    color: var(--text);
    margin-bottom: 4px;
}

/* ========================================
   PROFILE
   ======================================== */
.profile-card {
    display: flex;
    align-items: center;
    gap: 24px;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 40px;
    border: 1px solid var(--border-light);
    margin-top: 24px;
}

.profile-avatar .material-icons {
    font-size: 80px;
    color: var(--primary-light);
}

.profile-info h2 {
    font-family: var(--font-display);
    font-size: 28px;
    margin-bottom: 8px;
}

.profile-info p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* ========================================
   SELLER DASHBOARD
   ======================================== */
.seller-tabs,
.admin-tabs {
    display: flex;
    gap: 8px;
    margin: 24px 0;
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 0;
}

.seller-tab,
.admin-tab {
    padding: 12px 24px;
    border: none;
    background: none;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
    font-family: var(--font-body);
}

.seller-tab.active,
.admin-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.seller-panel,
.admin-panel {
    display: none;
}

.seller-panel.active,
.admin-panel.active {
    display: block;
}

.product-form {
    max-width: 600px;
    background: var(--bg-card);
    padding: 32px;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
}

/* ========================================
   ADMIN
   ======================================== */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 24px 0;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border-light);
    text-align: center;
}

.stat-card .value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    font-family: var(--font-display);
}

.stat-card .label {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: 14px 18px;
    text-align: left;
    font-size: 14px;
    border-bottom: 1px solid var(--border-light);
}

.admin-table th {
    background: var(--bg-warm);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.admin-table tr:hover td {
    background: var(--bg-warm);
}

/* ========================================
   MODAL
   ======================================== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    align-items: center;
    justify-content: center;
}

.modal.active { display: flex; }

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.modal-close:hover { color: var(--text); }

.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border-light);
}

.auth-tab {
    padding: 10px 20px;
    border: none;
    background: none;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
    font-family: var(--font-body);
}

.auth-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.auth-panel { display: none; }
.auth-panel.active { display: block; }

/* ========================================
   FORMS
   ======================================== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: var(--font-body);
    background: var(--bg-warm);
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-light);
    background: var(--bg-card);
    box-shadow: 0 0 0 4px rgba(45,125,70,0.08);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 18px;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: var(--font-body);
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(45,125,70,0.3);
}

.btn-block { width: 100%; }

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

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

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

.btn-danger:hover { background: #c62828; }

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--text);
    color: white;
    padding: 60px 0 0;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    opacity: 0.7;
}

.footer-col a {
    display: block;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 10px;
    transition: var(--transition);
}

.footer-col a:hover {
    color: white;
}

.footer-col p {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    line-height: 1.7;
}

.footer .logo-text { color: white; }
.footer .logo-text span { color: var(--primary-light); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
}

/* ========================================
   UTILITIES
   ======================================== */
.page { display: none !important; }
.page.active { display: block !important; }

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--text);
    color: white;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    z-index: 300;
    animation: toastIn 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.toast.success { background: var(--primary); }
.toast.error { background: var(--danger); }

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

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    .hero { grid-template-columns: 1fr; text-align: center; }
    .hero-subtitle { margin-left: auto; margin-right: auto; }
    .hero-image { max-width: 500px; margin: 0 auto; }
    .catalog-layout { grid-template-columns: 1fr; }
    .catalog-sidebar { position: static; }
    .product-detail { grid-template-columns: 1fr; }
    .cart-layout { grid-template-columns: 1fr; }
    .cart-summary { position: static; }
    .features { grid-template-columns: repeat(2, 1fr); }
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .header-main .container { flex-wrap: wrap; gap: 12px; }
    .search-bar { order: 3; max-width: 100%; }
    .hero-title { font-size: 36px; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .features { grid-template-columns: 1fr; }
    .admin-stats { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .order-info { grid-template-columns: 1fr; }
    .cart-item { grid-template-columns: 80px 1fr; }
    .cart-item-actions { grid-column: 1 / -1; justify-content: flex-end; }
}
