/* ==========================================================================
   RannzStore — Design tokens
   ========================================================================== */
:root{
  --cyan:        #00B4CC;
  --cyan-deep:   #007A8C;
  --cyan-soft:   #E4FAFD;
  --cyan-glow:   rgba(0, 180, 204, .28);
  --navy:        #0B1B24;
  --navy-soft:   #4A5C66;
  --bg:          #FFFFFF;
  --surface:     #F6FBFC;
  --border:      #E2EEF0;
  --danger:      #E24C4C;
  --radius-sm:   10px;
  --radius-md:   16px;
  --radius-lg:   22px;
  --shadow:      0 8px 24px rgba(11, 27, 36, .06);
  --shadow-lg:   0 20px 50px rgba(11, 27, 36, .14);
  --font-display: 'Sora', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
}

*{ box-sizing: border-box; margin:0; padding:0; }
[hidden]{ display:none !important; }
html{ scroll-behavior: smooth; scroll-padding-top: 90px; }
body{
  font-family: var(--font-body);
  color: var(--navy);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a{ text-decoration:none; color:inherit; }
button{ font-family: inherit; cursor:pointer; border:none; background:none; }
input{ font-family: inherit; }
ul,li{ list-style:none; }
img{ max-width:100%; display:block; }

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

.icon-btn i, .btn i, .fab i { width:18px; height:18px; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn{
  display:inline-flex; align-items:center; gap:8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight:600; font-size:.95rem;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn--primary{
  background: var(--navy);
  color:#fff;
  box-shadow: 0 6px 18px rgba(0,180,204,.25);
}
.btn--primary:hover{ transform: translateY(-2px); box-shadow: 0 10px 24px var(--cyan-glow); }
.btn--ghost{
  background: var(--cyan-soft);
  color: var(--cyan-deep);
  border: 1px solid var(--cyan-glow);
}
.btn--ghost:hover{ background: #d8f4f8; }
.btn--ai{
  background: linear-gradient(135deg, var(--cyan), var(--cyan-deep));
  color:#fff;
  padding: 10px 18px;
  box-shadow: 0 4px 14px var(--cyan-glow);
}
.btn--ai:hover{ transform: translateY(-2px); }
.btn--block{ width:100%; justify-content:center; }

.icon-btn{
  position:relative;
  width:40px; height:40px;
  display:flex; align-items:center; justify-content:center;
  border-radius:50%;
  color: var(--navy);
  transition: background .15s ease;
}
.icon-btn:hover{ background: var(--surface); }
.icon-btn--primary{ background: var(--navy); color:#fff; }
.icon-btn--primary:hover{ background: var(--cyan-deep); }

.badge{
  position:absolute; top:0; right:0;
  background: var(--cyan);
  color:#fff;
  font-size:.65rem; font-weight:700;
  min-width:16px; height:16px; padding:0 4px;
  border-radius:999px;
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 0 0 2px #fff;
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar{
  position: sticky; top:0; z-index:50;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.navbar__inner{
  max-width:1200px; margin:0 auto;
  display:flex; align-items:center; justify-content:space-between;
  padding: 14px 24px;
  gap: 20px;
}
.navbar__logo{
  display:flex; align-items:center; gap:8px;
  font-family: var(--font-display); font-weight:700; font-size:1.25rem;
  color: var(--navy);
  white-space:nowrap;
}
.navbar__logo em{ font-style:normal; color: var(--cyan-deep); }
.navbar__logo-icon{ color: var(--cyan); width:24px; height:24px; }

.navbar__links{ display:flex; align-items:center; gap:28px; }
.navbar__link{
  font-weight:600; font-size:.92rem; color: var(--navy-soft);
  position:relative; padding:6px 0;
  transition: color .15s ease;
}
.navbar__link:hover, .navbar__link.is-active{ color: var(--navy); }
.navbar__link.is-active::after{
  content:''; position:absolute; left:0; right:0; bottom:-4px; height:2px;
  background: var(--cyan); border-radius:2px;
}

.navbar__actions{ display:flex; align-items:center; gap:6px; }
.navbar__burger{ display:none; }

.search-bar{
  max-height:0; overflow:hidden;
  transition: max-height .25s ease;
  border-top: 1px solid transparent;
}
.search-bar.is-open{ max-height:70px; border-top-color: var(--border); }
.search-bar__inner{
  max-width:1200px; margin:0 auto;
  display:flex; align-items:center; gap:10px;
  padding: 12px 24px;
  color: var(--navy-soft);
}
.search-bar__inner input{
  flex:1; border:none; outline:none; font-size:.95rem; color: var(--navy); background:transparent;
}

.mobile-menu{
  max-height:0; overflow:hidden;
  background:#fff; border-bottom:1px solid var(--border);
  transition: max-height .25s ease;
}
.mobile-menu.is-open{ max-height:260px; }
.mobile-menu__link{
  display:block; padding:14px 24px; font-weight:600;
  border-top:1px solid var(--border); color: var(--navy-soft);
}

/* ==========================================================================
   Banner slider
   ========================================================================== */
.banner{
  position:relative;
  max-width:1200px; margin: 20px auto 0;
  border-radius: var(--radius-lg);
  overflow:hidden;
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow);
}
.banner__viewport{ position:relative; width:100%; height:100%; }
.banner__slide{
  position:absolute; inset:0;
  display:flex; align-items:center;
  padding: 0 60px 30px;
  background:
    linear-gradient(120deg, rgba(11,27,36,.82) 10%, rgba(11,27,36,.35) 60%, rgba(11,27,36,.1) 100%),
    linear-gradient(135deg, #0B1B24, #0F2E38);
  background-size: cover; background-position:center;
  opacity:0; visibility:hidden;
  transform: scale(1.04);
  transition: opacity .7s ease, transform 7s ease, visibility 0s linear .7s;
}
.banner__slide.is-active{
  opacity:1; visibility:visible; transform: scale(1);
  transition: opacity .7s ease, transform 7s ease;
}
.banner__content{ max-width:520px; color:#fff; }
.banner__eyebrow{
  display:inline-block; font-family:var(--font-mono); font-size:.75rem;
  letter-spacing:.08em; text-transform:uppercase;
  color: var(--cyan);
  background: rgba(0,180,204,.15);
  border:1px solid rgba(0,180,204,.4);
  padding:4px 12px; border-radius:999px;
  margin-bottom:14px;
}
.banner__title{
  font-family: var(--font-display); font-weight:800;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height:1.15; margin-bottom:10px;
}
.banner__desc{ font-size:1.05rem; font-weight:600; color: var(--cyan); margin-bottom:6px; }
.banner__info{ color: rgba(255,255,255,.8); margin-bottom:22px; line-height:1.5; }

.banner__dots{
  position:absolute; bottom:20px; left:0; right:0;
  display:flex; justify-content:center; gap:8px;
}
.banner__dot{
  width:9px; height:9px; border-radius:50%;
  background: rgba(255,255,255,.4);
  transition: all .25s ease;
}
.banner__dot.is-active{ background: var(--cyan); width:26px; border-radius:6px; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section{ max-width:1200px; margin: 0 auto; padding: 56px 24px 0; }
.section__head{ margin-bottom:24px; }
.section__title{ font-family: var(--font-display); font-size:1.5rem; font-weight:700; }
.section__subtitle{ color: var(--navy-soft); margin-top:4px; font-size:.92rem; }

/* Categories */
.categories{ padding-top:36px; }
.categories__list{
  display:flex; gap:10px; overflow-x:auto; padding-bottom:4px;
  scrollbar-width:none;
}
.categories__list::-webkit-scrollbar{ display:none; }
.category-chip{
  display:flex; align-items:center; gap:8px; white-space:nowrap;
  padding: 10px 18px;
  border-radius:999px;
  border:1px solid var(--border);
  background: var(--surface);
  color: var(--navy-soft);
  font-weight:600; font-size:.88rem;
  transition: all .15s ease;
}
.category-chip:hover{ border-color: var(--cyan); color: var(--navy); }
.category-chip.is-active{
  background: var(--navy); color:#fff; border-color: var(--navy);
}
.category-chip i{ width:16px; height:16px; }

/* Product grid */
.product-grid{
  display:grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap:18px; margin-top: 8px;
}
.product-card{
  background:#fff;
  border:1px solid var(--border);
  border-radius: var(--radius-md);
  padding:18px;
  display:flex; flex-direction:column; gap:10px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.product-card:hover{
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--cyan-glow);
}
.product-card__icon{
  width:46px; height:46px; border-radius: var(--radius-sm);
  background: var(--cyan-soft); color: var(--cyan-deep);
  display:flex; align-items:center; justify-content:center;
}
.product-card__cat{
  font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em;
  color: var(--cyan-deep);
}
.product-card__name{ font-family: var(--font-display); font-weight:700; font-size:1.02rem; }
.product-card__desc{ color: var(--navy-soft); font-size:.85rem; line-height:1.45; flex:1; }
.product-card__foot{ display:flex; align-items:center; justify-content:space-between; margin-top:4px; }
.product-card__price{
  font-family: var(--font-mono); font-weight:600; color: var(--navy);
  font-size:.98rem;
}
.product-card__add{
  width:38px; height:38px; border-radius:50%;
  background: var(--navy); color:#fff;
  display:flex; align-items:center; justify-content:center;
  transition: background .15s ease, transform .15s ease;
}
.product-card__add:hover{ background: var(--cyan-deep); transform: scale(1.06); }
.product-card__add i{ width:17px; height:17px; }

.empty-state{
  display:flex; flex-direction:column; align-items:center; gap:10px;
  padding: 60px 0; color: var(--navy-soft); font-weight:500;
}
.empty-state i{ width:34px; height:34px; color: var(--cyan); }

/* Promo */
.promo{ padding-bottom:60px; }
.promo-grid{ display:grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap:16px; }
.promo-card{
  background: linear-gradient(135deg, var(--navy), #123644);
  color:#fff; border-radius: var(--radius-md); padding:22px;
  position:relative; overflow:hidden;
}
.promo-card::after{
  content:''; position:absolute; right:-30px; top:-30px; width:120px; height:120px;
  background: radial-gradient(circle, var(--cyan-glow), transparent 70%);
}
.promo-card__code{
  font-family: var(--font-mono); font-weight:700; font-size:1.3rem; color: var(--cyan);
  letter-spacing:.03em;
}
.promo-card__desc{ margin-top:8px; color: rgba(255,255,255,.85); font-size:.9rem; line-height:1.5; }
.promo-card__exp{ margin-top:14px; font-size:.78rem; color: rgba(255,255,255,.55); }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer{ margin-top:70px; border-top:1px solid var(--border); background: var(--surface); }
.footer__inner{
  max-width:1200px; margin:0 auto; padding:40px 24px 20px;
  display:flex; flex-wrap:wrap; gap:24px; justify-content:space-between; align-items:flex-start;
}
.footer__brand p{ color: var(--navy-soft); font-size:.88rem; margin-top:6px; }
.footer__links{ display:flex; flex-wrap:wrap; gap:22px; }
.footer__links a{ color: var(--navy-soft); font-weight:600; font-size:.9rem; }
.footer__links a:hover{ color: var(--cyan-deep); }
.footer__copy{
  text-align:center; padding: 16px 24px 24px; font-size:.78rem; color: var(--navy-soft);
  border-top:1px solid var(--border);
}

/* ==========================================================================
   Overlay
   ========================================================================== */
.overlay{
  position:fixed; inset:0; background: rgba(11,27,36,.45);
  opacity:0; visibility:hidden; transition: opacity .25s ease;
  z-index:60;
}
.overlay.is-open{ opacity:1; visibility:visible; }

/* ==========================================================================
   Cart Drawer
   ========================================================================== */
.drawer{
  position:fixed; top:0; right:0; bottom:0; width:100%; max-width:400px;
  background:#fff; z-index:70;
  display:flex; flex-direction:column;
  transform: translateX(100%);
  transition: transform .3s ease;
  box-shadow: -10px 0 30px rgba(0,0,0,.1);
}
.drawer.is-open{ transform: translateX(0); }
.drawer__head{
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 20px; border-bottom:1px solid var(--border);
}
.drawer__head h3{ display:flex; align-items:center; gap:8px; font-family: var(--font-display); font-size:1.05rem; }
.drawer__body{ flex:1; overflow-y:auto; padding:14px 20px; display:flex; flex-direction:column; gap:12px; }
.drawer__foot{ border-top:1px solid var(--border); padding:16px 20px 20px; }

.cart-empty{
  display:flex; flex-direction:column; align-items:center; gap:10px;
  color: var(--navy-soft); padding: 50px 0; text-align:center;
}
.cart-empty i{ width:34px; height:34px; color: var(--cyan); }

.cart-item{
  display:flex; gap:12px; align-items:center;
  border:1px solid var(--border); border-radius: var(--radius-sm); padding:10px;
}
.cart-item__icon{
  width:40px; height:40px; border-radius:10px; flex-shrink:0;
  background: var(--cyan-soft); color: var(--cyan-deep);
  display:flex; align-items:center; justify-content:center;
}
.cart-item__info{ flex:1; min-width:0; }
.cart-item__name{ font-weight:600; font-size:.88rem; }
.cart-item__price{ font-family: var(--font-mono); font-size:.8rem; color: var(--navy-soft); margin-top:2px; }
.cart-item__qty{ display:flex; align-items:center; gap:8px; margin-top:8px; }
.qty-btn{
  width:22px; height:22px; border-radius:50%; background: var(--surface);
  display:flex; align-items:center; justify-content:center; color: var(--navy);
}
.qty-btn:hover{ background: var(--cyan-soft); }
.qty-btn i{ width:13px; height:13px; }
.cart-item__remove{ color: var(--danger); align-self:flex-start; }
.cart-item__remove i{ width:17px; height:17px; }

.promo-input{
  display:flex; align-items:center; gap:8px;
  border:1px solid var(--border); border-radius:999px; padding:6px 6px 6px 14px;
  color: var(--cyan-deep);
}
.promo-input input{
  flex:1; border:none; outline:none; font-size:.85rem; background:transparent; color: var(--navy);
}
.promo-input .btn{ padding:8px 16px; font-size:.82rem; }
.promo-msg{ font-size:.8rem; margin-top:8px; min-height:16px; }
.promo-msg.is-success{ color: #0E9F6E; }
.promo-msg.is-error{ color: var(--danger); }

.cart-summary{ margin-top:16px; display:flex; flex-direction:column; gap:6px; }
.cart-summary__row{ display:flex; justify-content:space-between; font-size:.88rem; color: var(--navy-soft); }
.cart-summary__row--discount span:last-child{ color: #0E9F6E; }
.cart-summary__row--total{
  font-weight:700; color: var(--navy); font-size:1.05rem;
  font-family: var(--font-mono);
  padding-top:8px; border-top:1px dashed var(--border); margin-top:4px;
}
.cart-drawer .btn--block{ margin-top:14px; }

/* ==========================================================================
   Modal (Redeem Code)
   ========================================================================== */
.modal{
  position:fixed; inset:0; z-index:80;
  display:flex; align-items:center; justify-content:center;
  background: rgba(11,27,36,.45);
  opacity:0; visibility:hidden; transition: opacity .2s ease;
  padding: 20px;
}
.modal.is-open{ opacity:1; visibility:visible; }
.modal__box{
  background:#fff; border-radius: var(--radius-md); width:100%; max-width:400px;
  box-shadow: var(--shadow-lg);
  transform: translateY(10px); transition: transform .2s ease;
}
.modal.is-open .modal__box{ transform: translateY(0); }
.modal__head{
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 20px; border-bottom:1px solid var(--border);
}
.modal__head h3{ display:flex; align-items:center; gap:8px; font-family: var(--font-display); font-size:1.05rem; }
.modal__body{ padding:20px; }
.modal__body label{ font-size:.85rem; font-weight:600; color: var(--navy-soft); display:block; margin-bottom:8px; }

/* ==========================================================================
   RannzAI Panel
   ========================================================================== */
.fab{
  position:fixed; bottom:24px; right:24px; z-index:55;
  width:56px; height:56px; border-radius:50%;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-deep));
  color:#fff;
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 10px 26px var(--cyan-glow);
  transition: transform .2s ease;
}
.fab:hover{ transform: scale(1.08) rotate(8deg); }
.fab i{ width:24px; height:24px; }

.ai-panel{
  position:fixed; bottom:24px; right:24px; z-index:75;
  width:360px; max-width: calc(100vw - 32px);
  height:520px; max-height: calc(100vh - 48px);
  background:#fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display:flex; flex-direction:column; overflow:hidden;
  transform: translateY(20px) scale(.97); opacity:0; visibility:hidden;
  transition: all .22s ease;
  border: 1px solid var(--border);
}
.ai-panel.is-open{ transform: translateY(0) scale(1); opacity:1; visibility:visible; }

.ai-panel__head{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px; background: var(--navy); color:#fff;
}
.ai-panel__title{ display:flex; align-items:center; gap:10px; }
.ai-panel__title i{ width:20px; height:20px; color: var(--cyan); }
.ai-panel__title strong{ font-family: var(--font-display); display:block; font-size:.95rem; }
.ai-panel__status{ display:flex; align-items:center; gap:4px; font-size:.72rem; color: #7EE8C7; }
.ai-panel__status i{ width:8px; height:8px; fill:currentColor; }
.ai-panel__head .icon-btn{ color:#fff; }
.ai-panel__head .icon-btn:hover{ background: rgba(255,255,255,.12); }

.ai-panel__body{
  flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:10px;
  background: var(--surface);
}
.ai-msg{
  max-width:82%; padding:10px 14px; border-radius: 14px; font-size:.86rem; line-height:1.5;
}
.ai-msg--bot{
  background:#fff; border:1px solid var(--border); align-self:flex-start;
  border-bottom-left-radius:4px;
}
.ai-msg--user{
  background: var(--navy); color:#fff; align-self:flex-end;
  border-bottom-right-radius:4px;
}

.ai-panel__quick{
  display:flex; flex-wrap:wrap; gap:6px; padding: 0 16px 12px;
  background: var(--surface);
}
.ai-quick-btn{
  font-size:.76rem; font-weight:600; color: var(--cyan-deep);
  background: var(--cyan-soft); border:1px solid var(--cyan-glow);
  padding:6px 12px; border-radius:999px;
}
.ai-quick-btn:hover{ background:#d8f4f8; }

.ai-panel__input{
  display:flex; align-items:center; gap:8px;
  padding:12px; border-top:1px solid var(--border);
}
.ai-panel__input input{
  flex:1; border:1px solid var(--border); border-radius:999px;
  padding:10px 16px; font-size:.86rem; outline:none;
}
.ai-panel__input input:focus{ border-color: var(--cyan); }

/* ==========================================================================
   Toast
   ========================================================================== */
.toast{
  position:fixed; bottom:24px; left:50%; transform: translateX(-50%) translateY(20px);
  background: var(--navy); color:#fff;
  padding:12px 22px; border-radius:999px; font-size:.86rem; font-weight:600;
  display:flex; align-items:center; gap:8px;
  opacity:0; visibility:hidden; transition: all .25s ease;
  z-index:90; box-shadow: var(--shadow-lg);
}
.toast.is-open{ opacity:1; visibility:visible; transform: translateX(-50%) translateY(0); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 860px){
  .navbar__links{ display:none; }
  .navbar__burger{ display:flex; }
  .banner{ aspect-ratio: 16 / 9; margin: 12px 12px 0; }
  .banner__slide{ padding: 18px 20px 30px; align-items:center; }
  .banner__eyebrow{ display:none; }
  .banner__title{ font-size: clamp(1.15rem, 5.5vw, 1.5rem); margin-bottom:6px; }
  .banner__desc{ font-size:.85rem; margin-bottom:4px; }
  .banner__info{ font-size:.8rem; margin-bottom:12px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
  .banner__content .btn{ padding:9px 16px; font-size:.8rem; }
  .banner__dots{ bottom:10px; }
  .section{ padding: 40px 16px 0; }
  .footer__inner{ padding: 32px 16px 16px; }
}

@media (max-width: 480px){
  .navbar__inner{ padding:12px 16px; }
  .navbar__logo span{ font-size:1.05rem; }
  .btn--ai span{ display:none; }
  .btn--ai{ padding:10px; border-radius:50%; }
  .ai-panel{ right:16px; bottom:16px; width: calc(100vw - 32px); height: calc(100vh - 100px); }
  .fab{ right:16px; bottom:16px; }
  .drawer{ max-width:100%; }
  .product-grid{ grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap:12px; }
  .product-card{ padding:14px; }
}
