/* =========================================================
   Pyrography Zuzka — Custom CSS (Light Theme)
   ========================================================= */


@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,900;1,400;1,600&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* ── CSS Custom Properties ────────────────────────────── */
:root {
  --pyro-beige:    #DEC5A2;
  --pyro-dark:     #3C200D;
  --pyro-brown:    #B07948;
  --pyro-black:    #1A0A02;

  --bg-page:       #FAF7F3;
  --bg-surface:    #FFFFFF;
  --bg-subtle:     #F3EBE0;
  --bg-muted:      #EDE0CF;

  --text-primary:  #1A0A02;
  --text-secondary:#3C200D;
  --text-muted:    rgba(60, 32, 13, 0.75);
  --border:        rgba(176, 121, 72, 0.2);
  --border-strong: rgba(176, 121, 72, 0.4);

  --transition:    all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; touch-action: manipulation; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-page);
  color: var(--text-primary);
  overflow-x: hidden;
  max-width: 100%;
  -webkit-font-smoothing: antialiased;
}

/* ── Custom Scrollbar ─────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-subtle); }
::-webkit-scrollbar-thumb { background: var(--pyro-brown); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--pyro-dark); }

/* ── Typography helpers ───────────────────────────────── */
.font-display { font-family: 'Playfair Display', serif; }
.font-accent  { font-family: 'Cormorant Garamond', serif; }
.font-body    { font-family: 'Inter', sans-serif; }

/* ── Grain Texture ────────────────────────────────────── */
.grain::before {
  content: '';
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.025;
  z-index: 9999;
}

/* ── Glass (light variant) ────────────────────────────── */
.glass {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(176, 121, 72, 0.18);
}

.glass-dark {
  background: rgba(250, 247, 243, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(176, 121, 72, 0.2);
}

/* ── Gradients ────────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, #3C200D 0%, #B07948 50%, #3C200D 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Navigation ───────────────────────────────────────── */
#navbar {
  background: #ffffff !important;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 20px rgba(60, 32, 13, 0.06);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
  transform: translateZ(0);
  will-change: transform;
}

#navbar.scrolled {
  background: #ffffff !important;
  border-bottom: 1px solid var(--border-strong);
  box-shadow: 0 4px 30px rgba(60, 32, 13, 0.1);
}

.nav-link {
  position: relative;
  color: #1A0A02;
  transition: color 0.3s ease;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--pyro-brown);
  transition: width 0.3s ease;
}

.nav-link:hover { color: #1A0A02; }
.nav-link:hover::after { width: 100%; }

/* ── Hero ─────────────────────────────────────────────── */
.hero-bg {
  background:
    radial-gradient(ellipse 70% 60% at 65% 40%, rgba(176,121,72,0.12) 0%, transparent 65%),
    radial-gradient(ellipse 50% 70% at 20% 70%, rgba(222,197,162,0.18) 0%, transparent 55%),
    var(--bg-page);
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}

.profile-ring {
  position: relative;
  display: inline-block;
}

.profile-ring::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pyro-brown), var(--pyro-beige), var(--pyro-dark), var(--pyro-brown));
  background-size: 300% 300%;
  animation: rotateGradient 4s linear infinite;
  z-index: -1;
}

.profile-ring::after {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px solid rgba(176, 121, 72, 0.3);
  animation: pulse-ring 3s ease-in-out infinite;
}

@keyframes rotateGradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes pulse-ring {
  0%, 100% { transform: scale(1);    opacity: 0.4; }
  50%       { transform: scale(1.05); opacity: 0.9; }
}

/* ── Buttons ──────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: linear-gradient(135deg, #3C200D 0%, #7A3E1A 100%);
  color: #FAF7F3;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease, box-shadow 0.3s ease, gap 0.3s ease, transform 0.3s ease;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2A1005 0%, #5C2E10 100%);
  box-shadow: 0 8px 28px rgba(60, 32, 13, 0.45), inset 0 0 0 1px rgba(222, 197, 162, 0.12);
  transform: translateY(-2px);
}

.btn-primary > * { position: relative; z-index: 1; }
.btn-primary span { position: relative; z-index: 1; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: transparent;
  color: var(--pyro-dark);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1.5px solid var(--pyro-dark);
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, gap 0.3s ease;
  text-decoration: none;
}

.btn-outline:hover {
  background: rgba(176,121,72,0.08);
  border-color: #B07948;
  color: #B07948;
}

/* ── Section Labels ───────────────────────────────────── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pyro-brown);
  margin-bottom: 1.25rem;
}

.section-label::before,
.section-label::after {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--pyro-brown);
}

.section-label--clean::before,
.section-label--clean::after {
  display: none;
}

/* ── About ────────────────────────────────────────────── */
.about-bg {
  background: var(--bg-subtle);
  position: relative;
}

.about-bg::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--pyro-brown), transparent);
}

.stat-card {
  text-align: center;
  padding: 1.5rem;
  border-radius: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--pyro-brown);
  box-shadow: 0 8px 30px rgba(60, 32, 13, 0.08);
  transform: translateY(-4px);
}

.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 9vw, 4rem);
  font-weight: 700;
  color: var(--pyro-dark);
  line-height: 1;
}

/* ── Shop & Products ──────────────────────────────────── */
.shop-bg {
  background: var(--bg-page);
}

.product-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

.product-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(60, 32, 13, 0.12), 0 0 0 1px rgba(176,121,72,0.2);
}

.product-image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
}

.product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-image-wrap img {
  transform: scale(1.08);
}

.product-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28,14,4,0.85) 0%, rgba(28,14,4,0.2) 40%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1.5rem;
}

.product-card:hover .product-overlay { opacity: 1; }

.category-badge {
  position: absolute;
  top: 1rem; left: 1rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #FAF7F3;
  background: rgba(60, 32, 13, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(222, 197, 162, 0.25);
  border-radius: 2px;
}

/* ── Cart ─────────────────────────────────────────────── */
.cart-panel {
  position: fixed;
  top: 0; right: 0;
  width: 420px;
  max-width: 100vw;
  height: 100vh;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 40px rgba(60, 32, 13, 0.1);
  z-index: 1000;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.cart-panel.open { transform: translateX(0); }

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(60, 32, 13, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.cart-overlay.open { opacity: 1; pointer-events: all; }

.cart-item {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.cart-item-img {
  width: 72px;
  height: 90px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

.qty-btn {
  width: 28px; height: 28px;
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.qty-btn:hover { background: var(--bg-subtle); border-color: var(--pyro-brown); }

/* Floating cart button */
.cart-float {
  position: fixed;
  bottom: 2rem; right: 2rem;
  width: 58px; height: 58px;
  background: linear-gradient(135deg, var(--pyro-dark), var(--pyro-brown));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  box-shadow: 0 8px 30px rgba(60, 32, 13, 0.35);
  transition: var(--transition);
  border: none;
}

.cart-float:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 40px rgba(60, 32, 13, 0.5);
}

.cart-badge {
  position: absolute;
  top: -4px; right: -4px;
  width: 22px; height: 22px;
  background: var(--pyro-beige);
  color: var(--pyro-dark);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Filter tabs */
.filter-tab {
  padding: 0.5rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-surface);
}

.filter-tab:hover {
  background: rgba(176,121,72,0.1);
  border-color: rgba(176,121,72,0.5);
  color: #3C200D;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(176,121,72,0.15);
}

.filter-tab.active {
  background: linear-gradient(135deg, var(--pyro-dark), var(--pyro-brown));
  border-color: var(--pyro-brown);
  color: #FAF7F3;
}

/* ── Contact ──────────────────────────────────────────── */
.contact-bg {
  background:
    radial-gradient(ellipse 60% 50% at 20% 80%, rgba(222,197,162,0.25) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 80% 20%, rgba(176,121,72,0.1) 0%, transparent 50%),
    var(--bg-subtle);
}

.contact-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.875rem 1.25rem;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
  appearance: none;
  -webkit-appearance: none;
}

select.contact-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23B07948' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.25rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.contact-input::placeholder { color: var(--text-muted); }

.contact-input:focus {
  border-color: var(--pyro-brown);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px rgba(176, 121, 72, 0.12);
}

.contact-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--pyro-brown);
  margin-bottom: 0.5rem;
}

/* ── Footer ───────────────────────────────────────────── */
.footer-bg {
  background: var(--bg-muted);
  border-top: 1px solid var(--border);
}

/* ── Animations ───────────────────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33%       { transform: translateY(-12px) rotate(2deg); }
  66%       { transform: translateY(-6px) rotate(-1deg); }
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50%       { opacity: 0.7; transform: scale(1.15); }
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%       { transform: translateY(8px); opacity: 0.4; }
}

.animate-float   { animation: float 7s ease-in-out infinite; will-change: transform; transform: translateZ(0); }
.animate-float-2 { animation: float 9s ease-in-out infinite 1.5s; will-change: transform; transform: translateZ(0); }
.animate-float-3 { animation: float 6s ease-in-out infinite 3s; will-change: transform; transform: translateZ(0); }
.animate-scroll  { animation: scroll-bounce 2s ease-in-out infinite; will-change: transform; }
.animate-glow    { animation: glow-pulse 3s ease-in-out infinite; will-change: opacity, transform; }

/* ── Decorative Lines ─────────────────────────────────── */
.divider {
  width: 60px; height: 2px;
  background: linear-gradient(90deg, var(--pyro-dark), var(--pyro-brown));
  margin: 1.25rem 0;
}

.divider-center { margin-left: auto; margin-right: auto; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
  .cart-panel { width: 100vw; }
  .section-label { font-size: 0.65rem; }
  .stat-card { padding: 1rem 0.5rem; overflow: hidden; }
  .stat-card .text-xs { font-size: 0.65rem; letter-spacing: 0.08em; }
  .stat-number { font-size: clamp(1.4rem, 6.5vw, 4rem); }
}

/* ── Alpine cloak ─────────────────────────────────────── */
[x-cloak] { display: none !important; }

/* ── Product modal ────────────────────────────────────── */
.product-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(60, 32, 13, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.product-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

/* ── Toast ────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 6.5rem; right: 2rem;
  z-index: 2000;
  padding: 0.875rem 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--pyro-brown);
  border-radius: 3px;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 8px 30px rgba(60, 32, 13, 0.15);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show { transform: translateY(0); opacity: 1; }
