/* ===================== TOKENS ===================== */
:root{
  --plum: #2B1B2E;
  --plum-deep: #1A1315;
  --gold: #C9A24B;
  --gold-soft: #E4C87A;
  --cream: #F7F1E8;
  --rose: #D98E9B;
  --ink: #1A1315;
  --white: #FFFFFF;
  --shadow: 0 8px 24px rgba(26,19,21,0.12);
  --radius: 14px;
  --font-display: 'Fraunces', serif;
  --font-body: 'Inter', sans-serif;
}

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

html{scroll-behavior:smooth;}

body{
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  min-height:100vh;
}

.hidden{display:none !important;}

@media (prefers-reduced-motion: reduce){
  *{animation-duration:0.01ms !important; transition-duration:0.01ms !important;}
}

/* ===================== BRAND MARK ===================== */
/* ===================== BRAND MARK / LOGO ===================== */
.brand-mark{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
}
.brand-mark.small{justify-content:flex-start;}

.logo-badge{
  width:56px;
  height:56px;
  flex-shrink:0;
  border-radius:50%;
  background: linear-gradient(145deg, var(--gold-soft), var(--gold));
  color: var(--plum-deep);
  font-family: var(--font-display);
  font-weight:700;
  font-size:1.4rem;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0 4px 14px rgba(201,162,75,0.4);
  border: 2px solid var(--plum);
}
.logo-badge.small{
  width:38px;
  height:38px;
  font-size:1rem;
  border-width:1.5px;
}

.brand-text{text-align:left;}
.brand-mark h1, .brand-mark h2{
  font-family: var(--font-display);
  font-weight:600;
  letter-spacing:0.01em;
  color: var(--plum);
  display:flex;
  flex-direction:column;
  line-height:1.15;
}
.brand-mark h1{font-size: clamp(1.7rem, 5vw, 2.2rem);}
.brand-mark h2{font-size:1.25rem;}

.brand-sub{
  font-family: var(--font-body);
  font-weight:600;
  font-size:0.42em;
  letter-spacing:0.06em;
  text-transform:uppercase;
  color: var(--gold);
  margin-top:2px;
}
.site-header .brand-sub{color: var(--gold-soft);}
.brand-sub.small{font-size:0.5em;}

/* ===================== SEARCH BAR ===================== */
.search-row{
  max-width:1100px;
  margin:0 auto;
  padding: 4px 24px 14px;
}

.search-box{
  display:flex;
  align-items:center;
  gap:10px;
  background: rgba(247,241,232,0.08);
  border:1.5px solid rgba(247,241,232,0.2);
  border-radius:10px;
  padding:10px 14px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.search-box:focus-within{
  border-color: var(--gold-soft);
  background: rgba(247,241,232,0.12);
}

.search-icon{
  width:18px;
  height:18px;
  fill: rgba(247,241,232,0.6);
  flex-shrink:0;
}

.search-box input{
  flex:1;
  background:transparent;
  border:none;
  outline:none;
  color: var(--cream);
  font-family: var(--font-body);
  font-size:0.92rem;
}
.search-box input::placeholder{color: rgba(247,241,232,0.45);}

.search-clear{
  background:transparent;
  border:none;
  color: rgba(247,241,232,0.6);
  font-size:1.3rem;
  line-height:1;
  cursor:pointer;
  padding:0 2px;
  flex-shrink:0;
}
.search-clear:hover{color: var(--cream);}
.search-clear:focus-visible{outline:2px solid var(--gold-soft); outline-offset:2px;}

.no-results{
  text-align:center;
  padding:40px 20px;
  color:#8a7a7e;
  font-size:0.95rem;
  grid-column: 1 / -1;
}

.thread-dot{
  width:8px;height:8px;
  border-radius:50%;
  background: var(--gold);
  position:relative;
}
.thread-dot::before, .thread-dot::after{
  content:'';
  position:absolute;
  top:50%;
  width:22px;
  height:1px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 4px, transparent 4px 7px);
}
.thread-dot::before{right:100%;}
.thread-dot::after{left:100%;}
.brand-mark.small .thread-dot::before,
.brand-mark.small .thread-dot::after{width:14px;}

/* ===================== LOGIN SCREEN ===================== */
.login-screen{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:
    radial-gradient(circle at 15% 20%, rgba(201,162,75,0.15), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(217,142,155,0.18), transparent 45%),
    var(--plum);
}

.login-card{
  background: var(--cream);
  border-radius: var(--radius);
  padding: 44px 38px;
  max-width: 420px;
  width:100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  text-align:center;
  animation: riseIn 0.6s ease both;
}

@keyframes riseIn{
  from{opacity:0; transform:translateY(18px);}
  to{opacity:1; transform:translateY(0);}
}

.login-tag{
  margin-top:10px;
  color:#5b4a4e;
  font-size:0.95rem;
}

.login-form{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-top:28px;
  text-align:left;
}

.login-form label{
  font-size:0.8rem;
  font-weight:600;
  color: var(--plum);
  margin-top:12px;
}

.login-form input{
  font-family: var(--font-body);
  font-size:1rem;
  padding:12px 14px;
  border:1.5px solid #e0d5c4;
  border-radius:10px;
  background: var(--white);
  color: var(--ink);
  outline:none;
  transition: border-color 0.2s ease;
}
.login-form input:focus{
  border-color: var(--gold);
}

.btn-primary{
  margin-top:22px;
  padding:14px 20px;
  font-family:var(--font-body);
  font-weight:600;
  font-size:1rem;
  color: var(--cream);
  background: var(--plum);
  border:none;
  border-radius:10px;
  cursor:pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}
.btn-primary:hover{background:#3d2740; transform:translateY(-1px);}
.btn-primary:focus-visible{outline:3px solid var(--gold); outline-offset:2px;}

.login-note{
  margin-top:16px;
  font-size:0.78rem;
  color:#8a7a7e;
}

/* ===================== HEADER ===================== */
.site-header{
  background: var(--plum);
  color: var(--cream);
  position:sticky;
  top:0;
  z-index:10;
  box-shadow: var(--shadow);
}

.header-inner{
  max-width:1100px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 24px;
}

.site-header .brand-mark h2{color:var(--cream);}
.site-header .thread-dot{background:var(--gold-soft);}

.header-right{
  display:flex;
  align-items:center;
  gap:14px;
}

.welcome-user{
  font-size:0.9rem;
  color: var(--gold-soft);
}

.btn-ghost{
  font-family:var(--font-body);
  font-size:0.85rem;
  font-weight:600;
  color: var(--cream);
  background:transparent;
  border:1.5px solid rgba(247,241,232,0.35);
  border-radius:8px;
  padding:8px 14px;
  cursor:pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.btn-ghost:hover{border-color: var(--gold-soft); background: rgba(247,241,232,0.06);}
.btn-ghost:focus-visible{outline:2px solid var(--gold-soft); outline-offset:2px;}

.category-tabs{
  max-width:1100px;
  margin:0 auto;
  display:flex;
  gap:8px;
  padding:0 24px 14px;
  overflow-x:auto;
}

.tab{
  font-family:var(--font-body);
  font-weight:600;
  font-size:0.88rem;
  color: rgba(247,241,232,0.75);
  background:transparent;
  border:1px solid rgba(247,241,232,0.25);
  border-radius:999px;
  padding:8px 18px;
  cursor:pointer;
  white-space:nowrap;
  transition: all 0.2s ease;
}
.tab:hover{color:var(--cream); border-color: var(--gold-soft);}
.tab.active{
  background: var(--gold);
  border-color: var(--gold);
  color: var(--plum-deep);
}
.tab:focus-visible{outline:2px solid var(--gold-soft); outline-offset:2px;}

/* ===================== ABOUT ===================== */
.tab-about{
  margin-left:auto;
  border-color: rgba(228,200,122,0.5);
}

.about-section{
  max-width:1100px;
  margin: 40px auto 0;
  padding: 0 24px;
  animation: fadeUp 0.5s ease both;
}

.about-inner{
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 36px;
  position:relative;
  overflow:hidden;
}

.about-inner::before{
  content:'';
  position:absolute;
  top:-40px;
  right:-40px;
  width:160px;
  height:160px;
  border-radius:50%;
  background: radial-gradient(circle, rgba(217,142,155,0.18), transparent 70%);
}

.about-eyebrow{
  display:inline-block;
  font-size:0.72rem;
  font-weight:700;
  letter-spacing:0.08em;
  text-transform:uppercase;
  color: var(--rose);
  margin-bottom:6px;
}

.about-inner h3{
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  color: var(--plum);
  font-weight:600;
  margin-bottom:16px;
}

.about-inner p{
  color:#5b4a4e;
  font-size:0.97rem;
  line-height:1.65;
  max-width:640px;
  margin-bottom:14px;
}

.about-points{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap:20px;
  margin-top:26px;
  padding-top:26px;
  border-top:1px solid #eee2d3;
}

.about-point h5{
  font-family: var(--font-display);
  font-size:1rem;
  color: var(--plum);
  margin-bottom:4px;
}

.about-point p{
  font-size:0.85rem;
  color:#8a7a7e;
  margin-bottom:0;
}

/* ===================== HERO ===================== */
.hero{
  max-width:1100px;
  margin: 40px auto 8px;
  padding: 0 24px;
}
.hero h3{
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  color: var(--plum);
  font-weight:600;
  line-height:1.25;
}
.hero h3 em{
  font-style:italic;
  color: var(--rose);
}
.hero p{
  margin-top:10px;
  max-width:560px;
  color:#5b4a4e;
  font-size:0.98rem;
}

/* ===================== CATALOG ===================== */
.catalog{
  max-width:1100px;
  margin: 32px auto 60px;
  padding: 0 24px;
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap:24px;
}

.product-card{
  background: var(--white);
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: var(--shadow);
  display:flex;
  flex-direction:column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: fadeUp 0.5s ease both;
}
.product-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(26,19,21,0.18);
}

@keyframes fadeUp{
  from{opacity:0; transform:translateY(14px);}
  to{opacity:1; transform:translateY(0);}
}

.product-img{
  width:100%;
  aspect-ratio: 1 / 1;
  background-size:cover;
  background-position:center;
  position:relative;
}

.product-category-pill{
  position:absolute;
  top:10px;
  left:10px;
  background: rgba(26,19,21,0.65);
  color: var(--cream);
  font-size:0.68rem;
  font-weight:600;
  letter-spacing:0.04em;
  text-transform:uppercase;
  padding:4px 10px;
  border-radius:999px;
}

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

.product-name{
  font-family: var(--font-display);
  font-size:1.08rem;
  font-weight:600;
  color: var(--plum);
}

.product-desc{
  font-size:0.83rem;
  color:#7a696d;
  flex:1;
}

.product-price-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-top:8px;
}

.product-price{
  font-family: var(--font-display);
  font-weight:600;
  font-size:1.15rem;
  color: var(--rose);
}

.whatsapp-btn{
  display:flex;
  align-items:center;
  gap:6px;
  font-family: var(--font-body);
  font-weight:600;
  font-size:0.83rem;
  color: var(--white);
  background: #25D366;
  border:none;
  border-radius:8px;
  padding:9px 14px;
  cursor:pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}
.whatsapp-btn:hover{background:#1ebe57; transform:translateY(-1px);}
.whatsapp-btn:focus-visible{outline:2px solid var(--plum); outline-offset:2px;}
.whatsapp-btn svg{width:16px;height:16px;fill:currentColor;}

/* ===================== FOOTER ===================== */
.site-footer{
  text-align:center;
  padding:24px;
  color:#8a7a7e;
  font-size:0.82rem;
}

/* ===================== TOAST ===================== */
.toast{
  position:fixed;
  bottom:24px;
  left:50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--plum);
  color: var(--cream);
  padding:12px 22px;
  border-radius:10px;
  font-size:0.9rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  opacity:0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index:50;
}
.toast.show{
  opacity:1;
  transform: translateX(-50%) translateY(0);
}

/* ===================== PRODUCT MODAL ===================== */
.modal-overlay{
  position:fixed;
  inset:0;
  background: rgba(26,19,21,0.6);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
  z-index:100;
  opacity:0;
  transition: opacity 0.25s ease;
}
.modal-overlay.show{opacity:1;}

.modal-card{
  background: var(--white);
  border-radius: var(--radius);
  max-width:520px;
  width:100%;
  max-height:92vh;
  overflow-y:auto;
  -webkit-overflow-scrolling: touch;
  position:relative;
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.25s ease;
}
.modal-overlay.show .modal-card{
  transform: translateY(0) scale(1);
}

.modal-close{
  position:absolute;
  top:12px;
  right:12px;
  width:38px;
  height:38px;
  border-radius:50%;
  border:none;
  background: rgba(26,19,21,0.6);
  color: var(--cream);
  font-size:1.5rem;
  line-height:1;
  cursor:pointer;
  z-index:2;
  transition: background 0.2s ease;
}
.modal-close:hover{background: rgba(26,19,21,0.85);}
.modal-close:focus-visible{outline:2px solid var(--gold-soft); outline-offset:2px;}

.modal-img{
  width:100%;
  min-height:240px;
  max-height:55vh;
  background-color:#f1e9db;
  background-size:contain;
  background-position:center;
  background-repeat:no-repeat;
  border-radius: var(--radius) var(--radius) 0 0;
  cursor:zoom-in;
}

.modal-body{
  padding:24px 26px 28px;
}

.modal-pill{
  position:static;
  display:inline-block;
  background: var(--rose);
  color: var(--white);
  margin-bottom:12px;
}

.modal-name{
  font-family: var(--font-display);
  font-size:1.5rem;
  font-weight:600;
  color: var(--plum);
  margin-bottom:10px;
}

.modal-desc{
  color:#5b4a4e;
  font-size:0.97rem;
  line-height:1.6;
  margin-bottom:20px;
}

.modal-price-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:14px;
  padding-top:16px;
  border-top:1px solid #eee2d3;
}

/* Make product cards feel clickable */
.product-card{cursor:pointer;}
.product-card:focus-visible{outline:2px solid var(--gold); outline-offset:2px;}

/* ===================== IMAGE LIGHTBOX (full image view) ===================== */
.lightbox-overlay{
  position:fixed;
  inset:0;
  background: rgba(10,7,8,0.92);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
  z-index:200;
  opacity:0;
  transition: opacity 0.2s ease;
}
.lightbox-overlay.show{opacity:1;}

.lightbox-overlay img{
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  border-radius:8px;
}

.lightbox-close{
  position:absolute;
  top:16px;
  right:16px;
  width:42px;
  height:42px;
  border-radius:50%;
  border:none;
  background: rgba(247,241,232,0.15);
  color: var(--cream);
  font-size:1.6rem;
  line-height:1;
  cursor:pointer;
  z-index:2;
}
.lightbox-close:hover{background: rgba(247,241,232,0.25);}
.lightbox-close:focus-visible{outline:2px solid var(--gold-soft); outline-offset:2px;}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 480px){
  .login-card{padding:32px 22px;}
  .header-inner{padding:12px 16px; flex-wrap:wrap; gap:10px;}
  .welcome-user{font-size:0.8rem;}
  .logo-badge.small{width:34px; height:34px; font-size:0.9rem;}
  .brand-mark h2{font-size:1.05rem;}
  .search-row{padding:2px 16px 12px;}
  .search-box{padding:8px 12px;}
  .category-tabs{padding:0 16px 12px; gap:6px;}
  .tab{padding:7px 14px; font-size:0.82rem;}
  .tab-about{margin-left:0;}
  .hero{padding:0 16px; margin-top:28px;}
  .catalog{padding:0 16px; gap:16px; margin: 24px auto 48px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));}
  .about-inner{padding:28px 22px;}

  .product-info{padding:12px;}
  .product-name{font-size:0.98rem;}
  .product-desc{font-size:0.8rem;}
  .product-price{font-size:1.02rem;}
  .whatsapp-btn{padding:8px 12px; font-size:0.78rem;}

  .modal-overlay{padding:0; align-items:flex-end;}
  .modal-card{
    max-width:100%;
    max-height:94vh;
    border-radius: var(--radius) var(--radius) 0 0;
  }
  .modal-img{min-height:200px; max-height:42vh;}
  .modal-body{padding:20px 18px 24px;}
  .modal-name{font-size:1.3rem;}
  .modal-price-row{flex-direction:column; align-items:stretch;}
  .modal-price-row .whatsapp-btn{justify-content:center; padding:12px;}
}

@media (min-width:481px) and (max-width:768px){
  .catalog{grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));}
  .modal-card{max-width:90%;}
}
