:root {
  --bg: #12141a;
  --bg-alt: #1a1d26;
  --card: #1e2129;
  --border: #2b2f3a;
  --text: #eef0f4;
  --text-dim: #9aa0ad;
  --accent: #ff7a1a;
  /* filament orange */
  --accent-hover: #ff9142;
  --success: #3ecf8e;
  --danger: #ff5c5c;
  --radius: 12px;
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Times New Roman', Times, serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- NAVBAR ---------- */
.navbar {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-greeting {
  color: var(--accent);
  font-style: italic;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  font-weight: bold;
  font-size: x-large;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  width: 100%;
  box-sizing: border-box;
  position: relative;
}

#catalog {
  scroll-margin-top: 100px;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 500;
}

.nav-links a {
  color: var(--text-dim);
  transition: color .15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.cart-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  color: var(--text-dim) !important;
  transition: color .15s;
}

.cart-link:hover,
.cart-link.active {
  color: var(--accent) !important;
}

.nav-plain-link {
  color: var(--text-dim) !important;
  font-weight: 500;
  transition: color .15s;
}

.nav-plain-link:hover,
.nav-plain-link.active {
  color: var(--accent) !important;
}

/* Hamburger button - hidden on desktop by default */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
}

.hamburger span {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--text);
  margin: 0 auto;
  transition: transform .2s, opacity .2s;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 760px) {
  .hamburger {
    display: flex;
  }

  .logo img {
    height: 48px !important;
  }

  .navbar-inner {
    flex-wrap: wrap;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 10px;
    padding-top: 16px;
    margin-top: 14px;
    border-top: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a,
  .nav-links .btn {
    width: 100%;
  }

  .nav-links .btn {
    box-sizing: border-box;
  }

  .cart-text {
    display: none;
  }
}

.cart-badge {
  background: var(--accent);
  color: #14161b;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  transition: background .15s, transform .1s;
}

.btn-primary {
  background: var(--accent);
  color: #14161b;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--accent);
}

.btn-danger {
  background: var(--danger);
  color: #14161b;
}

.btn:active {
  transform: scale(0.98);
}

.btn-block {
  width: 100%;
}

/* ---------- HERO ---------- */
.hero {
  padding: 80px 24px;
  text-align: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 122, 26, 0.15), transparent 55%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-size: 2.6rem;
  margin-bottom: 14px;
}

.hero h1 span {
  color: var(--accent);
}

.hero p {
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto 28px;
  font-size: 1.05rem;
}

/* ---------- PRODUCT GRID ---------- */
.section-title {
  font-size: 1.5rem;
  margin: 48px 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-bottom: 60px;
}

.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s, border-color .15s;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.product-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--bg-alt);
}

.product-img-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #23262f, #1a1d26);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 2.4rem;
}

.product-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.product-category {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-weight: 700;
}

.product-title {
  font-size: 1.05rem;
  font-weight: 600;
}

.product-desc {
  color: var(--text-dim);
  font-size: 0.88rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  flex: 1;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--success);
}

/* ---------- FORMS ---------- */
.form-wrap {
  max-width: 420px;
  margin: 60px auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.form-wrap h2 {
  margin-top: 0;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}

.field textarea {
  resize: vertical;
  min-height: 100px;
}

.form-footer-link {
  text-align: center;
  margin-top: 16px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.form-footer-link a {
  color: var(--accent);
  font-weight: 600;
}

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-size: 0.9rem;
}

.alert-error {
  background: rgba(255, 92, 92, 0.12);
  border: 1px solid var(--danger);
  color: #ffb3b3;
}

.alert-success {
  background: rgba(62, 207, 142, 0.12);
  border: 1px solid var(--success);
  color: #a8f0d1;
}

/* ---------- CART / TABLE ---------- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

th,
td {
  text-align: left;
  padding: 14px;
  border-bottom: 1px solid var(--border);
}

.tight-table th,
.tight-table td {
  padding: 10px 8px;
  font-size: 0.9rem;
}



th {
  color: var(--text-dim);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cart-item-title {
  font-weight: 600;
}

.qty-input {
  width: 60px;
  padding: 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
}

.cart-total-row td {
  font-size: 1.2rem;
  font-weight: 700;
  border-bottom: none;
}

.remove-link {
  color: var(--danger);
  font-size: 0.85rem;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
}

/* ---------- PRODUCT DETAIL ---------- */
.product-detail {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 44px;
  margin: 48px 0 70px;
  align-items: stretch;
}

.product-detail-img {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 480px;
}

.product-detail-media {
  flex: 1;
  min-height: 300px;
  position: relative;
}

.product-detail-media img,
.product-detail-media model-viewer,
.product-detail-media .product-img-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-detail h1 {
  margin-top: 0;
}

.product-detail .price {
  font-size: 1.8rem;
  display: block;
  margin: 14px 0;
}

.source-note {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 20px;
}

.source-note a {
  color: var(--accent);
}

@media (max-width: 760px) {
  .product-detail {
    grid-template-columns: 1fr;
  }

  .nav-links {
    gap: 12px;
    font-size: 0.9rem;
  }

  .hero h1 {
    font-size: 2rem;
  }
}

/* ---------- FOOTER ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 30px 24px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: auto;
}

.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 58px;
  height: 58px;
  background: #1a1a1a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  z-index: 100;
  transition: transform .15s;
}

.whatsapp-float:hover {
  transform: scale(1.08);
  background: #000;
}

.chat-float {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 58px;
  height: 58px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  z-index: 100;
  transition: transform .15s;
}

.chat-float:hover {
  transform: scale(1.08);
}

.chat-float-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 2px solid var(--bg);
}

/* ---------- CHAT UI ---------- */
.chat-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.admin-chat-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  align-items: start;
}

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

.chat-panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(90deg, rgba(255, 122, 26, 0.08), transparent);
}

.chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
  overflow: hidden;
}

.chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-avatar-them {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
}

.chat-avatar-me {
  background: var(--accent);
  color: #12141a;
}

.chat-msg-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  max-width: 78%;
}

.chat-msg-row.me {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-msg-row.them {
  align-self: flex-start;
}

.chat-bubble {
  padding: 11px 15px;
  font-size: 0.92rem;
  line-height: 1.45;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  word-break: break-word;
}

.chat-bubble-me {
  background: linear-gradient(135deg, var(--accent), #ff9a4d);
  color: #14161c;
  border-radius: 16px 16px 4px 16px;
}

.chat-bubble-them {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 16px 16px 16px 4px;
}

.chat-msg-meta {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 4px;
  padding: 0 4px;
}

.chat-msg-row.me .chat-msg-meta {
  text-align: right;
}

.chat-messages-area {
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 122, 26, 0.04), transparent 40%),
    var(--bg);
}

.chat-input-bar {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  background: var(--card);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chat-input-bar textarea {
  flex: 1;
  resize: none;
  min-height: 46px;
  max-height: 120px;
  padding: 12px 16px;
  border-radius: 22px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
}

.chat-input-bar textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.chat-send-btn {
  border-radius: 22px;
  padding: 0 22px;
  align-self: flex-end;
  height: 46px;
}

.chat-conv-item {
  display: block;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background .12s;
}

.chat-conv-item:hover {
  background: var(--bg-alt);
}

.chat-conv-item.active {
  background: rgba(255, 122, 26, 0.1);
  border-left: 3px solid var(--accent);
  padding-left: 13px;
}

.chat-conv-body {
  flex: 1;
  min-width: 0;
}

.chat-conv-name {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.chat-conv-preview {
  font-size: 0.82rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.chat-unread-pill {
  background: var(--accent);
  color: #12141a;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

.color-swatches {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.color-swatch-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.color-swatch-label {
  display: block;
  text-align: center;
  max-width: 72px;
  word-break: break-word;
}

.color-swatch-wrap input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.color-swatch {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: block;
  transition: border-color .15s, transform .15s;
}

.color-swatch-wrap input[type="radio"]:checked+.color-swatch {
  border-color: var(--accent);
  transform: scale(1.12);
}

.size-option-box {
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  display: block;
  transition: border-color .15s;
}

.size-option-box.selected,
.size-option-box:hover {
  border-color: var(--accent);
}

/* Star rating picker */
.star-picker {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 4px;
  font-size: 1.8rem;
}

.star-picker input[type="radio"] {
  display: none;
}

.star-picker label {
  color: var(--border);
  cursor: pointer;
  transition: color .15s;
}

.star-picker input[type="radio"]:checked~label,
.star-picker label:hover,
.star-picker label:hover~label {
  color: var(--accent);
}

/* Extra mobile & tablet responsiveness */


@media (max-width: 900px) {
  .product-detail {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 50px 16px;
  }

  .hero h1 {
    font-size: 1.9rem;
  }

  .container {
    padding: 0 16px;
  }

  .form-wrap {
    padding: 22px;
  }
}

@media (max-width: 600px) {
  .product-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .price {
    font-size: 1.4rem;
  }

  table {
    font-size: 0.85rem;
  }

  .whatsapp-float {
    width: 50px;
    height: 50px;
    bottom: 16px;
    right: 16px;
  }
}

@media (max-width: 400px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

.new-arrivals-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 14px;
}

.new-arrivals-grid>a {
  min-width: 0;
  overflow: hidden;
}

.new-arrivals-grid img {
  max-width: 100%;
}

@media (max-width: 900px) {
  .new-arrivals-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 600px) {
  .new-arrivals-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 400px) {
  .new-arrivals-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}


.person-menu-wrap {
  position: relative;
  display: inline-block;
}

.person-menu-btn {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.person-menu-btn:hover {
  border-color: var(--accent);
}

.person-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 900;
  opacity: 0;
  transition: opacity .2s;
}

.person-sidebar-overlay.open {
  display: block;
  opacity: 1;
}

.person-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 300px;
  max-width: 85vw;
  background: var(--card);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.4);
  z-index: 950;
  transform: translateX(100%);
  transition: transform .25s ease;
  display: flex;
  flex-direction: column;
}

.person-sidebar.open {
  transform: translateX(0);
}

.person-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  font-weight: 700;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
}

.person-sidebar-close {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.person-sidebar-close:hover {
  color: var(--accent);
}

.person-sidebar-links {
  display: flex;
  flex-direction: column;
}

.person-sidebar-links a {
  display: block;
  padding: 14px 20px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
}

.person-sidebar-links a:hover {
  background: var(--bg-alt);
  color: var(--accent);
}