﻿/* Base Theme */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f1f5f9;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --brand-900: #0b3c78;
  --brand-700: #1259b8;
  --brand-500: #1f87e0;
  --brand-400: #37b5f2;
  --accent: #e11d48;
  --ring: rgba(23, 109, 215, 0.15);
  --shadow-soft: 0 20px 45px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 600px at 90% -10%, #e0f2fe 0%, #f8fafc 45%, #f1f5f9 100%);
}

header > div:first-of-type {
  flex-wrap: nowrap;
}

header > div:first-of-type > a:first-child {
  min-width: 0;
}

header a[href^="tel:"],
header button,
header button span,
header > div:first-of-type > div.hidden.lg\:flex > span,
header .fa-phone,
header .fa-clock,
header .fa-location-dot {
  white-space: nowrap !important;
}

header > div:first-of-type > a:first-child .hidden.md\:block {
  flex: 0 1 210px;
  max-width: 210px;
  min-width: 150px;
}

header > div:first-of-type > a:first-child p {
  line-height: 1.12;
}

header > div:first-of-type > a:first-child p:first-child {
  font-size: 12px;
  white-space: normal !important;
}

header > div:first-of-type > a:first-child p:last-child {
  white-space: nowrap !important;
}

header > div:first-of-type > div.hidden.lg\:flex,
header > div:first-of-type > div.flex.items-center.gap-3 {
  flex-shrink: 0;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
}

header > div:first-of-type > div.hidden.lg\:flex > *,
header > div:first-of-type > div.flex.items-center.gap-3 > * {
  flex: 0 0 auto;
  min-width: max-content;
}

header > div:first-of-type > div.flex.items-center.gap-3 button {
  align-items: center;
  flex-wrap: nowrap !important;
  justify-content: center;
  line-height: 1.15;
  min-width: max-content;
}

@media (max-width: 1280px) {
  header > div:first-of-type {
    gap: 0.75rem;
  }

  header > div:first-of-type > a:first-child {
    gap: 0.75rem;
  }

  header > div:first-of-type > a:first-child .hidden.md\:block {
    flex-basis: 180px;
    max-width: 180px;
  }

  header > div:first-of-type > a:first-child > div:first-child {
    font-size: 1.65rem;
    padding: 0.45rem 0.85rem;
  }

  header > div:first-of-type > div.hidden.lg\:flex {
    gap: 1rem;
    font-size: 0.82rem;
  }

  header > div:first-of-type > div.flex.items-center.gap-3 {
    gap: 0.55rem;
  }

  header > div:first-of-type > div.flex.items-center.gap-3 button {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

@media (max-width: 1120px) {
  header > div:first-of-type > a:first-child .hidden.md\:block {
    display: none;
  }
}

@media (max-width: 1180px) {
  header > div:first-of-type > div.hidden.lg\:flex > span:last-child {
    display: none !important;
  }
}

@media (max-width: 1080px) {
  header > div:first-of-type > div.hidden.lg\:flex > span:first-of-type {
    display: none !important;
  }
}

@media (max-width: 520px) {
  header > div:first-of-type {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  header > div:first-of-type > div.flex.items-center.gap-3 button[onclick*="cart"] {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }
}

@media (max-width: 430px) {
  header > div:first-of-type {
    gap: 0.5rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  header > div:first-of-type > a:first-child {
    flex: 1 1 auto;
    max-width: calc(100vw - 150px);
    min-width: 0;
  }

  header > div:first-of-type > a:first-child > div:first-child {
    border-radius: 0.8rem;
    font-size: clamp(1.25rem, 6.2vw, 1.65rem);
    letter-spacing: -0.06em;
    max-width: 100%;
    overflow: hidden;
    padding: 0.5rem 0.7rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  header > div:first-of-type > div.flex.items-center.gap-3 {
    flex: 0 0 auto;
    gap: 0.45rem;
  }

  header > div:first-of-type > div.flex.items-center.gap-3 button[onclick*="cart"] {
    border-radius: 0.85rem;
    gap: 0.35rem;
    min-width: 0;
    padding: 0.72rem 0.78rem;
  }

  header > div:first-of-type > div.flex.items-center.gap-3 button[onclick*="cart"] i {
    font-size: 1rem;
  }

  header > div:first-of-type > div.flex.items-center.gap-3 button[onclick*="cart"] > span {
    font-size: 0;
    line-height: 1;
  }

  header > div:first-of-type > div.flex.items-center.gap-3 button[onclick*="cart"] > span::before {
    content: "(";
    font-size: 0.85rem;
    font-weight: 800;
  }

  header > div:first-of-type > div.flex.items-center.gap-3 button[onclick*="cart"] > span::after {
    content: ")";
    font-size: 0.85rem;
    font-weight: 800;
  }

  header #cart-count,
  header [data-cart-count] {
    font-size: 0.85rem;
    font-weight: 800;
  }

  #mobile-menu-button {
    flex: 0 0 auto;
    font-size: 1.35rem;
    padding: 0.35rem;
  }
}

@media (max-width: 360px) {
  header > div:first-of-type > a:first-child {
    max-width: calc(100vw - 126px);
  }

  header > div:first-of-type > a:first-child > div:first-child {
    font-size: 1.12rem;
    padding-left: 0.55rem;
    padding-right: 0.55rem;
  }

  header > div:first-of-type > div.flex.items-center.gap-3 button[onclick*="cart"] {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }
}

.hero-bg {
  background: linear-gradient(105deg, #0b3c78 0%, #1259b8 48%, #37b5f2 100%);
  position: relative;
  overflow: hidden;
}

.hero-bg::before,
.hero-bg::after {
  content: '';
  position: absolute;
  border-radius: 9999px;
  pointer-events: none;
}

.hero-bg::before {
  width: 760px;
  height: 760px;
  right: -220px;
  top: -200px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0));
}

.hero-bg::after {
  width: 440px;
  height: 440px;
  right: 18%;
  bottom: -250px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
}

.glass-card {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(12px);
}

.category-card {
  background: linear-gradient(120deg, #0d4292 0%, #1672cf 54%, #43c5f5 100%);
  border-radius: 24px;
  color: #f8fbff;
  min-height: 230px;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.category-card::before {
  content: '';
  width: 260px;
  height: 260px;
  border-radius: 999px;
  position: absolute;
  right: -70px;
  bottom: -110px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0));
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 44px rgba(12, 74, 152, 0.28);
}

.section-shell {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
}

.info-tile {
  background: var(--surface);
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.map-fallback {
  align-items: center;
  color: #475569;
  display: flex;
  font-weight: 700;
  height: 100%;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.card-hover {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.card-hover:hover {
  transform: translateY(-9px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
}

.product-image-wrap {
  background: linear-gradient(145deg, #dbeafe 0%, #f0f9ff 100%);
}

.product-qty-field {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 14px;
  padding: 9px 11px;
}

.product-qty-field span {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.product-qty-field input {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-weight: 800;
  padding: 6px 8px;
  text-align: center;
  width: 82px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

.antispam-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }
.delay-4 { animation-delay: 0.32s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .hero-bg {
    min-height: auto;
  }
}

@media (max-width: 768px) {
  .category-card {
    min-height: 190px;
  }
}

.admin-shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 32px 24px 56px;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 24px;
  align-items: start;
}

.admin-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  padding: 24px;
}

.admin-field {
  display: grid;
  gap: 8px;
}

.admin-field label {
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

.admin-input,
.admin-select,
.admin-textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text);
  padding: 12px 14px;
}

.admin-textarea {
  min-height: 112px;
  resize: vertical;
}

.admin-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  padding: 12px 16px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.admin-button:hover {
  transform: translateY(-1px);
}

.admin-button.primary {
  background: var(--brand-900);
  color: #fff;
}

.admin-button.secondary {
  background: #e0f2fe;
  color: var(--brand-900);
}

.admin-button.danger {
  background: #fee2e2;
  color: #b91c1c;
}

.admin-product-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  padding: 16px 0;
}

.admin-product-row:last-child {
  border-bottom: 0;
}

.admin-product-row img {
  width: 92px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  background: #e2e8f0;
}

.admin-product-title {
  font-size: 18px;
  font-weight: 800;
}

.admin-product-meta {
  color: #64748b;
  font-size: 14px;
  margin-top: 4px;
}

.admin-product-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  padding: 16px 0;
}

.admin-order-row:last-child {
  border-bottom: 0;
}

.support-chat-widget {
  bottom: 22px;
  position: fixed;
  right: 22px;
  z-index: 90;
}

.support-chat-toggle {
  align-items: center;
  background: #0b3c78;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.18);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  gap: 10px;
  padding: 14px 18px;
}

.support-chat-panel {
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  bottom: 62px;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.2);
  max-width: calc(100vw - 32px);
  overflow: hidden;
  position: absolute;
  right: 0;
  width: 360px;
}

.support-chat-head {
  align-items: center;
  background: linear-gradient(105deg, #0b3c78, #1976c9);
  color: #fff;
  display: flex;
  justify-content: space-between;
  padding: 16px;
}

.support-chat-head span {
  display: block;
  font-size: 12px;
  margin-top: 3px;
  opacity: 0.88;
}

.support-chat-head button {
  background: rgba(255, 255, 255, 0.14);
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  height: 34px;
  width: 34px;
}

.support-chat-messages {
  background: #f8fafc;
  max-height: 250px;
  min-height: 140px;
  overflow-y: auto;
  padding: 14px;
}

.support-chat-note {
  color: #64748b;
  font-size: 14px;
  line-height: 1.45;
}

.support-chat-message {
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 10px;
  padding: 10px 12px;
}

.support-chat-message.client {
  background: #dbeafe;
  color: #0f172a;
  margin-left: 28px;
}

.support-chat-message.system {
  background: #ecfdf5;
  color: #065f46;
  margin-right: 28px;
}

.support-chat-message.admin {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #7c2d12;
  margin-right: 28px;
}

.support-chat-message time {
  color: #64748b;
  display: block;
  font-size: 11px;
  margin-top: 5px;
}

.support-chat-form {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.support-profile-form strong {
  color: #0f172a;
  font-size: 16px;
}

.support-profile-form span {
  color: #64748b;
  font-size: 13px;
}

.support-profile-card {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  color: #475569;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  padding: 10px 12px;
}

.support-profile-card span {
  color: #0f172a;
  font-weight: 800;
}

.support-profile-card strong {
  font-size: 12px;
}

.support-profile-card button {
  background: transparent;
  border: 0;
  color: #0b3c78;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  padding: 0;
}

.support-chat-form input,
.support-chat-form textarea {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 11px 12px;
  width: 100%;
}

.support-chat-consent {
  align-items: flex-start;
  color: #64748b;
  display: flex;
  font-size: 12px;
  gap: 10px;
  line-height: 1.45;
}

.support-chat-consent input {
  flex: 0 0 auto;
  margin-top: 2px;
  width: 18px;
}

.support-chat-consent a {
  color: var(--brand-700);
  font-weight: 800;
}

.support-chat-form button[type="submit"] {
  background: #e11d48;
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  padding: 12px;
}

.support-chat-form button[disabled] {
  cursor: wait;
  opacity: 0.72;
}

.support-chat-status {
  color: #64748b;
  font-size: 13px;
  min-height: 18px;
}

.support-chat-status.success {
  color: #047857;
}

.support-chat-status.error {
  color: #b91c1c;
}

@media (max-width: 980px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-product-row {
    grid-template-columns: 72px 1fr;
  }

  .admin-product-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .admin-order-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .support-chat-widget {
    bottom: 14px;
    right: 14px;
  }

  .support-chat-panel {
    bottom: 58px;
    right: -2px;
    width: calc(100vw - 28px);
  }
}
