:root {
    --blue: #2463a6;
    --border: #d5d5d5;
    --light: #f3f3f3;
    --text: #222;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: white; color: var(--text); font: 16px Arial, sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: var(--blue); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.site-header { border-bottom: 1px solid var(--border); background: var(--light); }
.header-inner { max-width: 1100px; margin: auto; padding: 15px 20px; display: flex; align-items: center; gap: 28px; }
.brand { font-size: 22px; font-weight: bold; color: var(--text); text-decoration: none; }
.main-nav, .header-actions { display: flex; gap: 20px; }
.header-actions { margin-left: auto; }
.header-inner a { white-space: nowrap; }
.nav-count { font-weight: bold; }
.site-main { max-width: 1100px; min-height: calc(100vh - 130px); margin: auto; padding: 24px 20px 60px; }
.site-footer { max-width: 1100px; margin: auto; padding: 18px 20px; border-top: 1px solid var(--border); color: #666; font-size: 13px; }

.hero { padding: 22px 24px; background: var(--light); border: 1px solid var(--border); }
.hero h1 { margin: 0 0 8px; font-size: 30px; }
.hero-greeting { margin: 0; }
.catalog-section { margin-top: 32px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.section-heading h2, .page-heading h1 { margin: 0; font-size: 26px; }
.result-count { color: #666; font-size: 14px; }
.catalog-tools { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.pet-filter, .category-filter { display: flex; gap: 8px; flex-wrap: wrap; }
.pet-tab, .category-tab { padding: 8px 12px; border: 1px solid var(--border); border-radius: 3px; background: white; color: var(--text); }
.pet-tab.active, .category-tab.active { background: var(--blue); border-color: var(--blue); color: white; }
.search-box { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid var(--border); background: white; }
.search-box input { width: 180px; border: 0; outline: 0; }
.category-filter { margin: 15px 0; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.product-card { border: 1px solid var(--border); min-width: 0; }
.product-visual { position: relative; height: 130px; display: grid; place-items: center; background: var(--light); }
.product-visual > span { font-size: 58px; }
.favorite-form { position: absolute; top: 8px; right: 8px; }
.favorite-button { width: 32px; height: 32px; border: 1px solid var(--border); background: white; color: var(--text); font-size: 23px; line-height: 1; }
.favorite-button.selected { color: #c73545; }
.product-info { padding: 13px; }
.product-type { color: #666; font-size: 13px; }
.product-info h3 { margin: 7px 0 16px; font-size: 17px; }
.product-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.product-bottom strong { white-space: nowrap; }
.add-button, .cart-added, .primary-button { display: inline-block; padding: 8px 12px; border: 1px solid var(--blue); border-radius: 3px; background: var(--blue); color: white; text-decoration: none; font-size: 14px; }
.add-button:hover, .primary-button:hover { background: #174f89; }
.cart-added { background: #e8f2e8; border-color: #8eae8e; color: #245b24; }
.empty-note { padding: 25px; text-align: center; }

.page-heading { margin: 8px 0 24px; }
.section-kicker { display: none; }
.empty-state { max-width: 500px; padding: 40px 20px; border: 1px solid var(--border); text-align: center; }
.empty-state > span { display: block; font-size: 44px; }
.empty-state h1, .empty-state h2 { font-size: 24px; }
.cart-layout, .checkout-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; align-items: start; }
.cart-items, .delivery-panel, .order-summary, .form-panel { border: 1px solid var(--border); }
.cart-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-bottom: 1px solid var(--border); }
.cart-row:last-child { border-bottom: 0; }
.cart-thumbnail { width: 70px; height: 70px; flex: none; display: grid; place-items: center; background: var(--light); font-size: 35px; }
.cart-row-info { flex: 1; min-width: 0; }
.cart-row-info small { color: #666; }
.cart-row-info h2 { margin: 5px 0; font-size: 16px; }
.quantity-controls { display: flex; align-items: center; gap: 8px; }
.quantity-controls button { width: 28px; height: 28px; border: 1px solid var(--border); background: white; }
.remove-form button { border: 0; background: none; font-size: 24px; }
.order-summary { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.order-summary strong { font-size: 24px; }
.form-panel { max-width: 550px; }
.profile-art { display: none; }
.stacked-form { display: flex; flex-direction: column; gap: 8px; padding: 20px; }
.stacked-form label { font-weight: bold; }
.stacked-form input, .stacked-form select { width: 100%; height: 38px; padding: 6px 8px; border: 1px solid var(--border); margin-bottom: 8px; }
.stacked-form button { align-self: flex-start; }
.field-error { color: #a20d21; font-size: 13px; }
.success-note { color: #245b24; }
.delivery-panel { padding: 18px; }
.delivery-panel h2 { margin: 0 0 15px; font-size: 20px; }
.delivery-option { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); margin-bottom: 8px; cursor: pointer; }
.delivery-option:has(input:checked) { border-color: var(--blue); background: #eef4fa; }
.delivery-icon { font-size: 24px; }
.checkout-success { margin-top: 30px; }

@media (max-width: 750px) {
    .header-inner { flex-wrap: wrap; gap: 10px 18px; }
    .header-actions { width: 100%; margin-left: 0; }
    .catalog-tools { align-items: stretch; flex-direction: column; }
    .search-box input { width: 100%; }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .site-main { padding: 18px 12px 45px; }
    .header-inner { padding: 12px; }
    .main-nav { gap: 12px; }
    .hero h1 { font-size: 25px; }
    .product-grid { grid-template-columns: 1fr; }
    .product-bottom { flex-wrap: wrap; }
    .cart-row { flex-wrap: wrap; }
    .site-footer { padding: 15px 12px; }
}
