:root {
  --bg: #fffaf4;
  --bg-soft: #fff2e6;
  --surface: #ffffff;
  --surface-alt: #fff8f0;
  --text: #2b1d16;
  --muted: #74665f;
  --border: rgba(64, 33, 15, 0.12);
  --primary: #b85c38;
  --primary-dark: #933d1d;
  --accent: #3f5f4c;
  --shadow: 0 22px 60px rgba(90, 50, 20, 0.12);
  --radius: 24px;
  --radius-sm: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(184, 92, 56, 0.14), transparent 32%),
    radial-gradient(circle at top right, rgba(63, 95, 76, 0.12), transparent 28%),
    linear-gradient(180deg, #fffdf9 0%, var(--bg) 100%);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  z-index: 30;
  backdrop-filter: blur(14px);
  background: rgba(255, 250, 244, 0.8);
  border-bottom: 1px solid rgba(64, 33, 15, 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-logo, .brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--primary), #f6b17a);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 800;
  box-shadow: var(--shadow);
}
.brand-text strong,
.admin-brand strong,
.hero h1,
.page-hero h1,
.section-heading h2,
.hero-card h2,
.product-detail-copy h1,
.login-card h1 {
  font-family: "Playfair Display", Georgia, serif;
  letter-spacing: -0.02em;
}
.brand-text {
  display: flex;
  flex-direction: column;
}
.brand-text small,
.nav a,
.section-heading span,
.eyebrow,
.small-note,
.product-meta,
.site-footer p,
.admin-brand span {
  color: var(--muted);
}
.product-detail {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: center;
}
.hero-copy,
.hero-card-inner,
.cta-banner,
.page-hero,
.section,
.catalog-section,
.form-card,
.panel-card,
.stat-card,
.table-wrap,
.login-card,
.detail-box,
.gallery-manager,
.admin-toolbar,
.empty-state,
.product-card,
.category-card {
  animation: fadeUp 0.5s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-copy {
  padding: 42px 0;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 700;
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.7rem);
  line-height: 0.95;
  margin: 16px 0;
  max-width: 12ch;
}
.hero p, .page-hero p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 58ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 700;
  transition: all 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #de865f);
  color: white;
  box-shadow: 0 16px 30px rgba(184, 92, 56, 0.25);
}
.btn-outline {
  border-color: rgba(43, 29, 22, 0.14);
  background: white;
}
.btn-sm {
  padding: 10px 16px;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}
.hero-stats div,
.stat-card {
  padding: 16px 18px;
  background: rgba(255,255,255,0.75);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.hero-stats strong,
.stat-card strong {
  display: block;
  font-size: 1.15rem;
  margin-bottom: 4px;
}
.hero-card {
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,248,240,0.92)),
    url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="120" height="120" viewBox="0 0 120 120"%3E%3Cg fill="none" fill-opacity=".08"%3E%3Cpath d="M0 0h120v120H0z"/%3E%3Ccircle cx="24" cy="24" r="18" fill="%23b85c38"/%3E%3Ccircle cx="96" cy="96" r="16" fill="%233f5f4c"/%3E%3C/g%3E%3C/svg%3E');
  border: 1px solid rgba(184, 92, 56, 0.12);
  box-shadow: var(--shadow);
  padding: 24px;
  min-height: 380px;
  display: flex;
  align-items: flex-end;
}
.hero-card-inner {
  background: rgba(255,255,255,0.86);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 26px;
  max-width: 360px;
}
.hero-card h2,
.page-hero h1,
.section-heading h2,
.product-detail-copy h1,
.login-card h1 {
  margin: 10px 0 14px;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.section,
.page-hero {
  padding: 24px 0;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 20px;
}
.section-heading span {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  font-weight: 700;
}
.grid {
  display: grid;
  gap: 18px;
}
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.category-card,
.product-card,
.panel-card {
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.category-card {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.category-card h3,
.product-card h3,
.panel-card h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}
.category-card span {
  color: var(--primary-dark);
  font-weight: 700;
}
.product-card {
  overflow: hidden;
  padding: 0;
}
.product-image {
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #fff, #f6ebdf);
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-placeholder {
  height: 100%;
  display: grid;
  place-items: center;
  color: rgba(43, 29, 22, 0.45);
  font-weight: 700;
  letter-spacing: 0.08em;
}
.image-placeholder.large { min-height: 520px; }
.product-body {
  padding: 18px;
}
.product-body p,
.panel-card p,
.detail-box li,
.cta-banner span,
.cta-banner h2,
.login-card p {
  color: var(--muted);
  line-height: 1.65;
}
.product-footer,
.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.price-row.big {
  margin: 12px 0 18px;
  font-size: 1.2rem;
}
.price-sale {
  color: var(--primary-dark);
  font-weight: 800;
}
.price-regular {
  color: var(--muted);
  text-decoration: line-through;
  margin-left: 8px;
}

.cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
  border-radius: 30px;
  background: linear-gradient(135deg, #2b1d16, #4b3226);
  color: white;
  box-shadow: var(--shadow);
}
.cta-banner h2, .cta-banner span { color: white; }

.empty-state {
  padding: 26px;
  border-radius: 20px;
  background: rgba(255,255,255,0.9);
  border: 1px dashed rgba(43, 29, 22, 0.18);
  color: var(--muted);
}

.whatsapp-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  padding: 14px 18px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, #21b45c, #128c7e);
  box-shadow: 0 18px 32px rgba(18, 140, 126, 0.28);
  font-weight: 800;
}

.site-footer {
  margin-top: 40px;
  padding: 28px 0 40px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid rgba(64, 33, 15, 0.1);
  padding-top: 24px;
}

.product-detail {
  align-items: start;
  margin-top: 30px;
}
.product-gallery {
  display: grid;
  gap: 14px;
}
.main-product-image {
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.thumb-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.thumb-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--border);
}
.product-detail-copy {
  padding: 12px 0;
}
.detail-box {
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
  margin: 18px 0 22px;
}
.detail-box ul {
  margin: 14px 0 0;
  padding-left: 18px;
}

.login-body,
.admin-body {
  background: linear-gradient(180deg, #fff8f0, #fffdfb);
}
.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: min(520px, 100%);
  background: rgba(255,255,255,0.94);
  border: 1px solid var(--border);
  border-radius: 30px;
  box-shadow: var(--shadow);
  padding: 32px;
}
.form-stack { display: grid; gap: 16px; }
.form-stack label,
.form-card label {
  display: grid;
  gap: 8px;
}
.form-stack input,
.form-card input,
.form-card textarea,
.form-card select {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(43, 29, 22, 0.14);
  padding: 14px 16px;
  font: inherit;
  background: white;
}
.form-card textarea { resize: vertical; }
.checkbox-field {
  display: flex !important;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
}
.checkbox-field input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.admin-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}
.admin-sidebar {
  padding: 24px;
  border-right: 1px solid rgba(64, 33, 15, 0.1);
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(10px);
}
.admin-brand {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, #2b1d16, #5a3928);
  color: white;
  margin-bottom: 18px;
}
.admin-nav {
  display: grid;
  gap: 8px;
}
.admin-nav a {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(43, 29, 22, 0.08);
}
.admin-main {
  padding: 28px;
}
.admin-topbar,
.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}
.admin-panel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.form-card {
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 22px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}
.full-width { grid-column: 1 / -1; }
.gallery-manager {
  margin: 8px 0 20px;
  background: rgba(255,255,255,0.88);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 20px;
}
.gallery-thumb {
  display: grid;
  gap: 8px;
}
.gallery-thumb img {
  border-radius: 16px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.image-preview-slot {
  margin-top: 10px;
  min-height: 150px;
  border: 1px dashed rgba(43, 29, 22, 0.16);
  border-radius: 18px;
  background: rgba(255, 248, 240, 0.8);
  overflow: hidden;
}
.image-preview-slot img {
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
}
.gallery-inputs {
  display: grid;
  gap: 14px;
  margin-top: 10px;
  margin-bottom: 12px;
}
.gallery-input-row {
  display: grid;
  gap: 10px;
}
.gallery-preview {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.95rem;
  padding: 14px;
}
.admin-image-placeholder {
  min-height: 64px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 242, 230, 0.7);
  color: var(--muted);
  font-size: 0.9rem;
  border: 1px dashed rgba(43, 29, 22, 0.14);
}
.field-label {
  display: inline-block;
  margin-bottom: 8px;
  font-weight: 700;
}
.table-wrap {
  overflow: auto;
  border-radius: 24px;
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 16px;
  border-bottom: 1px solid rgba(43, 29, 22, 0.08);
  text-align: left;
}
th {
  background: rgba(255, 242, 230, 0.8);
}
.action-links {
  display: flex;
  align-items: center;
  gap: 10px;
}
.action-links form {
  margin: 0;
}
.action-links button {
  border: 0;
  background: transparent;
  color: #b83232;
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.alert {
  padding: 14px 16px;
  border-radius: 16px;
  margin-bottom: 16px;
}
.alert-error {
  background: rgba(255, 86, 86, 0.1);
  color: #9f1d1d;
  border: 1px solid rgba(159, 29, 29, 0.15);
}
.alert-success {
  background: rgba(57, 160, 96, 0.1);
  color: #1f6b3f;
  border: 1px solid rgba(31, 107, 63, 0.15);
}

@media (max-width: 1024px) {
  .product-detail,
  .admin-shell,
  .grid-4,
  .grid-3,
  .stats-grid,
  .admin-panel-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .admin-sidebar { position: sticky; top: 0; z-index: 20; }
}

@media (max-width: 720px) {
  .header-inner,
  .section-heading,
  .cta-banner,
  .footer-inner,
  .admin-toolbar,
  .admin-topbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-stats,
  .thumb-grid {
    grid-template-columns: 1fr 1fr;
  }
  .container,
  .product-detail {
    width: min(100% - 24px, 1180px);
  }
  .product-card-row {
    grid-template-columns: 1fr;
    border-radius: 22px;
  }
  .product-card {
    border-radius: 22px;
    overflow: hidden;
    padding: 0;
    background: #ffffff;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .product-image,
  .product-image-row {
    aspect-ratio: auto;
    min-height: 320px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 52px 20px 28px;
  }
  .product-image img,
  .product-image-row img {
    object-fit: contain;
    max-height: 180px;
    width: 100%;
    height: auto;
    padding: 0;
  }
  .product-body,
  .product-body-row {
    padding: 12px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
  }
  .product-meta {
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    color: #6d7b72;
  }
  .product-body h3,
  .product-body-row h3 {
    font-size: 1.45rem;
    line-height: 1.16;
    margin: 8px 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .product-body p,
  .product-body-row p {
    -webkit-line-clamp: 2;
    margin-bottom: 10px;
    font-size: 0.98rem;
  }
  .product-footer {
    margin-top: auto;
  }
  .price-row {
    align-items: baseline;
    justify-content: flex-start;
    gap: 10px;
  }
  .product-image-row {
    min-height: 320px;
  }
  .product-footer .btn,
  .product-footer .btn-outline {
    display: none;
  }
}

.catalog-section {
  padding: 24px 0 12px;
}
.catalog-category {
  margin-bottom: 40px;
}
.section-heading-left {
  margin-bottom: 16px;
}
.catalog-product-list {
  display: grid;
  gap: 16px;
}
.product-card-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  padding: 0;
  overflow: hidden;
}
.product-card-image-link {
  display: block;
}
.product-image-row {
  aspect-ratio: 1 / 1;
  height: 100%;
}
.product-body-row {
  padding: 22px;
  align-self: center;
}
.product-body-row h3 {
  margin-top: 6px;
  margin-bottom: 8px;
}
.product-body-row p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70ch;
}
.thumb-button {
  padding: 0;
  border: 2px solid transparent;
  background: transparent;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
}
.thumb-button img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.thumb-button.is-active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(184, 92, 56, 0.14);
}
.main-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 520px;
}
.product-gallery {
  position: sticky;
  top: 18px;
}
