body { font-family: Arial, sans-serif; background: #f8fafc; margin: 0; color: #111827; }
.container { max-width: 1180px; margin: 0 auto; padding: 20px; }
.hero { display: flex; justify-content: space-between; align-items: center; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px; }
.hero h1 { margin: 0; }
.hero p { margin: 6px 0 0; color: #4b5563; }
.hero-logo { max-width: 320px; max-height: 92px; width: auto; height: auto; display: block; }
.hero-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.hero-links a { color: #1d4ed8; text-decoration: none; font-weight: 600; font-size: 13px; }
.hero-links a:hover { text-decoration: underline; }
.hero-actions { display: flex; align-items: center; gap: 8px; }
.nav-btn { background: #e5e7eb; border: 1px solid #9ca3af; border-radius: 8px; padding: 10px 12px; color: #111827; }
.nav-btn.active { background: #dbeafe; border-color: #93c5fd; color: #1e3a8a; }
.nav-btn,
.filters button,
.pagination-row button,
.side-cat-btn,
.checkout button {
  cursor: pointer;
}

.open-detail-btn {
  cursor: pointer;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: inherit;
  color: inherit;
}

button:disabled {
  cursor: not-allowed;
}
.filters { margin-top: 12px; display: grid; grid-template-columns: 1fr 220px 220px auto auto; gap: 8px; }
.filters input, .filters select, .filters button, .checkout input, .checkout select, .checkout textarea, .checkout button { padding: 10px; border: 1px solid #d1d5db; border-radius: 8px; }
.promo-only { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #374151; background: #fff; border: 1px solid #d1d5db; border-radius: 8px; padding: 0 10px; }
.catalog-layout { margin-top: 10px; display: grid; grid-template-columns: 260px 1fr; gap: 12px; align-items: start; }
.categories-side { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 10px; position: sticky; top: 12px; }
.categories-side h3 { margin: 0 0 8px; font-size: 15px; }
.side-categories { display: flex; flex-direction: column; gap: 6px; max-height: 520px; overflow: auto; }
.side-cat-btn { text-align: left; background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px; color: #111827; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-cat-btn.active { background: #dbeafe; border-color: #93c5fd; color: #1e3a8a; }
.side-cat-remove { font-size: 16px; line-height: 1; font-weight: 700; color: #1d4ed8; }
.kpis { margin-top: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.kpi-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 10px; }
.kpi-card span { display: block; color: #6b7280; font-size: 12px; }
.kpi-card strong { display: block; margin-top: 4px; font-size: 18px; }
.curation-section { margin-top: 14px; }
.curation-head { display: flex; align-items: end; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.curation-head h2 { margin: 0 0 4px; }
.curation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.curation-card { background: linear-gradient(180deg, #ffffff, #f8fafc); border: 1px solid #dbeafe; border-radius: 14px; padding: 14px; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04); }
.curation-cover { width: 100%; height: 180px; object-fit: cover; border-radius: 10px; border: 1px solid #dbeafe; background: #eff6ff; margin-bottom: 10px; }
.curation-card h3 { margin: 0 0 8px; }
.curation-card p { margin: 0 0 10px; color: #475569; }
.curation-products { color: #334155; font-size: 13px; margin-bottom: 10px; }
.bundle-price-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.bundle-price-row strong { color: #166534; font-size: 1.1rem; }
.bundle-price-row span { color: #991b1b; text-decoration: line-through; font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.product-detail { margin-top: 10px; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px; }
.product-detail-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.product-detail-layout { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: 14px; }
.product-detail-cover { width: 100%; height: 360px; object-fit: contain; border-radius: 10px; border: 1px solid #e5e7eb; background: #f9fafb; }
.detail-title { margin: 0; font-size: 1.5rem; }
.detail-author { margin: 6px 0; color: #4b5563; }
.detail-price { margin: 6px 0; font-size: 1.2rem; font-weight: 700; color: #166534; }
.detail-old-price { margin: 2px 0 8px; color: #991b1b; text-decoration: line-through; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chip { background: #e5f0ff; color: #1e3a8a; border-radius: 999px; padding: 4px 9px; font-size: 12px; }
.detail-meta { margin: 8px 0; color: #374151; font-size: 13px; }
.detail-description { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #d1d5db; color: #374151; line-height: 1.6; }
.detail-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.gallery-grid { margin-top: 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.gallery-grid img { width: 100%; height: 150px; object-fit: contain; border-radius: 8px; border: 1px solid #e5e7eb; background: #fff; }
.detail-similar { margin-top: 14px; padding-top: 10px; border-top: 1px dashed #d1d5db; }
.detail-similar h4 { margin: 0 0 10px; }
.detail-similar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.detail-similar-card { border: 1px solid #e5e7eb; border-radius: 10px; padding: 8px; background: #fff; }
.detail-similar-card img { width: 100%; height: 180px; object-fit: contain; border-radius: 8px; border: 1px solid #e5e7eb; background: #f9fafb; }
.detail-similar-card h5 { margin: 8px 0 4px; font-size: 13px; }
.detail-similar-card h5 button { color: #111827; text-decoration: none; font: inherit; }
.detail-similar-card h5 button:hover { text-decoration: underline; }
.catalog-loader { margin-top: 10px; margin-bottom: 8px; display: inline-flex; align-items: center; gap: 8px; color: #374151; font-weight: 600; }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #bfdbfe; border-top-color: #2563eb; animation: spin 0.7s linear infinite; }
.card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03); }
.card img { width: 100%; height: 240px; object-fit: contain; border-radius: 8px; background: #f3f4f6; }
.card-title { margin: 0; font-size: 15px; }
.card .meta { color: #4b5563; font-size: 13px; }
.card-title,
.card .meta,
.detail-title,
.detail-description,
.detail-meta {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.card .card-title a,
.card .details-link {
  color: inherit;
  text-decoration: none;
}

.card .card-title .open-detail-btn { font: inherit; }

.card .details-link {
  display: inline-block;
  margin-top: 2px;
  color: #1d4ed8;
  font-weight: 600;
}

.card .details-link:hover,
.card .card-title a:hover {
  text-decoration: underline;
}
.price-row { display: flex; align-items: center; gap: 8px; }
.price-main { font-weight: 700; }
.price-compare { color: #6b7280; text-decoration: line-through; font-size: 12px; }
.badge-row { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font-size: 11px; padding: 3px 8px; border-radius: 999px; }
.badge-featured { background: #fff7e6; color: #b45309; }
.badge-promo { background: #fee2e2; color: #b91c1c; }
.row { display: flex; gap: 8px; align-items: center; }
.checkout { margin-top: 16px; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 12px; }
.content-page { margin-top: 10px; }
.content-page-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 18px; }
.content-page-card h2 { margin-top: 0; margin-bottom: 14px; }
.content-page-body { color: #374151; line-height: 1.7; }
.content-page-body h3 { margin-top: 18px; margin-bottom: 8px; color: #111827; }
.content-page-body p, .content-page-body li { margin-top: 0; margin-bottom: 10px; }
.content-page-body a { color: #1d4ed8; }
.customer-auth-box, .customer-history-box, .delivery-choice { border: 1px solid #e5e7eb; border-radius: 10px; padding: 10px; margin-bottom: 10px; background: #f9fafb; }
.customer-auth-box h3, .customer-history-box h3 { margin: 0 0 8px; font-size: 16px; }
.customer-auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.customer-auth-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; }
.delivery-choice { display: flex; flex-direction: column; gap: 4px; }
.delivery-choice label, .payment-choice label { display: flex; align-items: center; gap: 8px; padding: 8px 6px; border-radius: 8px; min-height: 44px; cursor: pointer; }
.delivery-choice label:hover, .payment-choice label:hover { background: #f3f4f6; }
.delivery-choice label input[type=radio], .payment-choice label input[type=radio] { width: 18px; height: 18px; flex-shrink: 0; cursor: pointer; }
.payment-choice { border: 1px solid #e5e7eb; border-radius: 10px; padding: 10px; margin-bottom: 10px; background: #f9fafb; display: flex; flex-direction: column; gap: 4px; }
.checkout-legal-box { border: 1px solid #dbeafe; border-radius: 10px; padding: 12px; margin: 10px 0; background: #eff6ff; }
.checkout-legal-box h3 { margin: 0 0 8px; font-size: 16px; color: #1e3a8a; }
.checkout-legal-box p { margin: 0 0 8px; color: #1f2937; line-height: 1.5; }
.checkout-legal-box ul { margin: 0 0 8px 18px; color: #1f2937; }
.checkout-legal-box li { margin-bottom: 6px; }
.customer-auth-box-optional { border-style: dashed; background: #f8fafc; }
.delivery-title { font-weight: 700; color: #111827; }
.cart-items { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.cart-item { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px; background: #f9fafb; }
.cart-item .title { font-weight: 600; }
.cart-item .meta { color: #4b5563; font-size: 12px; }
.cart-actions { display: inline-flex; align-items: center; gap: 6px; }
.cart-actions button { padding: 6px 8px; border: 1px solid #d1d5db; background: #fff; border-radius: 6px; }
.cart-remove { background: #fee2e2 !important; border-color: #fecaca !important; color: #991b1b; width: 38px; height: 34px; display: inline-flex; align-items: center; justify-content: center; font-size: 0; }
.cart-remove::before { content: ''; width: 14px; height: 14px; display: inline-block; background: currentColor; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 3h6l1 2h5v2H3V5h5l1-2Zm-3 6h12l-1 11a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2L6 9Zm4 2v8h2v-8h-2Zm4 0v8h2v-8h-2Z'/%3E%3C/svg%3E") center / contain no-repeat; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 3h6l1 2h5v2H3V5h5l1-2Zm-3 6h12l-1 11a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2L6 9Zm4 2v8h2v-8h-2Zm4 0v8h2v-8h-2Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.checkout-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.checkout-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; }
.checkout textarea { margin-top: 8px; width: 100%; min-height: 80px; box-sizing: border-box; }
.notes-details { margin-top: 8px; }
.notes-details summary { cursor: pointer; color: #1d4ed8; font-size: 14px; font-weight: 600; padding: 8px 0; user-select: none; list-style: none; display: flex; align-items: center; gap: 6px; }
.notes-details summary::-webkit-details-marker { display: none; }
.notes-details summary::before { content: '+'; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: #dbeafe; color: #1d4ed8; font-weight: 700; font-size: 14px; line-height: 1; flex-shrink: 0; }
.notes-details[open] summary::before { content: '−'; }
.notes-details textarea { margin-top: 4px; width: 100%; min-height: 80px; box-sizing: border-box; }
.order-loader { margin-top: 8px; display: inline-flex; align-items: center; gap: 8px; color: #374151; font-weight: 600; }
.customer-orders { display: flex; flex-direction: column; gap: 8px; }
.customer-order-card { border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px; background: #fff; }
.customer-order-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.catalog-empty-box { border: 1px dashed #93c5fd; border-radius: 10px; padding: 16px; background: #eff6ff; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.catalog-empty-box p { margin: 0; color: #1e3a8a; }
.status-badge { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.status-badge.ok { background: #dcfce7; color: #166534; }
.status-badge.warn { background: #fef3c7; color: #92400e; }
.status-badge.no { background: #fee2e2; color: #991b1b; }
.pagination-row { margin-top: 10px; display: flex; align-items: center; gap: 10px; }
.pagination-row button { background: #e5e7eb; border: 1px solid #9ca3af; border-radius: 8px; padding: 8px 10px; }
.feedback { min-height: 22px; color: #1d4ed8; margin: 10px 0; }
.site-footer { margin-top: 18px; border-top: 1px solid #d1d5db; padding-top: 14px; }
.site-footer-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.site-footer h3, .site-footer h4 { margin: 0 0 8px; }
.site-footer p { margin: 0 0 6px; color: #374151; font-size: 14px; }
.site-footer a { color: #1d4ed8; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.footer-socials { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.hidden { display: none !important; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
  .filters, .kpis, .customer-auth-grid { grid-template-columns: 1fr; }
  .checkout-grid { grid-template-columns: 1fr 1fr; }
  .curation-grid { grid-template-columns: 1fr; }
  .catalog-layout { grid-template-columns: 1fr; }
  .categories-side { position: static; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-detail-layout { grid-template-columns: 1fr; }
  .product-detail-cover { height: 280px; }
  .cart-item { grid-template-columns: 1fr; }
  .site-footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 580px) {
  .checkout-grid { grid-template-columns: 1fr; }
}
