/* ===== Variables ===== */
:root {
    --color-primary: #0f172a;
    --color-primary-light: #1e293b;
    --color-accent: #d97706;
    --color-accent-hover: #b45309;
    --color-bg: #ffffff;
    --color-bg-muted: #f8fafc;
    --color-bg-soft: #f1f5f9;
    --color-text: #1e293b;
    --color-text-muted: #64748b;
    --color-border: #e2e8f0;
    --color-success: #16a34a;
    --color-danger: #dc2626;
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --container: 1280px;
    --header-height: 4rem;
}

/* ===== Reset ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, select, textarea {
    font: inherit;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1rem;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.1s;
    text-align: center;
}

.btn-primary {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
}

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

.btn-outline {
    background: transparent;
    color: #fff;
    border-color: #fff;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

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

.btn-outline-dark:hover {
    background: var(--color-bg-muted);
    border-color: var(--color-border);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.05rem;
}

.btn-small {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
}

.btn-danger {
    background: #fff;
    color: var(--color-danger);
    border-color: var(--color-border);
}

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

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== Badges ===== */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.badge-new {
    background: var(--color-success);
    color: #fff;
}

.badge-featured {
    background: var(--color-accent);
    color: #fff;
}

.badge-default {
    background: var(--color-bg-soft);
    color: var(--color-text-muted);
}

/* ===== Header ===== */
.site-header {
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    height: var(--header-height);
}

.brand {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.brand img {
    display: block;
    height: 48px;
    width: auto;
}

.header-search {
    display: flex;
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
}

.header-search input {
    flex: 1;
    padding: 0.65rem 0.875rem;
    border: 1px solid var(--color-border);
    border-right: none;
    border-radius: var(--radius) 0 0 var(--radius);
    outline: none;
}

.header-search input:focus {
    border-color: var(--color-accent);
}

.header-search button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    background: var(--color-accent);
    color: #fff;
    border: 1px solid var(--color-accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    cursor: pointer;
}

.menu-toggle,
.search-toggle,
.cart-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--color-text);
}

.cart-toggle {
    text-decoration: none;
}

.menu-toggle {
    flex-direction: column;
    gap: 4px;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-text);
}

.site-nav {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.site-nav a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s;
}

.site-nav a:hover {
    color: var(--color-accent);
}

.nav-register {
    padding: 0.45rem 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.category-bar {
    background: var(--color-bg-muted);
    border-top: 1px solid var(--color-border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.category-bar-inner {
    display: flex;
    gap: 1.5rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.category-bar-link {
    white-space: nowrap;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

.category-bar-link:hover {
    color: var(--color-accent);
}

/* ===== Main ===== */
.main-content {
    min-height: calc(100vh - var(--header-height) - 320px);
}

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: #fff;
    padding: 4rem 0;
}

.hero-content {
    max-width: 640px;
}

.hero h1 {
    font-size: clamp(1.75rem, 5vw, 3rem);
    font-weight: 800;
    margin: 0 0 1rem;
    line-height: 1.1;
}

.hero p {
    font-size: 1.1rem;
    margin: 0 0 2rem;
    color: #cbd5e1;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ===== Sections ===== */
.section {
    padding: 3.5rem 0;
}

.section-muted {
    background: var(--color-bg-muted);
}

.section-title {
    font-size: 1.65rem;
    font-weight: 700;
    margin: 0 0 1.5rem;
    color: var(--color-primary);
}

.section-title-small {
    font-size: 1.35rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.link-arrow {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-accent);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.link-arrow::after {
    content: '→';
}

/* ===== Grid ===== */
.grid {
    display: grid;
    gap: 1.25rem;
}

.categories-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.products-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.subcategories-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.brands-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.brands-grid-large {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* ===== Category cards ===== */
.category-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

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

.category-card img,
.category-placeholder {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.category-placeholder {
    background: linear-gradient(135deg, var(--color-bg-soft) 0%, var(--color-bg-muted) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-placeholder span {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--color-text-muted);
    opacity: 0.4;
}

.category-placeholder-large {
    height: 200px;
}

.category-card h3 {
    padding: 1rem;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
}

.category-block {
    display: flex;
    flex-direction: column;
}

.subcategory-list {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.subcategory-list li a {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.subcategory-list li a:hover {
    color: var(--color-accent);
}

.subcategory-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 0.875rem 1rem;
    font-weight: 500;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
}

.subcategory-card:hover {
    border-color: var(--color-accent);
    background: #fffaf0;
}

/* ===== Product cards ===== */
.product-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.product-image-link {
    position: relative;
    display: block;
}

.product-image-link img,
.product-placeholder {
    width: 100%;
    height: 170px;
    object-fit: cover;
}

.product-placeholder {
    background: linear-gradient(135deg, var(--color-bg-soft) 0%, var(--color-bg-muted) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-placeholder span {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text-muted);
    opacity: 0.35;
}

.product-image-link .badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
}

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

.product-info h3 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
}

.product-info h3 a {
    color: var(--color-text);
}

.product-category {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    margin: 0 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-accent);
    margin: auto 0 0.25rem;
}

.product-min {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    margin: 0;
}

/* ===== Brand cards ===== */
.brand-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-weight: 600;
    background: var(--color-bg);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.brand-card:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow);
}

.brand-card-large {
    flex-direction: column;
    text-align: center;
    padding: 2rem;
    min-height: 140px;
}

.brand-card-large p {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--color-text-muted);
    margin: 0.5rem 0 0;
}

/* ===== CTA Section ===== */
.cta-section {
    padding: 2rem 0;
}

.cta-box {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
}

.cta-content {
    max-width: 560px;
}

.cta-box h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 1rem;
}

.cta-box p {
    color: #cbd5e1;
    margin: 0 0 1.5rem;
}

.cta-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.5rem;
}

.cta-benefits li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.cta-benefits li::before {
    content: '✓';
    color: var(--color-accent);
    font-weight: 700;
}

/* ===== Footer ===== */
.site-footer {
    background: var(--color-primary);
    color: #cbd5e1;
    padding-top: 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 2.5rem;
}

.footer-logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.03em;
    display: block;
    margin-bottom: 0.75rem;
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 280px;
    margin: 0;
}

.footer-links h4 {
    color: #fff;
    font-size: 1rem;
    margin: 0 0 1rem;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li + li {
    margin-top: 0.5rem;
}

.footer-links a {
    color: #cbd5e1;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.25rem 0;
    text-align: center;
    font-size: 0.85rem;
}

.footer-bottom p {
    margin: 0;
}

/* ===== Page header & breadcrumb ===== */
.page-header {
    background: var(--color-bg-muted);
    padding: 2.5rem 0;
}

.page-header h1 {
    margin: 0.75rem 0 0.5rem;
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 700;
    color: var(--color-primary);
}

.page-header p {
    margin: 0;
    color: var(--color-text-muted);
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.breadcrumb li + li::before {
    content: '/';
    margin: 0 0.5rem;
    color: var(--color-text-muted);
}

.breadcrumb a {
    color: var(--color-text-muted);
}

.breadcrumb a:hover {
    color: var(--color-accent);
}

.breadcrumb li[aria-current="page"] {
    color: var(--color-text);
}

/* ===== Search form ===== */
.search-form {
    display: flex;
    gap: 0.5rem;
    max-width: 600px;
    margin-bottom: 2rem;
}

.search-form input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    outline: none;
}

.search-form input:focus {
    border-color: var(--color-accent);
}

.empty-message,
.empty-cart {
    text-align: center;
    color: var(--color-text-muted);
    padding: 3rem 1rem;
}

.empty-cart p {
    font-size: 1.1rem;
    margin: 0 0 1rem;
}

/* ===== Product detail ===== */
.product-detail {
    padding: 2rem 0 3.5rem;
}

.product-detail .breadcrumb {
    margin-bottom: 1.5rem;
}

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

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-main-image img,
.product-main-image .product-placeholder {
    width: 100%;
    height: 420px;
    object-fit: contain;
    background: var(--color-bg-muted);
    border-radius: var(--radius-lg);
}

.product-placeholder-large {
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-placeholder-large span {
    font-size: 3rem;
    font-weight: 800;
    color: var(--color-text-muted);
    opacity: 0.3;
}

.product-thumbs {
    display: flex;
    gap: 0.75rem;
}

.product-thumb {
    width: 80px;
    height: 80px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-bg-muted);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-thumb-placeholder span {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.product-info-detail h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.2;
}

.product-brand {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin: 0 0 0.5rem;
}

.product-sku {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin: 0 0 0.75rem;
}

.product-stock {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
}

.product-stock.in-stock {
    background: #f0fdf4;
    color: var(--color-success);
}

.product-stock.out-stock {
    background: #fef2f2;
    color: var(--color-danger);
}

.product-price-box {
    margin-bottom: 1rem;
}

.product-price-large {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-accent);
    margin: 0;
}

.price-table-name {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin: 0.25rem 0 0;
}

.product-min {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 1.25rem;
}

.price-tiers {
    background: var(--color-bg-muted);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.price-tiers h3 {
    font-size: 0.95rem;
    margin: 0 0 0.75rem;
    color: var(--color-primary);
}

.price-tiers table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.price-tiers th,
.price-tiers td {
    text-align: left;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--color-border);
}

.product-add-cart {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.quantity-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.quantity-field label {
    font-size: 0.85rem;
    font-weight: 600;
}

.quantity-field input {
    width: 100px;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.product-tabs {
    display: grid;
    gap: 2rem;
}

.tab-panel h2 {
    font-size: 1.25rem;
    margin: 0 0 1rem;
    color: var(--color-primary);
}

.product-description {
    color: var(--color-text-muted);
    line-height: 1.7;
}

.specs-table {
    width: 100%;
    max-width: 480px;
    border-collapse: collapse;
}

.specs-table th,
.specs-table td {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

.specs-table th {
    width: 40%;
    color: var(--color-text-muted);
    font-weight: 500;
}

/* ===== Cart ===== */
.cart-table-wrap {
    overflow-x: auto;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.cart-table th,
.cart-table td {
    text-align: left;
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

.cart-table th {
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.cart-product a {
    font-weight: 600;
    color: var(--color-text);
}

.cart-qty-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.cart-qty-form input {
    width: 70px;
    padding: 0.4rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.cart-summary {
    max-width: 360px;
    margin-top: 1.5rem;
    margin-left: auto;
    background: var(--color-bg-muted);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.cart-summary-row strong {
    font-size: 1.25rem;
    color: var(--color-accent);
}

.cart-note {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 1.25rem;
}

.cart-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ===== Account ===== */
.account-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.account-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.account-card h2 {
    font-size: 1.15rem;
    margin: 0 0 1rem;
    color: var(--color-primary);
}

.account-list,
.address-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.account-list li,
.address-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.95rem;
}

.account-list li:last-child,
.address-list li:last-child {
    border-bottom: none;
}

.account-list strong {
    color: var(--color-text-muted);
    font-weight: 500;
}

.address-list li p {
    margin: 0.15rem 0;
}

/* ===== Auth ===== */
.auth-section {
    min-height: calc(100vh - var(--header-height) - 320px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 2rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-bg);
}

.auth-card-wide {
    max-width: 560px;
}

.auth-card h1 {
    margin: 0 0 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.auth-form .field {
    margin-bottom: 1rem;
}

.auth-form-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr 1fr;
}

.field-full {
    grid-column: 1 / -1;
}

.auth-form label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.auth-form input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    outline: none;
}

.auth-form input:focus {
    border-color: var(--color-accent);
}

.auth-links {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.auth-links a {
    color: var(--color-accent);
    font-weight: 600;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ===== Admin ===== */
.admin-body {
    background: var(--color-bg-muted);
}

.admin-header {
    background: var(--color-primary);
    color: #fff;
    padding: 0.75rem 0;
}

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

.admin-logo {
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
}

.admin-nav {
    display: flex;
    gap: 1.25rem;
}

.admin-nav a {
    color: #cbd5e1;
    font-size: 0.9rem;
    font-weight: 500;
}

.admin-nav a:hover {
    color: #fff;
}

.admin-main {
    padding: 2rem 0;
}

.admin-section h1 {
    margin: 0 0 0.5rem;
}

.admin-cards {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    margin-top: 2rem;
}

.admin-cards .card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.admin-cards .card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.admin-cards .card p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* ===== Error ===== */
.error-section {
    padding: 5rem 0;
    text-align: center;
}

.error-section h1 {
    font-size: 5rem;
    margin: 0;
    color: var(--color-primary);
}

.error-section p {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin: 0 0 2rem;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 3.5rem;
    }

    .header-inner {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem;
    }

    .brand {
        margin-right: auto;
    }

    .brand img {
        height: 40px;
    }

    .header-search {
        max-width: none;
        order: 3;
        grid-column: 1 / -1;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        padding: 0.75rem 1rem;
        background: var(--color-bg);
        border-bottom: 1px solid var(--color-border);
        display: none;
    }

    .header-search.is-open {
        display: flex;
    }

    .header-search input {
        padding: 0.6rem 0.75rem;
    }

    .menu-toggle,
    .search-toggle,
    .cart-toggle {
        display: flex;
        order: 2;
    }

    .cart-toggle {
        order: 1;
        margin-left: auto;
    }

    .search-toggle {
        order: 2;
    }

    .menu-toggle {
        order: 3;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: calc(var(--header-height) + 1px);
        left: 0;
        right: 0;
        background: var(--color-bg);
        border-bottom: 1px solid var(--color-border);
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        box-shadow: var(--shadow-md);
    }

    .site-nav.is-open {
        display: flex;
    }

    .category-bar {
        top: var(--header-height);
    }

    .hero {
        padding: 3rem 0;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .product-main-image img,
    .product-main-image .product-placeholder {
        height: 300px;
    }

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

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

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

    .cart-table th,
    .cart-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }

    .cart-qty-form {
        flex-direction: column;
        align-items: flex-start;
    }

    .cart-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .products-grid,
    .categories-grid {
        grid-template-columns: 1fr 1fr;
    }

    .section {
        padding: 2.5rem 0;
    }

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

    .cta-box {
        padding: 1.75rem;
    }

    .cta-box h2 {
        font-size: 1.4rem;
    }

    .product-card h3 {
        font-size: 0.85rem;
    }

    .product-price {
        font-size: 1rem;
    }
}

@media (max-width: 360px) {
    .products-grid,
    .categories-grid {
        grid-template-columns: 1fr;
    }

    .brand img {
        height: 36px;
    }
}

/* Conta do cliente */
.account-section {
    padding: 2rem 0;
}

.account-section h1 {
    margin-bottom: 1.25rem;
    font-size: 1.75rem;
}

.account-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 240px 1fr;
    align-items: start;
}

.account-menu {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.75rem;
}

.account-menu a {
    padding: 0.6rem 0.75rem;
    border-radius: 0.5rem;
    color: #334155;
    font-weight: 500;
}

.account-menu a:hover,
.account-menu a.active {
    background: #f1f5f9;
    color: #0f172a;
}

.account-content {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.account-content h2 {
    font-size: 1.15rem;
    margin: 0 0 1rem;
    color: #0f172a;
}

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

.account-form .field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.account-form .field span {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
}

.account-form .field input,
.account-form .field select,
.account-form .field textarea {
    padding: 0.55rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
}

.account-form .field input:focus,
.account-form .field select:focus {
    border-color: #d97706;
}

.account-form .field-2 {
    grid-column: span 2;
}

.account-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.75rem;
}

.account-table th,
.account-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.9rem;
}

.account-table th {
    background: #f8fafc;
    font-weight: 600;
}

.address-list {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.address-card {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem;
    position: relative;
}

.address-card.address-default {
    border-color: #d97706;
}

.address-card p {
    margin: 0.25rem 0;
    color: #475569;
    font-size: 0.9rem;
}

.address-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.order-summary {
    background: #f8fafc;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.order-summary p {
    margin: 0.35rem 0;
}

@media (max-width: 768px) {
    .account-grid {
        grid-template-columns: 1fr;
    }

    .account-menu {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .account-menu a {
        flex: 1 1 auto;
        text-align: center;
    }

    .account-form .field-2 {
        grid-column: span 1;
    }
}

/* Carrinho - checkout */
.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 360px;
}

.checkout-form .field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.checkout-form .field span {
    font-size: 0.85rem;
    font-weight: 600;
}

.checkout-form select,
.checkout-form input {
    padding: 0.55rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
}

/* Carrinho v2 */
.cart-product-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.cart-product-link img,
.cart-placeholder {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.5rem;
    background: #f1f5f9;
    flex-shrink: 0;
}

.cart-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #64748b;
    font-size: 0.8rem;
}

.cart-product-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.cart-product-info strong {
    color: #0f172a;
    font-weight: 600;
}

.cart-product-info small {
    color: #64748b;
    font-size: 0.75rem;
}

.cart-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
}

.cart-discount {
    color: #16a34a;
    font-size: 0.75rem;
}

.cart-subtotal {
    font-weight: 600;
}

.cart-total {
    font-size: 1.15rem;
    color: #d97706;
}

.min-order-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem;
    margin: 1rem 0;
}

.min-order-box p {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
}

.min-order-progress {
    background: #e2e8f0;
    border-radius: 0.5rem;
    height: 0.75rem;
    overflow: hidden;
}

.min-order-bar {
    background: #d97706;
    height: 100%;
    transition: width 0.3s ease;
}

.min-order-met {
    color: #16a34a;
    font-weight: 600;
}

.checkout-disabled-note {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.5rem;
}

.numeric {
    text-align: right;
}

@media (max-width: 640px) {
    .cart-table thead {
        display: none;
    }

    .cart-table tbody tr {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 0.5rem;
        padding: 1rem 0;
        border-bottom: 1px solid #e2e8f0;
    }

    .cart-table tbody td {
        padding: 0;
    }

    .cart-table tbody td.cart-product {
        grid-column: 1 / -1;
    }

    .cart-table tbody td.numeric {
        text-align: left;
    }

    .cart-qty-form {
        display: flex;
        gap: 0.5rem;
    }

    .cart-qty-form input {
        width: 70px;
    }
}

/* Carrinho - header badge e feedback */
.cart-count {
    position: absolute;
    top: -0.4rem;
    right: -0.4rem;
    background: #d97706;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
}

.cart-toggle {
    position: relative;
}

.cart-feedback {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    min-height: 1.2rem;
}

.cart-feedback-success {
    color: #16a34a;
    font-weight: 500;
}

.cart-feedback-error {
    color: #dc2626;
    font-weight: 500;
}

/* Checkout */
.checkout-section {
    padding: 2rem 0;
}

.checkout-steps {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    counter-reset: step;
}

.checkout-steps li {
    flex: 1;
    text-align: center;
    padding: 0.75rem 0.25rem;
    background: #f1f5f9;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #64748b;
}

.checkout-steps li.active {
    background: #d97706;
    color: #fff;
}

.checkout-steps li.done {
    background: #16a34a;
    color: #fff;
}

.checkout-form {
    max-width: 720px;
}

.address-list,
.shipping-list,
.payment-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.address-card,
.shipping-card,
.payment-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem;
    cursor: pointer;
    transition: border-color 0.2s;
}

.address-card:hover,
.shipping-card:hover,
.payment-card:hover,
.address-card.selected,
.shipping-card.selected,
.payment-card.selected {
    border-color: #d97706;
}

.address-card input,
.shipping-card input,
.payment-card input {
    margin-top: 0.25rem;
}

.address-card p,
.shipping-card p,
.payment-card p {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    color: #475569;
}

.shipping-price {
    margin-left: auto;
    font-weight: 600;
    color: #0f172a;
}

.checkout-mini-summary {
    background: #f8fafc;
    border-radius: 0.75rem;
    padding: 1rem;
    max-width: 360px;
}

.checkout-mini-summary p {
    margin: 0.25rem 0;
}

.checkout-review {
    max-width: 800px;
}

.checkout-total-box {
    background: #f8fafc;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.checkout-total-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.checkout-grand-total {
    font-size: 1.15rem;
    color: #d97706;
    font-weight: 700;
    border-bottom: none;
}

.checkout-success {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.checkout-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .checkout-steps {
        flex-wrap: wrap;
    }

    .checkout-steps li {
        flex: 1 1 45%;
    }

    .shipping-card,
    .payment-card {
        flex-direction: column;
    }

    .shipping-price {
        margin-left: 0;
    }
}

/* Paginação */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.pagination-info {
    color: #64748b;
    font-size: 0.9rem;
}

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

/* Payment section */
.payment-section {
    padding: 2rem 0;
}

.payment-box {
    max-width: 600px;
    margin: 0 auto;
    padding: 1.5rem;
    background: var(--bg-card, #fff);
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    text-align: center;
}

.payment-box h2 {
    margin-bottom: 0.5rem;
}

.qr-code {
    margin: 1.5rem auto;
    max-width: 260px;
}

.qr-code img {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color, #e2e8f0);
}

.pix-copy {
    text-align: left;
    margin: 1rem 0;
}

.pix-copy label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.pix-copy textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 0.5rem;
    font-family: monospace;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    resize: none;
}

.payment-info {
    color: var(--text-muted, #64748b);
    font-size: 0.9rem;
    margin: 1rem 0;
}

@media (min-width: 768px) {
    .payment-box {
        padding: 2rem;
    }
}
