* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #faf8f5; color: #333; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

header { background: #fff; border-bottom: 1px solid #e8e0d6; }
.header-inner { max-width: 1100px; margin: 0 auto; padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.4rem; font-weight: 700; color: #5a3e36; text-decoration: none; letter-spacing: -0.5px; }
nav { display: flex; gap: 20px; align-items: center; }
nav a { text-decoration: none; color: #5a3e36; font-size: 0.9rem; font-weight: 500; }
nav a:hover { color: #8b5e4a; }
.cart-link { position: relative; }
.cart-count { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; background: #8b5e4a; color: #fff; font-size: 0.7rem; font-weight: 700; border-radius: 50%; position: absolute; top: -10px; right: -14px; }

main { min-height: 60vh; padding: 40px 0; }

.hero { text-align: center; padding: 60px 0 48px; }
.hero h1 { font-size: 2rem; color: #3a2a24; margin-bottom: 8px; }
.hero p { font-size: 1.05rem; color: #8b7a72; }

.category-section { margin-bottom: 48px; }
.category-section h2 { font-size: 1.4rem; color: #3a2a24; border-bottom: 2px solid #e8e0d6; padding-bottom: 8px; margin-bottom: 20px; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.product-card { background: #fff; border: 1px solid #e8e0d6; border-radius: 8px; overflow: hidden; text-decoration: none; color: inherit; transition: box-shadow 0.2s; }
.product-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.product-img { background: #f5f0eb; aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; }
.placeholder-img { width: 80px; height: 80px; background: #ddd2c8; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: #8b7a72; font-weight: 700; }
.placeholder-lg { width: 200px; height: 200px; font-size: 4rem; }
.card-photo { width: 100%; height: 100%; object-fit: cover; }
.detail-photo { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.product-info { padding: 14px; }
.product-info h3 { font-size: 0.95rem; margin-bottom: 4px; color: #3a2a24; }
.price { font-weight: 700; color: #5a3e36; font-size: 1.05rem; margin-bottom: 6px; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 4px; font-size: 0.7rem; font-weight: 600; }
.tag-bag { background: #e8e0d6; color: #5a3e36; }
.tag-knit { background: #d4e0d4; color: #3a5a3a; }

.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.detail-img { background: #f5f0eb; border-radius: 8px; display: flex; align-items: center; justify-content: center; aspect-ratio: 1; }
.detail-info h1 { font-size: 1.6rem; color: #3a2a24; margin: 10px 0 6px; }
.detail-price { font-size: 1.5rem; font-weight: 700; color: #5a3e36; margin-bottom: 14px; }
.detail-desc { color: #555; line-height: 1.6; margin-bottom: 14px; }
.detail-specs { list-style: none; padding: 0; margin-bottom: 20px; }
.detail-specs li { padding: 4px 0; font-size: 0.85rem; color: #666; }
.detail-specs li::before { content: '• '; color: #8b5e4a; }
.add-to-cart-form { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin-bottom: 20px; }
.add-to-cart-form label { font-size: 0.85rem; font-weight: 600; display: flex; flex-direction: column; gap: 4px; }
.add-to-cart-form input[type="number"] { width: 60px; padding: 6px 8px; border: 1px solid #ccc; border-radius: 4px; font-size: 1rem; }
.btn { display: inline-block; padding: 10px 24px; background: #5a3e36; color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: 0.9rem; font-weight: 600; text-decoration: none; }
.btn:hover { background: #3a2a24; }
.btn-secondary { background: #fff; color: #5a3e36; border: 1px solid #5a3e36; }
.btn-secondary:hover { background: #f5f0eb; }
.back-link { display: inline-block; margin-top: 12px; color: #8b5e4a; font-size: 0.85rem; text-decoration: none; }
.back-link:hover { text-decoration: underline; }

.cart-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.cart-table th, .cart-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #eee; }
.cart-table th { background: #f5f0eb; font-size: 0.8rem; color: #5a3e36; text-transform: uppercase; letter-spacing: 0.5px; }
.cart-table tfoot td { background: #faf8f5; font-size: 1.05rem; }
.qty-form input[type="number"] { width: 60px; padding: 4px 6px; border: 1px solid #ccc; border-radius: 4px; }
.btn-remove { background: none; border: none; color: #c0392b; cursor: pointer; font-size: 0.8rem; text-decoration: underline; }
.cart-actions { display: flex; gap: 12px; margin-top: 20px; justify-content: flex-end; }
.empty-cart { text-align: center; padding: 60px 0; }
.empty-cart p { margin-bottom: 20px; font-size: 1.1rem; color: #888; }

.contact { max-width: 600px; margin: 0 auto; }
.contact h1 { font-size: 1.5rem; color: #3a2a24; margin-bottom: 8px; }
.contact p { color: #666; margin-bottom: 24px; }
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.contact-form label { font-size: 0.85rem; font-weight: 600; display: flex; flex-direction: column; gap: 4px; color: #3a2a24; }
.contact-form input, .contact-form textarea { padding: 8px 12px; border: 1px solid #ccc; border-radius: 4px; font-family: inherit; font-size: 0.95rem; }
.contact-form textarea { resize: vertical; }
.contact-form textarea[readonly] { background: #f5f0eb; color: #555; }

.order-success { text-align: center; padding: 80px 0; }
.order-success h1 { font-size: 1.8rem; color: #3a2a24; margin-bottom: 12px; }
.order-success p { margin-bottom: 24px; color: #666; }

footer { text-align: center; padding: 24px 20px; color: #aaa; font-size: 0.8rem; border-top: 1px solid #e8e0d6; }

.admin h1 { font-size: 1.4rem; color: #3a2a24; margin-bottom: 20px; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.05); margin-bottom: 20px; }
.admin-table th, .admin-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid #eee; font-size: 0.9rem; }
.admin-table th { background: #f5f0eb; font-size: 0.8rem; color: #5a3e36; text-transform: uppercase; letter-spacing: 0.5px; }
.admin-thumb { width: 50px; height: 50px; border-radius: 4px; object-fit: cover; }
.admin-thumb.placeholder { background: #ddd2c8; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #8b7a72; }
.btn-sm { padding: 4px 12px; font-size: 0.8rem; }
.admin-form { max-width: 500px; display: flex; flex-direction: column; gap: 16px; }
.admin-form label { font-size: 0.85rem; font-weight: 600; display: flex; flex-direction: column; gap: 4px; color: #3a2a24; }
.admin-form input, .admin-form textarea { padding: 8px 12px; border: 1px solid #ccc; border-radius: 4px; font-family: inherit; font-size: 0.95rem; }
.admin-form textarea { resize: vertical; }
.admin-photo { margin-bottom: 8px; }
.admin-photo-preview { max-width: 200px; max-height: 200px; border-radius: 4px; display: block; margin: 8px 0; }
.file-label { font-weight: 400 !important; margin-top: 8px; }
