* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, sans-serif; color: #1e293b; line-height: 1.6; background: #f8fafc; }
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }

.site-header { background: #fff; border-bottom: 1px solid #e2e8f0; padding: 1rem 0; position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.25rem; font-weight: 700; color: #0f172a; border-bottom: none; }
.site-logo-img { max-height: 44px; width: auto; display: block; }
.main-nav a { margin-left: 1.25rem; color: #475569; }
.main-nav a:hover { color: #2563eb; text-decoration: none; }
.cart-link { font-weight: 600; transition: transform .2s; }
.cart-link.cart-pulse { animation: cartPulse .6s ease; }
#cart-count.bump { display: inline-block; animation: countBump .4s ease; }
@keyframes cartPulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.08)} }
@keyframes countBump { 0%{transform:scale(1)} 50%{transform:scale(1.4);color:#2563eb} 100%{transform:scale(1)} }
.cart-toast { position:fixed; bottom:24px; right:24px; background:#0f172a; color:#fff; padding:.75rem 1.25rem; border-radius:8px; opacity:0; transform:translateY(10px); transition:all .3s; z-index:9999; pointer-events:none; }
.cart-toast.show { opacity:1; transform:translateY(0); }
#add-to-cart-btn.adding { opacity:.7; pointer-events:none; }
#add-to-cart-btn:disabled { background:#94a3b8; border-color:#94a3b8; cursor:not-allowed; }
.product-stock.out-of-stock #product-stock { color:#dc2626; font-weight:700; }
.stock-status { margin-left:.35rem; font-size:.9rem; font-weight:600; color:#dc2626; }
.fly-to-cart { position:fixed; z-index:10000; border-radius:8px; object-fit:cover; pointer-events:none; transition:transform .65s cubic-bezier(.2,.8,.2,1), opacity .65s ease; box-shadow:0 4px 16px rgba(0,0,0,.25); }

.site-main { min-height: 60vh; padding: 2rem 0; }
.site-footer { background: #0f172a; color: #94a3b8; padding: 2rem 0; margin-top: 3rem; text-align: center; }
.site-footer a { color: #e2e8f0; }

.hero { text-align: center; padding: 3rem 0; }
.hero h1 { font-size: 2rem; margin-bottom: .5rem; }
.btn { display: inline-block; padding: .6rem 1.25rem; border-radius: 6px; border: 1px solid #cbd5e1; background: #fff; cursor: pointer; font-size: .9rem; }
.btn-primary { background: #2563eb; color: #fff; border-color: #2563eb; }
.btn-link { background: none; border: none; color: #2563eb; cursor: pointer; }
.danger { color: #dc2626; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.25rem; }
.product-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.08); transition: transform .2s; }
.product-card:hover { transform: translateY(-2px); }
.product-card img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #f1f5f9; }
.product-placeholder { width: 100%; aspect-ratio: 1; background: linear-gradient(135deg, #e2e8f0, #f1f5f9); }
.product-card h3 { padding: .75rem; font-size: .95rem; }
.product-card .price { padding: 0 .75rem .75rem; font-weight: 700; color: #2563eb; }

.shop-layout { display: grid; grid-template-columns: 200px 1fr; gap: 2rem; }
.shop-sidebar ul { list-style: none; }
.shop-sidebar a { display: block; padding: .4rem 0; color: #475569; }
.shop-sidebar a.active { color: #2563eb; font-weight: 600; }

.product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.product-gallery img { width: 100%; border-radius: 8px; }
.product-thumbs { display: flex; gap: .5rem; margin-top: .5rem; }
.product-thumbs img { width: 60px; height: 60px; object-fit: cover; border-radius: 4px; cursor: pointer; border: 2px solid transparent; }
.product-thumbs img:hover { border-color: #2563eb; }
.product-price { font-size: 1.5rem; font-weight: 700; color: #2563eb; margin: .5rem 0; }
.attr-selector { margin: 1rem 0; }
.attr-options { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .25rem; }
.attr-btn { padding: .4rem .75rem; border: 1px solid #cbd5e1; border-radius: 4px; background: #fff; cursor: pointer; }
.attr-btn.selected { border-color: #2563eb; background: #eff6ff; color: #2563eb; }
#add-to-cart-form { margin-top: 1.5rem; }
#add-to-cart-form input[type=number] { width: 80px; padding: .4rem; margin: .5rem 0 1rem; }

.post-list .post-item { background: #fff; padding: 1.25rem; border-radius: 8px; margin-bottom: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.single-post { background: #fff; padding: 2rem; border-radius: 8px; max-width: 800px; }
.single-post time { color: #64748b; font-size: .85rem; }
.post-content { margin-top: 1.5rem; }

.cart-table { width: 100%; background: #fff; border-radius: 8px; border-collapse: collapse; margin-bottom: 1.5rem; }
.cart-table th, .cart-table td { padding: .75rem; border-bottom: 1px solid #e2e8f0; text-align: left; }
.cart-thumb { width: 50px; height: 50px; object-fit: cover; border-radius: 4px; vertical-align: middle; margin-right: .5rem; }

.checkout-layout { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; }
.checkout-form, .checkout-summary { background: #fff; padding: 1.5rem; border-radius: 8px; }
.checkout-form label { display: block; margin: .75rem 0 .25rem; font-weight: 500; }
.checkout-form input, .checkout-form textarea { width: 100%; padding: .5rem; border: 1px solid #cbd5e1; border-radius: 4px; }
.checkout-field-country { margin-bottom: .25rem; }
.checkout-select-wrap { position: relative; }
.checkout-select-wrap::after { content: ""; position: absolute; right: .85rem; top: 50%; width: .5rem; height: .5rem; border-right: 2px solid #64748b; border-bottom: 2px solid #64748b; transform: translateY(-65%) rotate(45deg); pointer-events: none; }
.checkout-select { width: 100%; padding: .65rem 2rem .65rem .75rem; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; font-size: 1rem; appearance: none; -webkit-appearance: none; }
.checkout-select:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.15); }
.checkout-address-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; margin-top: .5rem; }
.checkout-summary-items { display: flex; flex-direction: column; gap: .85rem; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid #e2e8f0; }
.checkout-summary-item { display: grid; grid-template-columns: 56px 1fr auto; gap: .75rem; align-items: center; }
.checkout-summary-thumb img, .checkout-summary-thumb-placeholder { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: #f1f5f9; border: 1px solid #e2e8f0; display: block; }
.checkout-summary-item-name { font-weight: 600; line-height: 1.3; }
.checkout-summary-item-meta { color: #64748b; font-size: .85rem; margin-top: .15rem; }
.checkout-summary-item-price { font-weight: 600; white-space: nowrap; }
.checkout-summary-totals { font-size: .95rem; }
.hint { color: #64748b; font-size: .9rem; margin: 1rem 0; }

.order-confirm { text-align: center; padding: 3rem; background: #fff; border-radius: 8px; }
.flash { padding: .75rem 1rem; border-radius: 6px; margin-bottom: 1rem; }
.flash-success { background: #dcfce7; color: #166534; }
.flash-error { background: #fee2e2; color: #991b1b; }
.payment-option { display: block; margin: .5rem 0; }
.sender-info { background: #f8fafc; padding: 1rem; border-radius: 6px; margin: 1rem 0; font-size: .9rem; }
.product-description { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid #e2e8f0; }
.product-description h2 { font-size: 1.15rem; margin-bottom: .75rem; }
.product-description .no-description { color: #64748b; font-style: italic; }
.product-reviews { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid #e2e8f0; }
.review-item { background: #f8fafc; padding: 1rem; border-radius: 6px; margin-bottom: .75rem; }
.review-stars { color: #f59e0b; margin-left: .5rem; }

@media (max-width: 768px) {
    .shop-layout, .product-layout, .checkout-layout { grid-template-columns: 1fr; }
    .checkout-address-grid { grid-template-columns: 1fr; }
}
