/* InfoGuille — Luxury Print Studio CSS */
/* Fonts: Playfair Display (headings) + DM Sans (body) */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Overridden by inline PHP variables from settings */
  --c-primary: #1a1a2e;
  --c-accent:  #f07820;
  --c-bg:      #f5f0e8;
  --c-surface: #ffffff;
  --c-text:    #1a1a2e;

  /* Derived */
  --c-primary-light: color-mix(in srgb, var(--c-primary) 80%, white);
  --c-accent-light:  color-mix(in srgb, var(--c-accent) 30%, white);
  --c-text-muted:    color-mix(in srgb, var(--c-text) 55%, white);
  --c-border:        color-mix(in srgb, var(--c-text) 12%, white);

  /* Spacing */
  --sp-xs: 0.25rem;
  --sp-sm: 0.5rem;
  --sp-md: 1rem;
  --sp-lg: 1.5rem;
  --sp-xl: 2.5rem;
  --sp-2xl: 4rem;

  /* Type */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --radius: 6px;
  --radius-lg: 12px;
  --shadow: 0 2px 16px rgba(26,26,46,.08);
  --shadow-md: 0 4px 32px rgba(26,26,46,.14);
  --shadow-lg: 0 8px 48px rgba(26,26,46,.18);
  --transition: 0.22s ease;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--c-text); background: var(--c-bg); font-size: 16px; line-height: 1.6; }

/* ===== LAYOUT ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--sp-lg); }
.container-sm { max-width: 760px; margin: 0 auto; padding: 0 var(--sp-lg); }
.container-lg { max-width: 1400px; margin: 0 auto; padding: 0 var(--sp-lg); }

/* ===== TYPOGRAPHY ===== */
h1,h2,h3,h4 { font-family: var(--font-display); line-height: 1.22; font-weight: 600; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); }
h4 { font-size: 1.1rem; }
p { margin-bottom: var(--sp-md); }
a { color: var(--c-accent); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.8; }

/* ===== HEADER ===== */
.site-header { position: sticky; top: 0; z-index: 100; }

.header-top {
  background: var(--c-primary);
  color: rgba(255,255,255,.65);
  font-size: 0.78rem;
  padding: 5px 0;
}
.header-top .container {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-lg);
}

.navbar {
  background: var(--c-surface);
  border-bottom: 2px solid var(--c-border);
  box-shadow: var(--shadow);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-xl);
  height: 70px;
}

.nav-logo { text-decoration: none; }
.logo-text {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--c-primary);
  letter-spacing: -0.5px;
}
.logo-text::after {
  content: '.';
  color: var(--c-accent);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--sp-md);
  margin-left: auto;
  align-items: center;
}
.nav-links a {
  color: var(--c-text);
  font-size: 0.9rem;
  font-weight: 500;
  padding: var(--sp-sm) var(--sp-md);
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}
.nav-links a:hover { background: var(--c-bg); color: var(--c-accent); opacity: 1; }

/* Dropdowns */
.has-dropdown { position: relative; }
.has-dropdown > a { display: flex; align-items: center; gap: 4px; }
.dropdown {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 100%;
  left: 0;
  padding-top: 10px; /* bridge gap so mouse doesn't lose hover */
  background: transparent;
  z-index: 200;
  /* hide delay 200ms, show instantly */
  transition: opacity 0.15s ease, visibility 0s linear 0.2s;
}
.dropdown-right { left: auto; right: 0; }
/* Inner box */
.dropdown::before {
  content: '';
  display: block;
}
.dropdown > li,
.dropdown .divider {
  background: var(--c-surface);
}
.dropdown > li:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.dropdown > li:last-child  { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
/* Wrap inner items in a box */
.has-dropdown .dropdown {
  border: 1px solid var(--c-border);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-md);
  min-width: 200px;
  overflow: hidden;
  padding-top: 0;
  margin-top: 0;
  top: calc(100% + 0px);
  background: var(--c-surface);
}
/* Hover bridge via pseudo-element above dropdown */
.has-dropdown::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  right: 0;
  height: 10px;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  visibility: visible;
  opacity: 1;
  pointer-events: all;
  transition: opacity 0.15s ease, visibility 0s linear 0s;
}
.has-dropdown .dropdown { list-style: none; }
.dropdown li a, .dropdown li button {
  display: block;
  padding: 10px 18px;
  color: var(--c-text);
  font-size: 0.88rem;
  transition: background var(--transition);
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
}
.dropdown li a:hover, .dropdown li button:hover {
  background: var(--c-bg);
  color: var(--c-accent);
  opacity: 1;
}
.dropdown .divider { height: 1px; background: var(--c-border); margin: 4px 0; }

.nav-actions { display: flex; align-items: center; gap: var(--sp-sm); margin-left: var(--sp-md); }
.nav-cart { position: relative; color: var(--c-text); padding: var(--sp-sm); }
.nav-cart:hover { color: var(--c-accent); opacity: 1; }
.cart-badge {
  position: absolute;
  top: 0; right: 0;
  background: var(--c-accent);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.user-btn {
  background: none; border: none; font-family: var(--font-body);
  font-size: 0.9rem; cursor: pointer; color: var(--c-text);
  font-weight: 500; padding: var(--sp-sm) var(--sp-md);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-sm);
  margin-left: auto;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--c-text); transition: var(--transition); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  padding: 11px 24px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--c-primary); color: white; }
.btn-primary:hover { background: color-mix(in srgb, var(--c-primary) 85%, black); opacity: 1; color: white; }
.btn-accent { background: var(--c-accent); color: white; }
.btn-accent:hover { background: color-mix(in srgb, var(--c-accent) 85%, black); opacity: 1; color: white; }
.btn-outline { border-color: var(--c-primary); color: var(--c-primary); background: transparent; }
.btn-outline:hover { background: var(--c-primary); color: white; opacity: 1; }
.btn-ghost { background: transparent; color: var(--c-text); border-color: var(--c-border); }
.btn-ghost:hover { background: var(--c-bg); opacity: 1; }
.btn-sm { padding: 7px 16px; font-size: 0.82rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== FLASH MESSAGES ===== */
.flash-container { position: fixed; top: 80px; right: 20px; z-index: 999; display: flex; flex-direction: column; gap: var(--sp-sm); max-width: 380px; }
.flash {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-sm);
  padding: var(--sp-md) var(--sp-lg);
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  box-shadow: var(--shadow-md);
  animation: slideIn 0.3s ease;
}
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } }
.flash-success { background: #d1fae5; color: #065f46; border-left: 4px solid #10b981; }
.flash-error   { background: #fee2e2; color: #991b1b; border-left: 4px solid #ef4444; }
.flash-info    { background: #dbeafe; color: #1e40af; border-left: 4px solid #3b82f6; }
.flash-warning { background: #fef9c3; color: #854d0e; border-left: 4px solid #eab308; }
.flash-close { background: none; border: none; cursor: pointer; font-size: 1.1rem; line-height: 1; opacity: 0.6; }
.flash-close:hover { opacity: 1; }

/* ===== HERO ===== */
.hero {
  background: var(--c-primary);
  color: white;
  padding: var(--sp-2xl) 0;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 50%, color-mix(in srgb, var(--c-accent) 25%, transparent) 0%, transparent 60%);
  pointer-events: none;
}
.hero-content { position: relative; max-width: 620px; }
.hero-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: var(--sp-md);
}
.hero h1 { color: white; margin-bottom: var(--sp-lg); }
.hero p { color: rgba(255,255,255,.75); font-size: 1.1rem; margin-bottom: var(--sp-xl); }
.hero-actions { display: flex; gap: var(--sp-md); flex-wrap: wrap; }
.hero-decoration {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 45%;
  background: linear-gradient(135deg, transparent 30%, color-mix(in srgb, var(--c-accent) 15%, transparent));
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hero-grid-pattern {
  width: 100%; height: 100%;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 30px 30px;
}

/* ===== SECTION ===== */
.section { padding: var(--sp-2xl) 0; }
.section-sm { padding: var(--sp-xl) 0; }
.section-title { text-align: center; margin-bottom: var(--sp-xl); }
.section-title h2 { margin-bottom: var(--sp-sm); }
.section-title p { color: var(--c-text-muted); max-width: 560px; margin: 0 auto; }
.section-alt { background: var(--c-surface); }

/* ===== PRODUCT GRID ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--sp-lg);
}
.product-card {
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.product-card-image {
  aspect-ratio: 4/3;
  overflow: hidden;
  position: relative;
  background: var(--c-bg);
}
.product-card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-card-image img { transform: scale(1.05); }
.product-badge {
  position: absolute;
  top: var(--sp-sm); left: var(--sp-sm);
  background: var(--c-accent);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.product-card-body { padding: var(--sp-md); flex: 1; display: flex; flex-direction: column; }
.product-card-category { font-size: 0.75rem; color: var(--c-text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.product-card-title { font-family: var(--font-display); font-size: 1rem; font-weight: 600; color: var(--c-text); margin-bottom: var(--sp-sm); }
.product-card-price { font-size: 1.15rem; font-weight: 700; color: var(--c-accent); margin-top: auto; margin-bottom: var(--sp-sm); }
.product-card-actions { display: flex; gap: var(--sp-sm); margin-top: var(--sp-sm); }

/* ===== FORMS ===== */
.form-group { margin-bottom: var(--sp-lg); }
.form-label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 6px; color: var(--c-text); }
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--c-text);
  background: var(--c-surface);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-accent) 20%, transparent);
}
.form-control.error { border-color: #ef4444; }
.form-hint { font-size: 0.78rem; color: var(--c-text-muted); margin-top: 4px; }
.form-error { font-size: 0.78rem; color: #dc2626; margin-top: 4px; }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-lg); }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-md); }

/* ===== CARDS ===== */
.card {
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  padding: var(--sp-lg);
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; }
.card-body { padding: var(--sp-lg); }
.card-footer { padding: var(--sp-lg); border-top: 1px solid var(--c-border); }

/* ===== TABLE ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th {
  background: var(--c-bg);
  padding: 12px 16px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--c-text-muted);
  border-bottom: 2px solid var(--c-border);
}
td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: color-mix(in srgb, var(--c-bg) 50%, transparent); }

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-primary   { background: color-mix(in srgb, var(--c-primary) 12%, white); color: var(--c-primary); }
.badge-accent    { background: color-mix(in srgb, var(--c-accent) 15%, white);  color: color-mix(in srgb, var(--c-accent) 70%, black); }
.badge-success   { background: #d1fae5; color: #065f46; }
.badge-warning   { background: #fef9c3; color: #854d0e; }
.badge-danger    { background: #fee2e2; color: #991b1b; }
.badge-info      { background: #dbeafe; color: #1e40af; }
.badge-secondary { background: #f1f5f9; color: #64748b; }

/* ===== CALCULATOR ===== */
.calc-wrapper {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--sp-xl);
  align-items: start;
}
.calc-form { background: var(--c-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.calc-result {
  background: var(--c-primary);
  color: white;
  border-radius: var(--radius-lg);
  padding: var(--sp-xl);
  position: sticky;
  top: 90px;
}
.calc-result h3 { color: white; font-size: 1.2rem; margin-bottom: var(--sp-lg); }
.calc-price-main {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--c-accent);
  line-height: 1;
  margin-bottom: var(--sp-sm);
}
.calc-price-label { font-size: 0.85rem; opacity: 0.7; margin-bottom: var(--sp-xl); }
.calc-breakdown { list-style: none; margin-bottom: var(--sp-xl); }
.calc-breakdown li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.1);
  font-size: 0.88rem;
}
.calc-breakdown li:last-child { border-bottom: none; }
.calc-breakdown .total {
  font-weight: 700;
  font-size: 1rem;
  color: var(--c-accent);
  border-top: 2px solid rgba(255,255,255,.2);
  padding-top: 12px;
  margin-top: 4px;
}
.material-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--sp-sm);
}
.material-option {
  position: relative;
}
.material-option input[type=radio] { position: absolute; opacity: 0; }
.material-label {
  display: block;
  padding: var(--sp-md);
  border: 2px solid var(--c-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.88rem;
}
.material-label:hover { border-color: var(--c-accent); }
.material-option input:checked + .material-label {
  border-color: var(--c-accent);
  background: color-mix(in srgb, var(--c-accent) 8%, white);
}
.material-name { font-weight: 600; display: block; margin-bottom: 2px; }
.material-price { color: var(--c-accent); font-weight: 700; font-size: 0.9rem; }

/* Dimension inputs */
.dim-inputs { display: flex; gap: var(--sp-md); align-items: center; }
.dim-inputs .form-control { text-align: center; font-size: 1.1rem; font-weight: 600; }
.dim-sep { font-size: 1.5rem; color: var(--c-text-muted); }

/* ===== CART ===== */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: var(--sp-xl); align-items: start; }
.cart-item {
  display: flex;
  gap: var(--sp-md);
  padding: var(--sp-lg);
  border-bottom: 1px solid var(--c-border);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-img { width: 80px; height: 80px; border-radius: var(--radius); overflow: hidden; flex-shrink: 0; background: var(--c-bg); }
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 600; margin-bottom: 4px; }
.cart-item-meta { font-size: 0.8rem; color: var(--c-text-muted); }
.cart-item-price { font-weight: 700; color: var(--c-accent); font-size: 1.05rem; }
.qty-control { display: flex; align-items: center; gap: var(--sp-sm); margin-top: var(--sp-sm); }
.qty-btn {
  width: 30px; height: 30px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius);
  background: none;
  cursor: pointer;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.qty-btn:hover { border-color: var(--c-accent); color: var(--c-accent); }
.qty-display { min-width: 36px; text-align: center; font-weight: 600; }

.order-summary { background: var(--c-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: var(--sp-xl); position: sticky; top: 90px; }
.order-summary h3 { font-family: var(--font-display); margin-bottom: var(--sp-lg); }
.summary-line { display: flex; justify-content: space-between; margin-bottom: var(--sp-sm); font-size: 0.9rem; }
.summary-total { font-weight: 700; font-size: 1.15rem; border-top: 2px solid var(--c-border); padding-top: var(--sp-sm); margin-top: var(--sp-sm); }

/* ===== ADMIN ===== */
.admin-layout { display: block; min-height: 100vh; background: #f8fafc; }
.admin-sidebar {
  background: var(--c-primary);
  color: rgba(255,255,255,.85);
  padding: 0;
  position: fixed;
  width: 260px;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.admin-sidebar-logo {
  padding: var(--sp-xl) var(--sp-lg);
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.admin-sidebar-logo span {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: white;
}
.admin-nav { flex: 1; padding: var(--sp-md) 0; }
.admin-nav-section {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,.4);
  padding: var(--sp-md) var(--sp-lg) var(--sp-sm);
}
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px var(--sp-lg);
  color: rgba(255,255,255,.75);
  font-size: 0.9rem;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}
.admin-nav a:hover, .admin-nav a.active {
  background: rgba(255,255,255,.08);
  color: white;
  border-left-color: var(--c-accent);
  opacity: 1;
}
.admin-nav a svg { width: 17px; height: 17px; flex-shrink: 0; opacity: 0.75; }
.admin-content { margin-left: 260px; padding: var(--sp-xl); min-height: 100vh; }
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-xl);
  padding-bottom: var(--sp-lg);
  border-bottom: 1px solid #e2e8f0;
}
.admin-page-title { font-family: var(--font-display); font-size: 1.6rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--sp-lg); margin-bottom: var(--sp-xl); }
.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--sp-lg);
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
  display: flex;
  align-items: flex-start;
  gap: var(--sp-md);
  border-left: 4px solid var(--c-accent);
}
.stat-icon {
  width: 48px; height: 48px;
  background: color-mix(in srgb, var(--c-accent) 12%, white);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--c-accent);
}
.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.stat-label { font-size: 0.82rem; color: #64748b; margin-top: 2px; }
.stat-change { font-size: 0.78rem; margin-top: 4px; }
.stat-change.up { color: #10b981; }
.stat-change.down { color: #ef4444; }

/* ===== ADMIN COLOR PICKER ===== */
.color-scheme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--sp-md);
}
.color-preset {
  border: 3px solid transparent;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
}
.color-preset:hover, .color-preset.active { border-color: var(--c-accent); }
.color-preview {
  height: 60px;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.color-preset-name { text-align: center; font-size: 0.75rem; font-weight: 600; padding: 6px; }

/* ===== PHOTO UPLOAD ===== */
.photo-upload-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-md);
}
.photo-slot {
  aspect-ratio: 1;
  border: 2px dashed var(--c-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: border-color var(--transition);
}
.photo-slot:hover { border-color: var(--c-accent); }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-slot-empty { text-align: center; color: var(--c-text-muted); font-size: 0.8rem; }
.photo-slot-empty svg { display: block; margin: 0 auto var(--sp-sm); }

/* ===== PAGINATION ===== */
.pagination { display: flex; gap: var(--sp-sm); align-items: center; justify-content: center; margin-top: var(--sp-xl); }
.pagination a, .pagination span {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  border: 1.5px solid var(--c-border);
  color: var(--c-text);
  transition: all var(--transition);
}
.pagination a:hover { border-color: var(--c-accent); color: var(--c-accent); opacity: 1; }
.pagination .active { background: var(--c-accent); border-color: var(--c-accent); color: white; }

/* ===== FOOTER ===== */
.site-footer { background: var(--c-primary); color: rgba(255,255,255,.8); }
.footer-main { padding: var(--sp-2xl) 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: var(--sp-2xl);
}
.footer-logo { font-family: var(--font-display); font-size: 1.5rem; color: white; margin-bottom: var(--sp-md); font-weight: 700; }
.footer-brand p { font-size: 0.88rem; opacity: 0.7; margin-bottom: var(--sp-lg); }
.footer-social { display: flex; gap: var(--sp-md); }
.footer-social a { color: rgba(255,255,255,.6); transition: color var(--transition); }
.footer-social a:hover { color: var(--c-accent); opacity: 1; }
.footer-col h4 { color: white; font-size: 0.88rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: var(--sp-lg); }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: var(--sp-sm); }
.footer-col ul li a { color: rgba(255,255,255,.65); font-size: 0.88rem; transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--c-accent); opacity: 1; }
.footer-contact li { font-size: 0.88rem; margin-bottom: 10px; }
.footer-payments { margin-top: var(--sp-lg); font-size: 0.82rem; opacity: 0.7; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: var(--sp-lg) 0;
  font-size: 0.82rem;
  opacity: 0.6;
}
.footer-bottom .container { display: flex; justify-content: space-between; align-items: center; }
.footer-links { display: flex; gap: var(--sp-lg); }
.footer-links a { color: inherit; }

/* ===== AUTH PAGES ===== */
.auth-page { min-height: calc(100vh - 80px); display: flex; align-items: center; padding: var(--sp-2xl) 0; background: var(--c-bg); }
.auth-card { max-width: 440px; margin: 0 auto; background: var(--c-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: var(--sp-2xl); }
.auth-logo { text-align: center; margin-bottom: var(--sp-xl); }
.auth-title { font-family: var(--font-display); font-size: 1.8rem; text-align: center; margin-bottom: var(--sp-sm); }
.auth-subtitle { text-align: center; color: var(--c-text-muted); font-size: 0.9rem; margin-bottom: var(--sp-xl); }
.auth-divider { text-align: center; color: var(--c-text-muted); font-size: 0.85rem; margin: var(--sp-lg) 0; position: relative; }
.auth-divider::before, .auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 30px);
  height: 1px;
  background: var(--c-border);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

/* ===== LOG VIEWER ===== */
.log-entry {
  display: grid;
  grid-template-columns: 130px 80px 1fr auto;
  gap: var(--sp-md);
  padding: 10px var(--sp-lg);
  border-bottom: 1px solid var(--c-border);
  align-items: start;
  font-size: 0.85rem;
}
.log-entry:hover { background: var(--c-bg); }
.log-time { color: var(--c-text-muted); font-family: monospace; font-size: 0.78rem; }
.log-message { font-family: monospace; font-size: 0.82rem; word-break: break-word; }
.log-type-error { border-left: 3px solid #ef4444; }
.log-type-warning { border-left: 3px solid #eab308; }
.log-type-info { border-left: 3px solid #3b82f6; }
.log-type-payment { border-left: 3px solid #10b981; }
.log-type-auth { border-left: 3px solid #8b5cf6; }
.log-type-order { border-left: 3px solid var(--c-accent); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .calc-wrapper { grid-template-columns: 1fr; }
  .calc-result { position: static; }
  .cart-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-xl); }
}

@media (max-width: 768px) {
  .nav-links, .nav-actions .btn { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open { display: flex; flex-direction: column; position: fixed; top: 115px; left: 0; right: 0; background: var(--c-surface); border-top: 1px solid var(--c-border); padding: var(--sp-md); box-shadow: var(--shadow-md); z-index: 99; }
  .nav-actions { gap: var(--sp-xs); }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; }
  .admin-sidebar { position: relative; width: 100%; height: auto; }
  .admin-content { margin-left: 0; }
  .photo-upload-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--sp-md); }
  .hero { padding: var(--sp-xl) 0; }
  .auth-card { padding: var(--sp-xl) var(--sp-lg); }
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--c-text-muted); }
.text-accent { color: var(--c-accent); }
.text-small { font-size: 0.85rem; }
.text-xl { font-size: 1.15rem; }
.fw-bold { font-weight: 700; }
.mb-0 { margin-bottom: 0 !important; }
.mb-sm { margin-bottom: var(--sp-sm); }
.mb-md { margin-bottom: var(--sp-md); }
.mb-lg { margin-bottom: var(--sp-lg); }
.mb-xl { margin-bottom: var(--sp-xl); }
.mt-auto { margin-top: auto; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--sp-sm); }
.gap-md { gap: var(--sp-md); }
.hidden { display: none; }
.w-full { width: 100%; }
.divider { height: 1px; background: var(--c-border); margin: var(--sp-lg) 0; }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.4s ease forwards; }

/* ===== SCROLL REVEAL ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ===== WHATSAPP FLOTANTE ===== */
#wa-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 58px;
  height: 58px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,.45);
  z-index: 900;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
}
#wa-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37,211,102,.6);
  opacity: 1;
}
#wa-float::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(37,211,102,.2);
  animation: wa-pulse 2s ease-out infinite;
}
@keyframes wa-pulse {
  0%   { transform: scale(1); opacity: .7; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* Header top flex fix */
.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-lg);
}
