:root {
  --bg: #F5EFE6;
  --white: #FFFFFF;
  --black: #1C1C1C;
  --yellow: #F7E396;
  --muted: #6E6A63;
  --border: #E6DDD0;
  --radius: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--black);
  line-height: 1.5;
}
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 14px; }

.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 239, 230, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 70px; gap: 16px;
}
.logo { text-decoration: none; color: var(--black); display: flex; flex-direction: column; }
.logo-title { font-family: 'Playfair Display', serif; font-weight: 600; font-size: 20px; letter-spacing: 0.04em; }
.logo-sub { font-size: 11px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.nav { display: flex; gap: 22px; }
.nav a { text-decoration: none; color: var(--black); font-size: 14px; font-weight: 500; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 999px; border: none;
  font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none;
  transition: transform .15s ease, opacity .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-dark { background: var(--black); color: var(--white); }
.btn-yellow { background: var(--yellow); color: var(--black); }
.btn-outline { background: transparent; border: 1px solid var(--black); color: var(--black); }
.btn-sm { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--white); cursor: pointer; font-size: 13px; }

.hero {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px;
  align-items: center; padding: 64px 20px;
}
.badge {
  display: inline-block; background: var(--yellow); color: var(--black);
  padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 600; margin-bottom: 16px;
}
.hero h1 { font-family: 'Playfair Display', serif; font-size: 42px; line-height: 1.15; margin-bottom: 16px; }
.lead { color: var(--muted); font-size: 16px; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.stopmotion-box {
  background: var(--white); border-radius: var(--radius); padding: 24px;
  border: 1px solid var(--border); box-shadow: 0 12px 32px rgba(28,28,28,0.06);
}
.sm-progress { height: 4px; background: var(--bg); border-radius: 4px; overflow: hidden; margin-bottom: 20px; }
.sm-bar { height: 100%; width: 0%; background: var(--yellow); transition: width 3s linear; }
.sm-stage { height: 300px; display: flex; align-items: center; justify-content: center; }
.sm-card {
  width: 210px; height: 270px; background: var(--white);
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
  display: flex; flex-direction: column; transition: transform .25s steps(3);
}
.sm-photo {
  flex: 1; background: url('https://images.unsplash.com/photo-1516483638261-f4dbaf036963?w=600') center/cover;
}
.sm-card.style-no_border { padding: 0; transform: rotate(-2deg); }
.sm-card.style-with_border { padding: 12px; transform: rotate(2deg); }
.sm-card.style-polaroid { padding: 12px 12px 36px 12px; transform: rotate(-1.5deg); }
.sm-card.style-box { padding: 14px; border: 6px solid #D8C3A5; transform: rotate(1.5deg); }
.sm-caption { font-family: 'Caveat', cursive; text-align: center; font-size: 20px; padding-top: 6px; min-height: 24px; }
.sm-controls { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.sm-label { font-weight: 600; font-size: 14px; }

.section { padding: 56px 20px; }
.section-title { font-family: 'Playfair Display', serif; font-size: 32px; margin-bottom: 8px; }
.section-sub { color: var(--muted); margin-bottom: 28px; }
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }

.tryon-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.tryon-preview-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.preview-frame {
  background: var(--white); box-shadow: 0 14px 36px rgba(0,0,0,0.12);
  display: flex; flex-direction: column; overflow: hidden; transition: all .25s ease;
}
.preview-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview-frame.fmt-7x10 { width: 240px; height: 340px; }
.preview-frame.fmt-10x15 { width: 250px; height: 375px; }
.preview-frame.fmt-5x7 { width: 200px; height: 280px; }
.preview-frame.style-no_border { padding: 0; } .preview-frame.style-no_border .polaroid-caption, .preview-frame.style-with_border .polaroid-caption { display: none; }
.preview-frame.style-with_border { padding: 14px; }
.preview-frame.style-polaroid { padding: 14px 14px 48px 14px; }
.polaroid-caption { font-family: 'Caveat', cursive; font-size: 24px; text-align: center; margin-top: 8px; }
.warn-pill { background: var(--yellow); padding: 8px 14px; border-radius: 10px; font-size: 13px; }

.upload-btn {
  display: block; text-align: center; padding: 14px; border: 1.5px dashed var(--black);
  border-radius: 12px; cursor: pointer; font-weight: 600; margin-bottom: 20px;
}
.control-group { margin-bottom: 18px; }
.label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg); cursor: pointer; font-size: 13px; font-weight: 500;
}
.pill.active { background: var(--black); color: var(--white); border-color: var(--black); }
.input {
  width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--border);
  font-size: 14px; background: var(--bg);
}
.paper-note { font-size: 13px; color: var(--muted); padding-top: 12px; border-top: 1px solid var(--border); }

.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.product-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 12px;
}
.product-tag { font-size: 12px; background: var(--yellow); padding: 3px 10px; border-radius: 999px; width: fit-content; font-weight: 600; }
.product-price { font-size: 20px; font-weight: 700; }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(28,28,28,0.55); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal-window {
  background: var(--white); border-radius: var(--radius); width: 100%; max-width: 720px;
  max-height: 90vh; overflow-y: auto; padding: 28px; position: relative;
}
.footer { border-top: 1px solid var(--border); padding: 40px 20px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }

@media (max-width: 780px) {
  .hero, .tryon-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  header > div { flex-wrap: wrap; gap: 8px; } .nav { display: flex; gap: 8px; order: 3; width: 100%; justify-content: flex-end; } .nav a:not([href="#account"]):not(#adminNavBtn) { display: none; } .nav a[href="#account"], .nav #adminNavBtn { padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(0,0,0,0.18); background: #fff; font-size: 14px; font-weight: 500; text-decoration: none; }
}

.sm-card:not(.style-polaroid) .sm-caption { display: none; }

.mob-icon { display: none; }
@media (max-width: 760px) {
  .desk-text { display: none; }
  .mob-icon { display: block; }
  header > div { flex-wrap: nowrap !important; align-items: center; gap: 8px; }
  .nav { display: flex !important; align-items: center; gap: 8px; order: 0 !important; width: auto !important; margin-left: auto; padding-top: 0 !important; }
  .nav a:not([href="#account"]):not(#adminNavBtn) { display: none !important; }
  .nav a[href="#account"] { width: 40px; height: 40px; padding: 0 !important; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(0,0,0,0.18); background: #fff; color: #111; }
  header button.btn-dark { position: relative; width: 40px; height: 40px; padding: 0 !important; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
  header #cartCount { position: absolute; top: -4px; right: -4px; background: #f3d77c; color: #111; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 999px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
}

/* Desktop header like mobile + pure white frames */
.desk-text { display: none !important; }
.mob-icon { display: block !important; }
.nav { display: flex; gap: 10px; align-items: center; margin-left: auto; }
.nav a[href="#account"], .nav #adminNavBtn {
  padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(0,0,0,0.18);
  background: #FFFFFF; font-size: 14px; font-weight: 500; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.preview-frame.style-with_border,
.preview-frame.style-polaroid {
  background: #FFFFFF !important;
  border: 1px solid rgba(0,0,0,0.06);
}
.preview-frame img {
  flex: 1;
  min-height: 0;
}

/* Align catalog cards */
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.product-card > .product-tag {
  align-self: flex-start;
}
.product-card > p.muted {
  flex-grow: 1;
}
.product-card > .btn {
  width: 100%;
}

/* Fix mobile header clipping */
.header-inner {
  height: auto !important;
  min-height: 64px;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  gap: 10px !important;
}
.logo {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  flex-shrink: 0;
}
.logo-title, .logo-sub {
  white-space: nowrap;
}
@media (max-width: 780px) {
  .header-inner {
    flex-wrap: nowrap !important;
    gap: 6px !important;
  }
  .logo-title {
    font-size: 16px !important;
  }
  .logo-sub {
    font-size: 9px !important;
  }
  .nav {
    width: auto !important;
    order: 0 !important;
    gap: 6px !important;
  }
  .nav a[href="#account"], .nav #adminNavBtn {
    padding: 6px 10px !important;
    font-size: 12px !important;
  }
}

/* Real gift box photo in hero slider */
.sm-card.style-box {
  padding: 0 !important;
  border: none !important;
  overflow: hidden;
}
.sm-card.style-box .sm-photo {
  background-image: url('box.jpg') !important;
  background-position: center !important;
  background-size: cover !important;
}

/* Brand logo with camera icon */
.logo {
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  text-decoration: none;
  color: var(--black);
}
.logo-cam {
  width: 38px;
  height: 28px;
  flex-shrink: 0;
}
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}
.logo-title {
  font-size: 22px !important;
  letter-spacing: 0.03em;
}
.logo-sub {
  font-size: 11px !important;
  letter-spacing: 0.06em;
}
@media (max-width: 780px) {
  .header-inner {
    padding-left: 12px !important;
    padding-right: 12px !important;
    gap: 6px !important;
  }
  .logo {
    gap: 6px !important;
  }
  .logo-cam {
    width: 28px;
    height: 21px;
  }
  .logo-title {
    font-size: 17.5px !important;
  }
  .logo-sub {
    font-size: 9px !important;
  }
  .nav a[href="#account"], .nav #adminNavBtn {
    padding: 5px 8px !important;
    font-size: 11px !important;
  }
  .header .btn-dark {
    padding: 8px 10px !important;
  }
}
