:root {
    --primary: #d85d24;
    --primary-dark: #b94817;
    --text: #25231f;
    --text-light: #625d55;
    --text-muted: #817a71;
    --bg: #f7f5f1;
    --white: #fff;
    --border: #e9e3da;
    --danger: #c94532;
    --success: #237a4b;
    --info: #2e638c;
    --radius: 12px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

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

/* Topbar */
.topbar { background: #2b2b2b; color: #bbb; font-size: 12px; padding: 6px 0; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; }

/* Header */
header { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-size: 22px; font-weight: 700; color: var(--primary); }
.logo small { display: block; font-size: 11px; color: var(--text-muted); font-weight: 400; margin-top: -4px; }

.nav { display: flex; gap: 28px; }
.nav a { font-size: 15px; color: var(--text); font-weight: 500; }
.nav a:hover, .nav a.active { color: var(--primary); }

.header-actions { display: flex; align-items: center; gap: 20px; }
.account-label { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--text-muted); }
.account-link { border: 0; background: transparent; padding: 0; font: inherit; font-size: 14px; color: var(--text-light); cursor: pointer; white-space: nowrap; }
.account-link:hover { color: var(--primary); }
.logout-form { margin: 0; }
.cart-btn { position: relative; font-size: 14px; color: var(--text-light); }
.cart-btn .badge {
    position: absolute; top: -8px; right: -10px;
    background: var(--danger); color: var(--white);
    font-size: 11px; padding: 1px 6px; border-radius: 10px;
}

.mobile-menu-btn { display: none; font-size: 22px; color: var(--text); background: none; border: none; }

/* Banner */
.banner {
    background: linear-gradient(135deg, #c45120 0%, #ea7a38 100%);
    color: var(--white); padding: 60px 0; text-align: center;
}
.banner h1 { font-size: 32px; margin-bottom: 14px; }
.banner p { font-size: 16px; opacity: 0.95; margin-bottom: 24px; }
.banner-search { max-width: 520px; margin: 0 auto; display: flex; }
.banner-search input {
    flex: 1; padding: 12px 16px; border: none;
    border-radius: 8px 0 0 8px; font-size: 14px;
}
.banner-search button {
    padding: 0 24px; background: #2b2b2b; color: var(--white);
    border: none; border-radius: 0 8px 8px 0; cursor: pointer;
}
.eyebrow { display: inline-block; margin-bottom: 10px; font-size: 13px; font-weight: 700; letter-spacing: .12em; }
.eyebrow-dark { color: var(--primary); }

/* Sections */
.section { padding: 48px 0; }
.section-title { font-size: 24px; font-weight: 700; margin-bottom: 10px; text-align: center; }
.section-subtitle { text-align: center; color: var(--text-muted); font-size: 14px; margin-bottom: 32px; }

/* Category bar */
.category-bar { display: flex; justify-content: center; gap: 12px; margin-bottom: 28px; flex-wrap: wrap; }
.category-bar a {
    padding: 8px 18px; background: var(--white);
    border-radius: 20px; font-size: 14px; color: var(--text-light);
    border: 1px solid var(--border);
}
.category-bar a.active, .category-bar a:hover {
    background: var(--primary); color: var(--white); border-color: var(--primary);
}

/* Products */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.product-card {
    background: var(--white); border-radius: var(--radius);
    overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform .2s, box-shadow .2s;
}
.product-card:hover { transform: translateY(-5px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.product-img { height: 200px; position: relative; overflow: hidden; background: #f8f8f8; }
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.product-card:hover .product-img img { transform: scale(1.05); }
.product-tag {
    position: absolute; top: 10px; left: 10px;
    background: var(--danger); color: var(--white);
    font-size: 12px; padding: 3px 10px; border-radius: 4px;
}
.product-info { padding: 16px; }
.product-name { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.product-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; height: 38px; overflow: hidden; }
.product-meta { display: flex; justify-content: space-between; align-items: center; }
.product-price { color: var(--danger); font-size: 20px; font-weight: 700; }
.product-price small { font-size: 12px; font-weight: 400; color: var(--text-muted); margin-left: 6px; text-decoration: line-through; }
.product-sold { font-size: 12px; color: var(--text-muted); }

/* Buttons */
.btn {
    display: inline-block; padding: 11px 0; background: var(--primary);
    color: var(--white); text-align: center; border-radius: 8px;
    font-size: 14px; font-weight: 600; border: none; cursor: pointer;
    transition: background .2s;
}
.btn:hover { background: var(--primary-dark); }
.btn:disabled { opacity: .65; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-inline { width: auto; padding-left: 24px; padding-right: 24px; }
.btn-wide { width: auto; padding-left: 40px; padding-right: 40px; }
.btn-secondary { background: var(--white); color: var(--primary); border: 1px solid var(--primary); }
.btn-secondary:hover { background: #fff5ed; }
.btn-danger { background: var(--danger); }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* Features */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; text-align: center; }
.feature { background: var(--white); padding: 28px 16px; border-radius: var(--radius); box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.feature-icon {
    width: 42px; height: 42px; border-radius: 50%; margin: 0 auto 12px;
    display: flex; align-items: center; justify-content: center;
    background: #fff0e6; color: var(--primary); font-size: 16px; font-weight: 800;
}
.feature h3 { font-size: 16px; margin-bottom: 6px; color: var(--text); }
.feature p { font-size: 13px; color: var(--text-muted); }
.service-section { background: var(--white); }
.section-action { text-align: center; margin-top: 32px; }
.product-secondary-action { margin-top: 8px; }

/* About */
.about { background: var(--white); }
.about-content { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.about-text p { color: #555; font-size: 15px; margin-bottom: 16px; line-height: 1.8; }
.about-text h2 { font-size: 30px; margin-bottom: 16px; }
.about-panel {
    min-height: 260px; padding: 36px; border-radius: 20px;
    background: linear-gradient(145deg, #2d2a26, #514b43); color: #fff;
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.about-panel strong { grid-column: 1 / -1; align-self: end; font-size: 28px; margin-bottom: 8px; }
.about-panel span { background: rgba(255,255,255,.1); padding: 14px; border-radius: 8px; text-align: center; }
.about-img { background: #f0f0f0; border-radius: var(--radius); height: 260px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); overflow: hidden; }
.about-img img { width: 100%; height: 100%; object-fit: cover; }

/* Footer */
footer { background: #1a1a1a; color: #aaa; padding: 40px 0 20px; font-size: 13px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px; margin-bottom: 32px; }
.footer-col h4 { color: var(--white); font-size: 15px; margin-bottom: 14px; }
.footer-col a, .footer-col span { display: block; margin-bottom: 10px; color: #aaa; }
.footer-col a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid #333; padding-top: 20px; text-align: center; }
.footer-bottom p { margin-bottom: 6px; }

/* Page banner */
.page-banner {
    background: linear-gradient(135deg, var(--primary) 0%, #ff8c00 100%);
    color: var(--white); padding: 48px 0; text-align: center;
}
.page-banner h1 { font-size: 28px; }
.page-banner p { margin-top: 8px; opacity: .9; }

/* Content pages */
.content { padding: 48px 0; min-height: 60vh; }
.content-narrow { max-width: 900px; margin: 0 auto; }
.content h2 { font-size: 20px; margin: 28px 0 14px; color: #222; }
.content h3 { font-size: 17px; margin: 20px 0 10px; }
.content p { font-size: 15px; color: #555; margin-bottom: 14px; }
.content ul, .content ol { margin-left: 24px; color: #555; font-size: 15px; margin-bottom: 14px; }
.content li { margin-bottom: 8px; }
.legal-content a { color: var(--primary); }

/* Forms */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; color: var(--text-light); margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 12px; border: 1px solid #ddd;
    border-radius: 8px; font-size: 14px;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: 2px solid rgba(216, 93, 36, .18); border-color: var(--primary);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Cards */
.card { background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.card h3 { font-size: 17px; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid #eee; }
.account-card { max-width: 440px; margin: 0 auto; }
.account-card h1 { font-size: 24px; margin-bottom: 8px; }
.account-card > p { color: var(--text-muted); font-size: 14px; }
.account-help { margin-top: 18px; text-align: center; }
.account-help a { color: var(--primary); }
.flash-stack { margin-top: 16px; }

/* Cart */
.cart-empty { text-align: center; padding: 60px 0; color: var(--text-muted); }
.cart-empty a { color: var(--primary); }
.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 1px solid #eee; }
.cart-item:last-child { border-bottom: none; }
.item-info h4 { font-size: 15px; margin-bottom: 4px; }
.item-info p { font-size: 13px; color: var(--text-muted); }
.qty-control { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.qty-control button {
    width: 28px; height: 28px; border: 1px solid #ddd;
    background: var(--white); border-radius: 4px; cursor: pointer;
}
.qty-control .remove-item { width: auto; padding: 0 10px; color: var(--text-muted); border: none; }
.cart-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; padding-top: 20px; border-top: 1px solid #eee; }
.total { font-size: 18px; }
.total strong { color: var(--danger); font-size: 24px; }

/* Checkout */
.checkout-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 24px; }
.order-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed #eee; font-size: 14px; }
.order-item:last-child { border-bottom: none; }
.order-total { display: flex; justify-content: space-between; margin-top: 16px; padding-top: 16px; border-top: 1px solid #eee; font-size: 16px; }
.order-total strong { color: var(--danger); font-size: 22px; }
.pay-method {
    border: 1px solid var(--primary); background: #fff5ed;
    border-radius: 8px; padding: 14px; display: flex;
    align-items: center; gap: 10px; margin-top: 16px;
}
.pay-method .icon {
    width: 28px; height: 28px; background: #1677ff; color: var(--white);
    border-radius: 4px; display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
}
.pay-method strong, .pay-method small { display: block; }
.pay-method small { color: var(--text-muted); margin-top: 2px; }
.submit-order { margin-top: 18px; }
.secure-note { font-size: 12px !important; text-align: center; margin: 10px 0 0 !important; color: var(--text-muted) !important; }
.form-error { min-height: 22px; margin-top: 12px; color: var(--danger); font-size: 13px; }
.consent-row { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--text-light); }
.consent-row input { margin-top: 4px; }
.consent-row a { color: var(--primary); }

/* Product detail */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.product-gallery { background: #f8f8f8; border-radius: var(--radius); overflow: hidden; height: 420px; }
.product-gallery img { width: 100%; height: 100%; object-fit: cover; }
.product-summary h1 { font-size: 24px; margin-bottom: 12px; }
.product-summary .price { color: var(--danger); font-size: 32px; font-weight: 700; margin-bottom: 16px; }
.product-summary .price small { font-size: 16px; color: var(--text-muted); text-decoration: line-through; margin-left: 10px; }
.product-summary .meta { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }
.product-summary .meta span { margin-right: 20px; }
.product-summary .desc { color: #555; font-size: 15px; line-height: 1.8; margin-bottom: 24px; }
.detail-tag { display: inline-block; padding: 4px 10px; margin-bottom: 10px; border-radius: 4px; background: #fff0e6; color: var(--primary); font-size: 12px; font-weight: 700; }
.purchase-note { padding: 12px 14px; margin-bottom: 18px; border-left: 3px solid var(--primary); background: #fff8f2; color: var(--text-light); font-size: 13px; }
.product-actions { display: flex; gap: 12px; }
.product-actions .btn { padding: 14px 32px; width: auto; }
.product-section { margin-top: 40px; }
.product-section h3 { font-size: 18px; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.product-section p { color: #555; line-height: 1.8; margin-bottom: 10px; }
.detail-card { padding: 24px; background: var(--white); border-radius: var(--radius); }
.product-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; margin-bottom: 20px; }
.product-specs div { display: grid; grid-template-columns: 90px 1fr; padding: 10px 0; border-bottom: 1px solid var(--border); }
.product-specs dt { color: var(--text-muted); }
.product-specs dd { color: var(--text); }

/* Admin */
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { padding: 12px; border-bottom: 1px solid #eee; text-align: left; }
.admin-table th { background: #f8f8f8; font-weight: 600; }
.admin-table img { width: 50px; height: 50px; object-fit: cover; border-radius: 4px; }
.status-badge { padding: 3px 10px; border-radius: 12px; font-size: 12px; }
.status-on { background: #e6f7ed; color: #1f8d4e; }
.status-off { background: #f2f2f2; color: var(--text-muted); }
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }
.flash.success { background: #e6f7ed; color: #1f8d4e; }
.flash.danger { background: #ffeded; color: #c23a3a; }
.notice { display: flex; flex-direction: column; gap: 4px; margin: 18px 0; padding: 14px 16px; border-radius: 8px; font-size: 14px; }
.notice-info { background: #edf6fc; color: var(--info); }
.notice-warning { background: #fff4e4; color: #81521e; }

/* Search and empty state */
.catalog-search { display: flex; max-width: 560px; margin: 0 auto 22px; }
.catalog-search input { flex: 1; min-width: 0; padding: 11px 14px; border: 1px solid var(--border); border-radius: 8px 0 0 8px; }
.catalog-search .btn { border-radius: 0 8px 8px 0; padding-left: 24px; padding-right: 24px; }
.empty-state { padding: 64px 20px; text-align: center; color: var(--text-muted); }
.empty-state strong { display: block; color: var(--text); font-size: 18px; margin-bottom: 8px; }
.empty-state p { margin-bottom: 18px; }

/* Order result */
.order-result { max-width: 760px; text-align: center; }
.result-icon { width: 58px; height: 58px; margin: 0 auto 18px; border-radius: 50%; background: #e7f5ed; color: var(--success); display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; }
.order-result h1 { font-size: 28px; margin-bottom: 8px; }
.order-result-card { margin-top: 22px; text-align: left; }
.order-contact { margin-top: 18px; }
.order-contact div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 8px 0; }
.order-contact dt { color: var(--text-muted); }
.result-actions { display: flex; justify-content: center; gap: 12px; margin-top: 24px; }
.result-actions .btn { width: auto; padding-left: 28px; padding-right: 28px; }

/* Contact */
.contact-card > p { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.contact-card > p strong { color: var(--text-muted); font-size: 13px; }
.contact-card a { color: var(--primary); }

/* Admin */
.admin-container { max-width: 1240px; }
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.admin-nav, .admin-actions, .table-actions { display: flex; align-items: center; gap: 8px; }
.admin-nav a { padding: 8px 14px; border-radius: 8px; color: var(--text-light); }
.admin-nav a.active, .admin-nav a:hover { background: #fff0e6; color: var(--primary); }
.admin-actions form, .table-actions form { display: inline-flex; }
.admin-table-wrap { overflow-x: auto; }
.admin-summary-card { margin-top: 22px; }
.card-heading { display: flex; justify-content: space-between; align-items: center; }
.card-heading a { color: var(--primary); font-size: 14px; }
.readiness-summary { display: flex; flex-direction: column; gap: 5px; padding: 20px; border-radius: var(--radius); margin-bottom: 18px; }
.readiness-summary.ready { background: #e7f5ed; color: var(--success); }
.readiness-summary.not-ready { background: #fff4e4; color: #81521e; }
.check-list { display: grid; gap: 10px; }
.check-item { display: flex; gap: 14px; padding: 18px; background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); }
.check-icon { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; }
.check-item.passed .check-icon { background: #e7f5ed; color: var(--success); }
.check-item.failed .check-icon { background: #ffeded; color: var(--danger); }
.check-item p { margin: 4px 0 0; font-size: 13px; color: var(--text-muted); }
.message-list { display: grid; gap: 12px; }
.message-card > div { display: flex; justify-content: space-between; gap: 12px; }
.message-card span { color: var(--text-muted); font-size: 13px; }
.message-card p { margin: 14px 0 0; white-space: pre-wrap; }

/* Breadcrumb */
.breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }

/* Responsive */
@media (max-width: 768px) {
    .topbar { display: none; }
    .nav { display: none; }
    .mobile-menu-btn { display: block; }
    .banner h1 { font-size: 24px; }
    .products { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .product-img { height: 160px; }
    .product-info { padding: 12px; }
    .product-name { font-size: 14px; }
    .about-content { grid-template-columns: 1fr; }
    .about-panel { min-height: 220px; padding: 24px; }
    .about-img { height: 180px; }
    .checkout-grid, .product-detail { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .product-gallery { height: 280px; }
    .product-actions .btn { flex: 1; padding: 14px 0; }
    .cart-item { flex-direction: column; align-items: flex-start; gap: 10px; }
    .product-specs { grid-template-columns: 1fr; }
    .admin-toolbar { align-items: flex-start; flex-direction: column; }
    .admin-nav { max-width: 100%; overflow-x: auto; }
    .admin-nav a { white-space: nowrap; }
    .message-card > div { flex-direction: column; }
    .nav.mobile-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: #fff;
        padding: 16px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .container { padding-left: 12px; padding-right: 12px; }
    .header-inner { height: 58px; }
    .logo { font-size: 19px; }
    .banner { padding: 42px 0; }
    .banner-search button { padding: 0 16px; }
    .section { padding: 36px 0; }
    .products { grid-template-columns: 1fr 1fr; gap: 10px; }
    .product-img { height: 132px; }
    .product-desc { display: none; }
    .product-meta { align-items: flex-end; gap: 5px; }
    .product-price { font-size: 17px; }
    .product-price small, .product-sold { display: none; }
    .product-card .btn { font-size: 13px; }
    .page-banner { padding: 34px 0; }
    .page-banner h1, .order-result h1 { font-size: 24px; }
    .card { padding: 18px; }
    .product-actions { flex-direction: column; }
    .product-actions .btn { width: 100%; }
    .cart-footer { align-items: flex-end; gap: 12px; }
    .total strong { display: block; }
    .result-actions { flex-direction: column; }
    .result-actions .btn { width: 100%; }
}
