/* ---------------- header ---------------- */
.site-header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; box-shadow: var(--shadow); }
.header-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 38px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-text strong { font-size: 15.5px; }
.brand-text span { font-size: 11.5px; color: #c7d1e0; }
.main-nav { display: flex; gap: 22px; font-size: 14px; }
.main-nav a { opacity: 0.9; }
.main-nav a:hover { opacity: 1; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch button { background: transparent; border: 1px solid rgba(255,255,255,.35); color: #fff; padding: 5px 10px; border-radius: 6px; font-size: 12.5px; }
.lang-switch button.active { background: var(--gold); border-color: var(--gold); color: var(--navy-dark); font-weight: 700; }
.theme-toggle, .burger { background: transparent; border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: 8px; padding: 6px 10px; font-size: 15px; }
.burger { display: none; }

.category-strip { background: var(--navy-dark); overflow-x: auto; }
.category-strip .container { display: flex; gap: 8px; padding: 10px 20px; }
.chip { flex: 0 0 auto; background: rgba(255,255,255,.08); color: #dfe7f5; border: none; padding: 7px 14px; border-radius: 999px; font-size: 13px; white-space: nowrap; }
.chip.active { background: var(--gold); color: var(--navy-dark); font-weight: 700; }
.chip.about-chip { background: transparent; border: 1px dashed rgba(255,255,255,.35); }

/* ---------------- hero ---------------- */
/* ---------------- header banner slider ---------------- */
.banner-slider { position: relative; width: 100%; aspect-ratio: 1920 / 1150; max-height: 1150px; overflow: hidden; background: var(--bg); }
.banner-slider.hidden { display: none; }
.banner-slider-track { display: flex; height: 100%; transition: transform .5s ease; }
.banner-slide { flex: 0 0 100%; height: 100%; position: relative; display: block; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-slide .banner-caption { position: absolute; inset-inline-start: 0; bottom: 0; padding: 14px 22px; background: linear-gradient(0deg, rgba(7,27,56,.72), transparent); color: #fff; font-size: 15px; font-weight: 700; max-width: 80%; }
.banner-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(10,42,86,.55); color: #fff; border: none; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; transition: background .15s ease; }
.banner-nav:hover, .banner-nav:focus-visible { background: rgba(10,42,86,.85); }
.banner-prev { inset-inline-start: 12px; }
.banner-next { inset-inline-end: 12px; }
.banner-dots { position: absolute; bottom: 12px; inset-inline-end: 50%; transform: translateX(50%); display: flex; gap: 6px; }
[dir="rtl"] .banner-dots { transform: translateX(-50%); }
.banner-dots button { width: 8px; height: 8px; border-radius: 50%; border: none; background: rgba(255,255,255,.55); cursor: pointer; padding: 0; }
.banner-dots button.active { background: #fff; width: 20px; border-radius: 5px; }

.hero { background: linear-gradient(160deg, var(--navy), var(--navy-dark)); color: #fff; padding: 46px 0 40px; text-align: center; }
.hero h1 { font-size: 30px; margin: 0 0 10px; }
.hero p { color: #cbd6e6; max-width: 620px; margin: 0 auto 22px; }
.search-box { display: flex; max-width: 480px; margin: 0 auto; gap: 8px; }
.search-box input { flex: 1; padding: 12px 14px; border-radius: 10px; border: none; font-size: 14px; }
.search-box button { background: var(--gold); color: var(--navy-dark); border: none; padding: 0 20px; border-radius: 10px; font-weight: 700; }

/* ---------------- product grid ---------------- */
.section { padding: 46px 0; }
#products, #about, #branches, #contact-form { scroll-margin-top: var(--header-h, 64px); }
.section-title { display: flex; align-items: baseline; gap: 10px; margin-bottom: 20px; }
.section-title .count { color: var(--text-light); font-size: 13px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.product-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.product-card:hover, .product-card:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow); }
.product-img { aspect-ratio: 1 / 1; background: var(--bg); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: 14px 16px; }
.product-cat { font-size: 11.5px; color: var(--gold); font-weight: 700; }
.product-name { margin: 6px 0 4px; font-size: 15.5px; }
.product-code { font-size: 12px; color: var(--text-light); }
.product-desc { font-size: 13px; color: var(--text-light); margin: 8px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-spec { white-space: pre-line; font-size: 14px; line-height: 1.9; color: var(--text-light); margin: 8px 0 0; }
.product-seo-note { font-size: 13px; color: var(--text); margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--border); }
.empty-state, .error-state { grid-column: 1 / -1; text-align: center; padding: 50px 20px; color: var(--text-light); }
.error-state-title { font-weight: 700; margin-bottom: 12px; color: var(--danger); }

/* ---------------- skeleton loading ---------------- */
.skeleton-block, .skeleton-line { background: linear-gradient(90deg, var(--border) 25%, var(--bg) 37%, var(--border) 63%); background-size: 400% 100%; animation: skeleton-shimmer 1.4s ease infinite; border-radius: 6px; }
.product-card.skeleton .product-img.skeleton-block { border-radius: 0; }
.skeleton-line { height: 11px; margin: 8px 0; }
@keyframes skeleton-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---------------- about + footer ---------------- */
.about-section { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.feature-list { margin-top: 18px; display: grid; gap: 10px; }
.feature-item { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.feature-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex: 0 0 auto; }

.site-footer { background: var(--navy-dark); color: #cbd6e6; padding: 40px 0 20px; margin-top: 30px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.4fr; gap: 30px; }
.footer-col img { height: 30px; margin-bottom: 12px; }
.footer-col h4 { color: #fff; font-size: 14px; margin: 0 0 12px; }
.footer-col p { font-size: 13.5px; margin: 4px 0; }
.addr-line { display: flex; gap: 8px; font-size: 13px; margin-bottom: 10px; }
.footer-bottom { text-align: center; font-size: 12px; margin-top: 30px; color: #8a9ab0; }

/* ---------------- branches (REQ-005/006) ---------------- */
.branches-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.branch-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.branch-card h3 { font-size: 16px; margin: 0 0 8px; color: var(--navy); }
html.theme-dark .branch-card h3 { color: #dfe7f5; }
.branch-address { font-size: 13.5px; color: var(--text-light); margin: 0 0 6px; }
.branch-phone { font-size: 13.5px; color: var(--text-light); margin: 0 0 10px; }
.branch-map-link { display: inline-block; font-size: 13px; font-weight: 700; color: var(--gold); }
.branch-map-link:hover { text-decoration: underline; }

/* ---------------- social links (REQ-007) ---------------- */
.social-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.social-link { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); color: #fff; font-size: 0; position: relative; }
.social-link::after { content: attr(aria-label); font-size: 11px; position: absolute; inset-inline-start: 0; top: 100%; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s ease; }
.social-link:hover, .social-link:focus-visible { background: var(--gold); border-color: var(--gold); }
.social-link:hover::after, .social-link:focus-visible::after { opacity: 1; }

/* ---------------- contact form (REQ-008..014) ---------------- */
.contact-form-desc { color: var(--text-light); margin: -8px 0 18px; font-size: 14px; }
.contact-form { max-width: 640px; }
.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 4px; }
.contact-form label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 6px; color: var(--text); }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 11px 13px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 14px; font-family: inherit;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--gold); }
.contact-form textarea { resize: vertical; min-height: 110px; }
.contact-form .msg { margin-top: 12px; font-size: 13.5px; }
.contact-form .msg.success { color: var(--success); }
.contact-form .msg.error { color: var(--danger); }

/* ---------------- modal ---------------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(5, 12, 25, .55); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 100; }
.modal { background: var(--surface); color: var(--text); border-radius: var(--radius); padding: 26px; max-width: 460px; width: 100%; max-height: 86vh; overflow-y: auto; position: relative; box-shadow: var(--shadow); }
.modal img { border-radius: 10px; margin-bottom: 14px; width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.modal-close { position: absolute; inset-inline-end: 14px; top: 14px; background: transparent; border: none; font-size: 22px; line-height: 1; color: var(--text-light); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

/* ---------------- toast ---------------- */
.toast-container { position: fixed; bottom: 20px; inset-inline-end: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 200; max-width: 320px; }
.toast { background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 10px; font-size: 13.5px; box-shadow: var(--shadow); opacity: 0; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; cursor: pointer; }
.toast--visible { opacity: 1; transform: translateY(0); }
.toast--success { background: var(--success); }
.toast--error { background: var(--danger); }

/* ---------------- generic buttons / forms (shared with admin) ---------------- */
.btn { background: var(--navy); color: #fff; border: none; padding: 11px 20px; border-radius: 8px; font-size: 14px; font-weight: 600; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn.secondary { background: transparent; color: var(--navy); border: 1px solid var(--navy); }
.btn.danger { background: var(--danger); }
html.theme-dark .btn.secondary { color: #dfe7f5; border-color: #4a5a75; }

/* ---------------- 404 page ---------------- */
.not-found-page { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 20px; }
.not-found-page h1 { font-size: 64px; color: var(--navy); margin: 0; }
.not-found-page p { color: var(--text-light); margin: 10px 0 22px; }

/* ===== product detail modal: image gallery (main image + thumbnails) ===== */
.modal .product-gallery { margin-bottom: 14px; }
.modal .product-gallery .product-main-image { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 10px; display: block; margin-bottom: 10px; }
.modal .product-thumbnails { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.modal .product-thumbnail { flex: 0 0 56px; width: 56px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: none; }
.modal .product-thumbnail img { width: 100%; height: 100%; aspect-ratio: unset; object-fit: cover; margin-bottom: 0; border-radius: 6px; display: block; }
.modal .product-thumbnail.active { border-color: var(--gold); }
