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

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

html {
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.top-bar {
    background: #2563eb;
    color: #fff;
    font-size: 0.95rem;
}

.top-bar__content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.5rem 0;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
}

.top-bar__link {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.top-bar__link:hover {
    text-decoration: none;
    color: #fff;
}

.top-bar__address {
    color: #fff;
}

.top-bar__content,
.top-bar__address,
.top-bar__link {
    word-break: break-word;
}

.top-bar__viber-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.top-bar__content > * {
    display: inline-flex;
    align-items: center;
}

@media (max-width: 640px) {
    .top-bar__content {
        justify-content: center;
        text-align: center;
    }
    .top-bar__address {
        width: 100%;
        justify-content: center;
        display: inline-flex;
    }
}

.header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 1.5rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Mobile menu toggle (бургер) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    margin-right: 0.75rem;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-dark);
    margin: 4px 0;
    transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
}

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

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

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

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
}

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

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    position: relative;
}

.lang-switch {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 0.95rem;
    margin-left: auto;
}
.lang-switch a {
    color: var(--text-dark);
    text-decoration: none;
    opacity: 1;
}
.lang-switch a.active {
    color: var(--primary-color);
    opacity: 1;
}

.search-overlay {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: min(480px, calc(100vw - 40px));
    background: #fff;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    border-radius: 0.75rem;
    padding: 0.75rem;
    display: none;
    z-index: 1200;
}

.search-overlay.open {
    display: block;
}

.search-form {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.5rem;
    align-items: center;
}

.search-form input[type="text"] {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    outline: none;
}

.search-form input[type="text"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.search-submit {
    padding: 0.65rem 1rem;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
}

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

.search-close {
    position: static;
    background: #f3f4f6;
    border: 1px solid var(--border-color);
    padding: 0.65rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    cursor: pointer;
    color: var(--text-light);
    line-height: 1;
}
.search-close:hover {
    color: var(--text-dark);
}

@media (max-width: 768px) {
    .search-overlay {
        position: fixed;
        top: 12px;
        left: 16px;
        right: 16px;
        width: auto;
    }

    .search-form {
        grid-template-columns: 1fr auto auto;
    }

    .search-submit {
        width: 100%;
    }

    .search-close {
        top: -2px;
        right: -2px;
    }
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-dark);
    position: relative;
    transition: color 0.3s;
}

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

.cart-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-total-header {
    margin-left: 0.75rem;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.9rem;
    white-space: nowrap;
    text-decoration: none;
}

.cart-total-header:hover {
    text-decoration: none;
}

/* Cart */
.cart-page {
    padding: 3rem 0;
    min-height: calc(100vh - 320px); /* чтобы footer не прилипал при малом контенте */
}

.cart-page .page-title {
    margin-bottom: 1.5rem;
}

.cart-empty {
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 0.75rem;
}

.cart-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-white);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    position: relative;
}

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

.cart-item-info h3 {
    margin: 0 0 0.25rem 0;
}

.cart-item-info h3 a {
    color: var(--text-dark);
    text-decoration: none;
}

.cart-item-info h3 a:hover {
    color: var(--primary-color);
}

.cart-item-info {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.cart-item-price {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.25rem 0 0.75rem 0;
}

.cart-item-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.qty-control {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.qty-btn {
    width: 42px;
    height: 42px;
    border: 1px solid var(--primary-color);
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.qty-btn:hover { background: var(--primary-color); color: #fff; }

.cart-item-actions input[type="number"] {
    width: 64px;
    padding: 0.35rem 0.5rem;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    border: none;
    background: transparent;
    outline: none;
}

/* убираем стрелки у number */
.cart-item-actions input[type="number"]::-webkit-outer-spin-button,
.cart-item-actions input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.cart-item-actions input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.cart-item-subtotal {
    font-weight: 600;
    text-align: right;
    position: static;
    width: 100%;
    margin-top: 0.35rem;
    font-size: 0.95rem;
}

.cart-summary {
    padding: 1.25rem;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 100px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cart-summary h3 {
    margin-top: 0;
}

.cart-summary .btn {
    width: 100%;
    text-align: center;
}

.cart-summary .btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    font-weight: 600;
}

.cart-summary .btn-secondary:hover {
    background: var(--primary-color);
    color: #fff;
}

.cart-summary .btn-secondary {
    margin-top: 0;
}

.checkout-options {
    margin-bottom: 1.5rem;
}

.checkout-section {
    margin-bottom: 1rem;
}

.checkout-section h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.checkout-radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.checkout-radio-card {
    position: relative;
    cursor: pointer;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem;
    background: #fff;
    transition: all 0.2s ease;
    text-align: center;
}

.checkout-radio-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.checkout-radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkout-radio-card input[type="radio"]:checked + .radio-content {
    background: var(--primary-color);
    color: #fff;
}

.radio-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.25rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.radio-text {
    font-weight: 500;
    font-size: 0.85rem;
}

.cart-remove {
    margin-left: auto;
    width: 40px;
    height: 40px;
    border: none;
    background: #fef2f2;
    border-radius: 50%;
    cursor: pointer;
    position: absolute;
    right: 8px;
    top: 8px;
    box-shadow: var(--shadow-sm);
}

.cart-remove::before {
    content: "🗑";
    display: block;
    text-align: center;
    font-size: 16px;
    color: #dc2626;
    line-height: 40px;
}

.cart-remove:hover { background: #fee2e2; }

@media (max-width: 900px) {
    .cart-grid {
        grid-template-columns: 1fr;
    }
    .cart-summary {
        position: sticky;
        top: 20px;
    }
}

/* Hero Section */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 8rem 0;
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-image-only {
    padding: 0;
    background: none;
    position: relative;
}

.hero-image-only::before {
    display: none;
}

.hero-main-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 620px;
}

.hero-image-only::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 120px;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.75) 60%,
        rgba(255,255,255,0.95) 85%,
        #fff 100%
    );
    pointer-events: none;
}

@media (max-width: 768px) {
    .hero-main-image {
        max-height: 380px;
    }
}

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

/* Buttons */
.btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

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

.btn-logout-primary {
    background: #2563eb;
    color: #fff;
    border: none;
}

.btn-logout-primary:hover {
    background: #1d4ed8;
    box-shadow: var(--shadow-lg);
}

.btn-logout-cancel {
    background: #dc2626;
    color: #fff;
    border: none;
}

.btn-logout-cancel:hover {
    background: #b91c1c;
    box-shadow: var(--shadow-lg);
}


/* Product reviews */
.product-reviews {
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}
.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.review-form {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    background: #f9fafb;
    margin-bottom: 1rem;
}
.review-form__heading {
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.review-form__rating {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 0.75rem;
}
.review-form__rating select {
    width: 120px;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}
.review-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    resize: vertical;
    min-height: 90px;
}
.review-form__actions {
    margin-top: 0.75rem;
    display: flex;
    gap: 10px;
    align-items: center;
}
.review-form .btn-secondary {
    background: #e5e7eb;
    color: #111827;
    border: 1px solid #d1d5db;
}
.review-form .btn-secondary:hover {
    background: #d1d5db;
    color: #111827;
}
.review-hint {
    margin-top: 0.35rem;
    color: var(--text-light);
}
.review-hint.error {
    color: #dc2626;
}
.review-auth-hint {
    border: 1px dashed var(--border-color);
    padding: 1rem;
    border-radius: 10px;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.review-card {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 14px;
    background: #fff;
}
.review-form__rating {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}
.review-stars-input {
    display: inline-flex;
    justify-content: flex-start;
    gap: 8px;
    align-items: center;
}
.review-star-btn {
    background: none;
    border: none;
    padding: 4px;
    font-size: 1.6rem;
    color: #e5e7eb;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.2s ease, color 0.2s ease;
}
.review-star-btn.filled {
    color: var(--secondary-color);
}
.review-star-btn:hover {
    transform: scale(1.15) rotate(-3deg);
}
.review-star-btn:focus-visible {
    outline: 2px solid var(--secondary-color);
    border-radius: 6px;
}
.review-star-btn.pop {
    animation: starPop 0.3s ease;
}
@keyframes starPop {
    0% { transform: scale(0.9); }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); }
}
.review-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.review-stars {
    position: relative;
    display: inline-block;
    line-height: 1;
}
.review-stars .stars-base,
.review-stars .stars-fill {
    font-size: 1.1rem;
    letter-spacing: 1px;
}
.review-stars .stars-base {
    color: #e5e7eb;
}
.review-stars .stars-fill {
    position: absolute;
    left: 0;
    top: 0;
    white-space: nowrap;
    overflow: hidden;
    color: var(--secondary-color);
    transition: width 0.2s ease;
}
.review-card__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.review-actions-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
.review-author {
    font-weight: 700;
}
.review-actions {
    display: flex;
    gap: 8px;
}
.review-action {
    border: none;
    background: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.review-action.edit {
    color: #2563eb;
}
.review-action.delete {
    color: #dc2626;
}
.review-action:hover {
    background: #f3f4f6;
}
.review-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 6px;
}
.review-date {
    color: var(--text-light);
    font-size: 0.9rem;
}
.review-text {
    margin: 0;
    white-space: pre-wrap;
}

.btn-product {
    width: 100%;
    background: var(--primary-color);
    color: white;
    padding: 0.85rem 1rem;
    margin: 0;
    margin-top: auto;
    border-radius: 0 0 1rem 1rem;
    border-top: 1px solid var(--border-color);
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
}

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

.btn-product-out,
.btn-product:disabled,
.btn.btn-primary.btn-large.btn-product-out,
.btn.btn-primary.btn-large:disabled {
    background: #ef4444;
    cursor: not-allowed;
    color: #fff;
    pointer-events: none;
}

/* Специальная кнопка для Viber */
.btn-viber {
    background: #7332a8;
    color: #ffffff;
}

.btn-viber:hover {
    background: #5b2584;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Sections */
section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

/* Categories */
.categories {
    background: var(--bg-light);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.category-card {
    display: block;
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

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

.category-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    background: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.category-image {
    width: 70%;
    height: 70%;
    object-fit: contain;
    border-radius: 8px;
}

.category-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.category-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.category-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.category-link:hover {
    color: var(--primary-dark);
}

/* Products */
.featured {
    background: var(--bg-white);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.6rem;
    grid-auto-rows: 1fr;
}

.product-card {
    background: var(--bg-white);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    will-change: transform;
    display: flex;
    flex-direction: column;
    height: calc(100% - 20%);
    align-items: stretch;
    position: relative;
    padding-bottom: 120px; /* место под кнопку + доп. высота */
}

/* Уменьшаем карточки в блоке "Популярные товары" */
.featured .product-card {
    height: auto;
    padding-bottom: 20px;
}

.featured .product-image {
    height: 160px;
}

.featured .product-info {
    padding: 1rem 1rem 0.75rem;
}

.featured .product-price {
    margin-bottom: 0.5rem;
}

.featured .product-rating {
    margin-bottom: 0.3rem;
}

.product-card:hover {
    transform: scale(1.08);
    box-shadow: 0 20px 36px -12px rgb(0 0 0 / 0.28);
}

.product-image {
    width: 100%;
    height: 150px;
    background: #ffffff;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.product-image::after {
    content: '';
    font-size: 0;
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--secondary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-info h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    max-width: 20ch;
    padding-right: 1.2rem;
    position: relative;
    -webkit-mask-image: linear-gradient(90deg, #000 70%, rgba(0,0,0,0) 100%);
    mask-image: linear-gradient(90deg, #000 70%, rgba(0,0,0,0) 100%);
}


.product-brand {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.product-sku {
    color: var(--text-light);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.product-rating .stars {
    position: relative;
    display: inline-block;
    line-height: 1;
    color: var(--secondary-color);
}
.product-rating .stars-base,
.product-rating .stars-fill {
    font-size: 1rem;
    letter-spacing: 1px;
}
.product-rating .stars-base {
    color: #e5e7eb;
}
.product-rating .stars-fill {
    position: absolute;
    left: 0;
    top: 0;
    white-space: nowrap;
    overflow: hidden;
    color: var(--secondary-color);
}

.rating-count {
    color: var(--text-light);
    font-size: 0.875rem;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.price-current {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.price-old {
    font-size: 1rem;
    color: var(--text-light);
    text-decoration: line-through;
}

/* Features */
.features {
    background: var(--bg-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-item {
    text-align: center;
    padding: 2rem;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.feature-item p {
    color: var(--text-light);
}

/* About */
.about {
    background: var(--bg-white);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 3rem;
}

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

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-light);
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.scroll-top-btn {
    position: fixed;
    right: 120px;
    bottom: 156px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: var(--primary-color);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

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

.scroll-top-btn.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
}

@keyframes pulse-once {}

.contact-block {
    transition: none;
    will-change: auto;
}

.contact-block.pulse {
    animation: none;
}

.contact-block.pulse h4,
.contact-block.pulse li {
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    .scroll-top-btn {
        right: 16px;
        bottom: 16px;
    }
    .category-card h3 {
        font-size: 1rem;
        line-height: 1.2;
        word-break: break-word;
        hyphens: auto;
    }
    .categories-grid .category-card p {
        display: none;
    }
    .container {
        padding: 0 16px;
    }

    .logo h1 {
        font-size: 1.25rem;
    }

    .header-content {
        gap: 0.75rem;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .header-actions {
        gap: 0.5rem;
        flex-wrap: wrap;
        margin-left: auto;
    }

    .nav {
        margin: 0;
    }

    .cart-total-header {
        font-size: 0.9rem;
        line-height: 1.2;
        max-width: 140px;
        white-space: normal;
        display: inline-flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        text-align: right;
    }

    .menu-toggle {
        display: block;
    }

    .nav {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-white);
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 1.5rem 1.5rem;
        transform: translateY(-120%);
        opacity: 0;
        pointer-events: none;
        box-shadow: var(--shadow-md);
        z-index: 900;
    }

    .nav.nav-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    .btn-auth {
        width: 40px;
        height: 40px;
        max-width: none;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
    }

    .btn-auth__text {
        display: none;
    }

    .btn-auth__icon {
        display: block;
    }

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

    .section-title {
        font-size: 2rem;
    }

    .categories-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stats {
        flex-direction: column;
        gap: 2rem;
    }

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

@media (max-width: 768px) {
    .header-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .cart-total-header {
        max-width: 100%;
    }

    /* На телефоне кнопка входа должна выглядеть как кнопка-иконка корзины */
    .btn-auth {
        background: none;
        border: none;
        color: var(--text-dark);
        padding: 0.5rem;
        width: auto;
        height: auto;
        border-radius: 0;
        box-shadow: none;
        transform: none;
    }

    .btn-auth:hover {
        background: none;
        color: var(--primary-color);
        box-shadow: none;
        transform: none;
    }

    .btn-auth__text {
        display: none !important;
    }

    .btn-auth__icon {
        display: block;
    }
}

/* Catalog Page */
.catalog-page {
    padding: 3rem 0;
    min-height: 60vh;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.catalog-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    align-items: start;
}

.catalog-sidebar {
    position: sticky;
    top: 100px;
}

.category-filter-sidebar {
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.category-filter-sidebar h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: var(--text-dark);
}

.filter-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-link {
    display: block;
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.filter-link:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.filter-link.active {
    background: var(--primary-color);
    color: white;
    font-weight: 700;
}

.catalog-content {
    min-width: 0;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    align-items: start;
}

.catalog-sidebar {
    position: sticky;
    top: 100px;
}

.category-filter-sidebar {
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.category-filter-sidebar h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: var(--text-dark);
}

.filter-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-link {
    display: block;
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.9rem;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.filter-link:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.filter-link.active {
    background: var(--primary-color);
    color: white;
    font-weight: 500;
}

.filter-sublist {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin: -0.15rem 0 0.45rem 0.85rem;
    padding: 0.25rem 0 0.15rem 0.35rem;
}

.filter-link-sub {
    position: relative;
    padding: 0.32rem 0.7rem;
    border-radius: 0.45rem;
    font-size: 0.76rem;
    font-weight: 400;
    line-height: 1.25;
    color: var(--text-light);
    background: rgba(248, 250, 252, 0.72);
}

.filter-link-sub.active {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary-color);
    border-color: rgba(37, 99, 235, 0.16);
    font-weight: 400;
}

.filter-season {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin: 0.15rem 0 0.55rem 1.2rem;
    padding: 0.6rem 0.65rem;
    border-radius: 0.65rem;
    background: rgba(248, 250, 252, 0.8);
}

.filter-season-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.filter-season-link {
    display: block;
    padding: 0.32rem 0.55rem;
    border-radius: 0.45rem;
    color: var(--text-light);
    font-size: 0.78rem;
    font-weight: 400;
    line-height: 1.25;
    text-decoration: none;
    transition: all 0.2s;
}

.filter-season-link:hover,
.filter-season-link.active {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary-color);
}

.catalog-content {
    min-width: 0;
}

.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: var(--bg-light);
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s;
    border: 2px solid transparent;
}

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

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-dark);
}

.catalog-results {
    margin-top: 0;
    align-items: center;
}

.sort-control {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.85rem;
    border: 1px solid #bfdbfe;
    border-radius: 0.65rem;
    background: #eff6ff;
    box-shadow: var(--shadow-sm);
    margin-top: -0.5rem;
}
.sort-control label {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0;
    white-space: nowrap;
}
.sort-control select {
    padding: 0.45rem 0.6rem;
    border-radius: 0.55rem;
    border: 1px solid var(--primary-color);
    background: #fff;
    color: var(--text-dark);
    font-size: 0.95rem;
    cursor: pointer;
}
.sort-control select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.results-count {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.results-count strong {
    color: var(--text-dark);
}

.no-products {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-category {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.stock-info {
    display: block;
    font-size: 0.875rem;
    margin-top: auto;
    color: var(--success-color);
}

.stock-info.out-of-stock {
    color: #ef4444;
}

/* Product Page */
.product-page {
    padding: 3rem 0;
}

.breadcrumbs {
    margin-bottom: 2rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs span {
    color: var(--text-dark);
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.product-image-large {
    position: sticky;
    top: 100px;
    text-align: center;
}

.product-image-large img,
.product-main-image {
    max-width: 100%;
    max-height: 600px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 1rem;
    display: block;
    margin: 0 auto;
}

.product-image-placeholder {
    width: 100%;
    height: 500px;
    background: #ffffff;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 8rem;
}

.product-details h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.product-brand-large {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.product-details .product-sku {
    color: #111;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.product-rating-large {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.product-rating-large .rating-count {
    color: var(--text-light);
    font-weight: 600;
}

.product-rating-large .stars {
    position: relative;
    display: inline-block;
    line-height: 1;
}

.product-rating-large .stars-base,
.product-rating-large .stars-fill {
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.product-rating-large .stars-base {
    color: #e5e7eb;
}

.product-rating-large .stars-fill {
    position: absolute;
    left: 0;
    top: 0;
    white-space: nowrap;
    overflow: hidden;
    color: var(--secondary-color);
    transition: width 0.2s ease;
}

.product-price-large {
    margin-bottom: 1.5rem;
}

.product-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.price-cart-btn {
    border: none;
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary-color);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.05rem;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.price-cart-btn:hover:not(:disabled) {
    color: var(--primary-dark);
    background: rgba(37, 99, 235, 0.18);
}

.price-cart-btn:disabled {
    color: #ef4444;
    cursor: not-allowed;
}

.product-price-large .price-current {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.product-price-large .price-old {
    font-size: 1.5rem;
    margin-left: 1rem;
}

.product-stock {
    margin-bottom: 2rem;
}

.stock-available {
    color: var(--success-color);
    font-weight: 600;
    font-size: 1.125rem;
}

.stock-unavailable {
    color: #ef4444;
    font-weight: 600;
    font-size: 1.125rem;
}

.product-description {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 0.5rem;
}

.product-description h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.product-description p {
    color: var(--text-light);
    line-height: 1.8;
}

.product-actions {
    margin-top: 2rem;
}

.btn-large {
    padding: 1rem 3rem;
    font-size: 1.125rem;
}

.related-products {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border-color);
}

@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-image-large {
        position: static;
    }

    .product-image-placeholder {
        height: 300px;
        font-size: 5rem;
    }

    .product-details h1 {
        font-size: 1.75rem;
    }

    .product-price-large .price-current {
        font-size: 2rem;
    }

    .catalog-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .catalog-sidebar {
        position: static;
    }

    .category-filter {
        flex-direction: column;
    }

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

/* Reviews Section */
.reviews-section {
    background: var(--bg-light);
    padding: 5rem 0;
}

.reviews-carousel-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 2rem auto 0;
    overflow: hidden;
    padding: 0 6rem;
}

.reviews-carousel {
    display: flex;
    transition: transform 0.5s ease;
    gap: 2rem;
    align-items: stretch;
}

.reviews-carousel .review-card {
    min-width: calc(100% - 4rem);
    max-width: calc(100% - 4rem);
    flex-shrink: 0;
    margin: 0 2rem;
    opacity: 0.5;
    transform: scale(0.9);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reviews-carousel .review-card.active {
    opacity: 1;
    transform: scale(1);
}

.review-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.5s ease;
}

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

.review-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.review-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.review-info {
    flex: 1;
}

.review-name {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.review-rating {
    color: var(--secondary-color);
    font-size: 1rem;
}

.review-text {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.review-product {
    font-size: 0.875rem;
    color: var(--text-light);
    font-style: italic;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
    color: var(--text-dark);
    box-shadow: var(--shadow-md);
}

.carousel-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-lg);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-btn-prev {
    left: 0;
}

.carousel-btn-next {
    right: 0;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    padding: 0;
}

.carousel-dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

.carousel-dot:hover {
    background: var(--primary-dark);
}

@media (max-width: 768px) {
    .reviews-carousel-wrapper {
        padding: 0 3.5rem;
    }

    .reviews-carousel .review-card {
        min-width: calc(100% - 2rem);
        max-width: calc(100% - 2rem);
        margin: 0 1rem;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
    }

    .carousel-btn-prev {
        left: 0.5rem;
    }

    .carousel-btn-next {
        right: 0.5rem;
    }

    .review-card {
        padding: 1.5rem;
    }

    .review-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

.category-icon img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.footer-section ul {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 4px; /* можно подправить под себя */
}

/* Убираем маркеры на всякий случай во всех браузерах */
.footer-section ul li::marker {
    content: "";
}

.search-suggestions {
    margin-top: 0.75rem;
    display: none;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    max-height: 420px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 0.5rem;
    background: #fff;
    box-shadow: var(--shadow-lg);
}
.search-suggestions.show { display: grid; }

.search-suggestion-card {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.55rem 0.6rem;
    border: 1px solid transparent;
    border-radius: 0.65rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.search-suggestion-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.08));
    background: #f8fafc;
}

.search-suggestion-thumb {
    width: 52px;
    height: 52px;
    border-radius: 0.5rem;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.search-suggestion-thumb img { width: 100%; height: 100%; object-fit: contain; }
.search-suggestion-thumb.placeholder { color: var(--text-light); font-weight: 600; font-size: 0.9rem; }

.search-suggestion-content h4 { margin: 0; font-size: 0.95rem; line-height: 1.2; }
.search-suggestion-brand { font-size: 0.85rem; color: var(--text-light); }
.search-suggestion-price { margin-top: 0.15rem; font-weight: 700; color: var(--primary-color); }

.search-loading, .search-empty {
    padding: 0.5rem 0.75rem;
    color: var(--text-light);
    font-size: 0.92rem;
}

/* Auth modal */
.auth-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.auth-modal.open {
    display: flex;
}
.auth-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
}
.auth-modal__content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 24px;
    width: 100%;
    max-width: 420px;
    z-index: 1;
}
.auth-modal__close {
    position: absolute;
    right: 12px;
    top: 12px;
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
}
.auth-modal__subtitle {
    color: var(--text-light);
    margin-bottom: 12px;
}
.auth-modal__actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}
.auth-modal label {
    display: block;
    font-weight: 600;
    margin: 12px 0 6px;
}
.auth-modal input[type="tel"],
.auth-modal input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
}
.auth-modal__phone {
    display: flex;
    align-items: center;
    gap: 8px;
}
.auth-modal__phone .prefix {
    padding: 12px;
    background: #f3f4f6;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-weight: 600;
}
.auth-btn {
    width: 100%;
    margin-top: 12px;
}
.code-block {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-color);
}
.auth-hint {
    margin-top: 10px;
    font-size: 0.95rem;
    color: var(--text-light);
}
.auth-hint.error {
    color: #dc2626;
}
.auth-timer {
    margin-top: 6px;
    font-size: 0.9rem;
    color: var(--text-light);
}
.auth-tabs {
    display: inline-flex;
    gap: 6px;
    margin: 12px 0 4px;
}
.auth-tab {
    border: 1px solid var(--border-color);
    background: #f8fafc;
    color: var(--text-dark);
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    font-weight: 600;
}
.auth-tab--active {
    background: var(--secondary-color);
    color: #fff;
    border-color: var(--secondary-color);
}
.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f3f4f6;
    border-radius: 999px;
    text-decoration: none;
    color: inherit;
}
.user-chip__icon {
    font-size: 16px;
}
.user-chip__info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.user-chip__name {
    font-weight: 600;
    font-size: 0.95rem;
}
.user-chip__phone {
    color: var(--text-light);
    font-size: 0.9rem;
}
.btn-logout {
    padding: 8px 16px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #374151;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.btn-logout:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}
.user-chip__edit {
    border: none;
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
}
.btn-auth {
    padding: 0.65rem 1.2rem;
    font-size: 0.95rem;
}
.btn-auth__icon {
    display: none;
}

/* Account page */
.account-page {
    padding: 2rem 0;
}
.account-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 1rem;
    align-items: start;
}
.account-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 1.75rem;
    align-self: start;
}
.account-card.full {
    grid-column: 1 / -1;
}
.account-header {
    margin-bottom: 1.2rem;
}

.account-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.025em;
}
.account-form label {
    display: block;
    font-weight: 600;
    margin: 12px 0 6px;
}
.account-form input,
.account-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.account-form input:focus,
.account-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.account-form textarea {
    resize: vertical;
    min-height: 110px;
}
.account-form input[disabled],
.account-form input[readonly] {
    background: #f8fafc;
    color: var(--text-light);
}
.account-form .actions {
    margin-top: 1.25rem;
    display: flex;
    gap: 12px;
    align-items: center;
}
.account-hint {
    margin-top: 0.35rem;
    font-size: 0.95rem;
    color: var(--text-light);
}
.account-hint.error {
    color: #dc2626;
}
.account-orders {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.order-card {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 14px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: box-shadow 0.2s ease;
}

.order-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.order-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.95rem;
}
.order-status {
    font-weight: 600;
}
.order-detail-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.order-items-list {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.order-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #f8fafc;
    align-items: center;
}
.order-item-image {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--border-color);
}
.order-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.order-item-details {
    flex: 1;
    min-width: 0;
}
.order-item-name {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 0.95rem;
}
.order-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.85rem;
    color: var(--text-light);
}
.order-item-qty,
.order-item-price {
    display: block;
}
.order-item-sum {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary-color);
    flex-shrink: 0;
}
.order-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    margin-top: 12px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
}
.order-total-label {
    font-weight: 600;
}
.order-total-amount {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-color);
}

/* Success notification */
.success-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #10b981;
    color: #fff;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 3000;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    font-weight: 600;
}
.success-notification.show {
    transform: translateX(0);
    opacity: 1;
}
.success-icon {
    font-size: 1.5rem;
    font-weight: bold;
}
.success-text {
    font-size: 1rem;
}

/* Checkout modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2500;
}
.modal-overlay.open { display: flex; }
.modal-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 20px;
    width: 100%;
    max-width: 420px;
    position: relative;
}
.modal-card h3 { margin: 0 0 8px; }
.modal-card p { margin: 0 0 12px; color: var(--text-light); }
.modal-close {
    position: absolute;
    right: 12px;
    top: 10px;
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
}
.modal-actions { display:flex; gap:10px; justify-content:flex-end; margin-top: 8px; }

/* Final mobile override for login icon button in header */
@media (max-width: 768px) {
    .btn-auth,
    .btn-auth.btn-primary {
        background: none !important;
        border: none !important;
        color: var(--text-dark) !important;
        padding: 0.5rem !important;
        width: auto !important;
        height: auto !important;
        max-width: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        transform: none !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }

    .btn-auth:hover,
    .btn-auth.btn-primary:hover {
        background: none !important;
        color: var(--primary-color) !important;
        box-shadow: none !important;
        transform: none !important;
    }

    .btn-auth__text {
        display: none !important;
    }

    .btn-auth__icon {
        display: block !important;
    }

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

    /* Logged-in state: show account as icon-only on mobile */
    .user-chip {
        background: none;
        border-radius: 0;
        padding: 0.5rem;
        gap: 0;
    }

    .user-chip__info {
        display: none;
    }

    .user-chip__icon {
        font-size: 20px;
        line-height: 1;
    }
}

@media (max-width: 480px) {
    /* Hide top contact panel on phone */
    .top-bar {
        display: none;
    }

    .header .container {
        padding-left: 8px;
        padding-right: 8px;
    }

    .header-content {
        padding: 0.7rem 0;
        gap: 0.35rem;
        flex-wrap: nowrap;
        justify-content: flex-start;
    }

    .logo {
        order: 1;
        flex: 0 0 auto;
        margin-right: 0.25rem;
    }

    .logo-title {
        font-size: 0 !important;
        line-height: 1;
    }

    .logo-title::before {
        content: "G";
        font-size: 1.25rem;
        display: inline-block;
        color: var(--primary-color);
        font-weight: 700;
    }

    .menu-toggle {
        order: 2;
        margin-right: 0.25rem;
        padding: 0.5rem;
        flex: 0 0 auto;
    }

    .header-actions {
        order: 3;
        margin-left: 0;
        width: 100%;
        flex: 1 1 auto;
        min-width: 0;
        flex-wrap: nowrap;
        gap: 0;
        justify-content: space-between;
        align-items: center;
    }

    .header-actions .btn-icon,
    .header-actions .btn-auth,
    .header-actions .user-chip,
    .header-actions .lang-switch a {
        padding: 0.45rem;
    }

    .cart-total-header {
        display: none;
    }

    .lang-switch {
        margin-left: 0;
        font-size: 0.85rem;
    }

    .btn-auth,
    .btn-auth.btn-primary,
    .user-chip {
        background: none !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        transform: none !important;
    }

    .btn-auth__text {
        display: none !important;
    }

    .btn-auth__icon {
        display: block !important;
    }

    .btn-auth svg,
    .btn-icon svg {
        width: 20px;
        height: 20px;
    }

    .user-chip__info {
        display: none !important;
    }
}