/* =========================================
   JEWELVY - RESPONSIVE STOREFRONT
========================================= */

:root {
  --gold: #ffc047;
  --gold2: #df7800;
  --ink: #090909;
  --navy: #16213b;
  --cream: #fff8ed;
  --line: #f0e6d6;
  --black: #080808;
  --white: #fffdf9;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 52px;
}

body {
  margin: 0;
  background: var(--white);
  color: #111;
  font-family: Georgia, "Times New Roman", serif;
}

body.nav-drawer-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
}

/* =========================================
   HEADER
========================================= */

.header {
  position: relative;
  background: var(--black);
  color: #fff;
}

.top {
  min-height: 95px;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 8px 3%;
}

.logo {
  flex: 0 0 295px;
  min-width: 0;
}

.logo img {
  display: block;
  width: 280px;
  max-width: 100%;
  height: auto;
}

.search {
  display: flex;
  flex: 1;
  min-width: 0;
  max-width: 390px;
  height: 43px;
}

.search input {
  width: 100%;
  min-width: 0;
  padding: 0 17px;
  border: 0;
  border-radius: 9px 0 0 9px;
  outline: none;
  font-size: 12px;
}

.search input:focus {
  box-shadow: inset 0 0 0 2px var(--gold);
}

.search button {
  flex: 0 0 46px;
  border: 0;
  border-radius: 0 8px 8px 0;
  background: linear-gradient(120deg, #f6ad2e, #ffcc60);
  color: #111;
  font: 26px Arial, sans-serif;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.header-actions a {
  display: block;
  text-align: center;
  font-size: 12px;
  white-space: nowrap;
  transition: color .2s ease;
}

.header-actions a:hover {
  color: var(--gold);
}

.head-icon {
  display: block;
  font: 29px/30px Arial, sans-serif;
}

.count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: -6px;
  border-radius: 50%;
  background: #ffb92f;
  color: #111;
  font: bold 11px Arial, sans-serif;
  vertical-align: top;
}

/* =========================================
   STICKY NAVIGATION BAR
========================================= */

.nav {
  position: sticky;
  top: 0;
  z-index: 9999;
  min-height: 48px;
  background: #080808;
  color: #fff;
  border-top: 1px solid #29231a;
  box-shadow: 0 4px 15px rgba(0, 0, 0, .15);
}

.nav-inner {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-menu {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 5px;
  width: 100%;
  padding: 0 2%;
}

.nav-menu>a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 48px;
  padding: 14px 8px;
  border-bottom: 2px solid transparent;
  color: #f8f4ed;
  font: 12px Arial, sans-serif;
  white-space: nowrap;
  transition:
    color .2s ease,
    background .2s ease,
    border-color .2s ease;
}

.nav-menu>a:hover {
  color: var(--gold);
  background: rgba(255, 192, 71, .05);
}

.nav-menu>a.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.hot {
  display: inline-block;
  padding: 3px 5px;
  border-radius: 3px;
  background: #e11d25;
  color: #fff;
  font-size: 9px;
  line-height: 1.2;
}

/* =========================================
   HAMBURGER BUTTON
========================================= */

.nav-toggle {
  display: none;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 42px;
  margin: 3px 12px;
  padding: 8px;
  border: 1px solid #41351f;
  border-radius: 7px;
  background: #111;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
  transition: transform .25s ease, opacity .25s ease;
}

.nav-toggle.active span:first-child {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:last-child {
  transform: translateY(-7px) rotate(-45deg);
}

.drawer-brand {
  display: none;
}

.drawer-close {
  display: none;
}

/* =========================================
   SIDEBAR OVERLAY
========================================= */

.nav-overlay {
  display: none;
}

/* =========================================
   HERO
========================================= */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  height: 395px;
  padding: 35px 5%;
  overflow: hidden;
  background: #1a0e04 url("/frontassets/hero-bridal.png") center center / cover no-repeat;
  color: white;
}

.hero:before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg,
      rgba(10, 5, 1, .72),
      rgba(14, 6, 0, .38) 45%,
      transparent 75%);
}

.hero-content {
  position: relative;
  max-width: 540px;
}

.ornament {
  margin-bottom: 8px;
  color: #ffc341;
  text-align: center;
  letter-spacing: 8px;
  font-size: 20px;
}

.hero h1 {
  margin: 0;
  color: #ffc64e;
  font-size: clamp(52px, 8vw, 112px);
  line-height: .88;
  letter-spacing: 1px;
}

.tagline {
  margin: 8px 0 27px;
  font-size: clamp(17px, 2.4vw, 25px);
  font-weight: bold;
}

.qualities {
  margin: 0 0 20px;
  font-size: 15px;
  word-spacing: 5px;
}

.gold-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 29px;
  border: 0;
  border-radius: 6px;
  background: linear-gradient(110deg, #f5ae2f, #ffca5d);
  color: #111;
  font-size: 16px;
  font-weight: bold;
  box-shadow: 0 2px 5px #0001;
  transition: transform .2s ease, box-shadow .2s ease;
}

.gold-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 12px #0002;
}

.hero .gold-btn {
  min-width: 175px;
}

.trust-row {
  position: absolute;
  bottom: 5px;
  left: 4%;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.trust {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  line-height: 1.3;
}

.trust .trust-icon {
  color: #ffd04c;
  font: 26px Arial, sans-serif;
}

/* =========================================
   CATEGORY GRID
========================================= */

.categories {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 3% 20px;
  background: var(--white);
}

.category {
  min-width: 0;
  text-align: center;
}

.category img {
  display: block;
  width: min(100%, 118px);
  aspect-ratio: 1;
  object-fit: cover;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: #fff3df;
}

.category strong {
  display: block;
  font-size: 14px;
  font-weight: normal;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.category span {
  display: inline-block;
  margin-top: 8px;
  color: #b85a00;
  font-size: 12px;
}

/* =========================================
   PRODUCT SECTIONS
========================================= */

.section {
  padding: 10px 2.2% 16px;
  background: linear-gradient(120deg, #fff9f0, #fffdf9);
}

.section-title {
  margin: 0 0 14px;
  text-align: center;
}

.section-title h2 {
  margin: 0 0 7px;
  font-size: 26px;
}

.section-title p {
  margin: 0;
  color: #252525;
  font-size: 14px;
}

.section-title .ornament {
  display: inline;
  margin: 0 12px;
  color: #c87900;
  font-size: 14px;
  letter-spacing: 3px;
}

.title-line {
  display: flex;
  align-items: center;
  justify-content: center;
}

.view-all {
  float: right;
  margin-top: -26px;
  color: #b65b00;
  font-size: 13px;
}

.products {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}

.empty-products {
  grid-column: 1 / -1;
  margin: 0;
  padding: 32px 12px;
  color: #756b5e;
  text-align: center;
}

.product {
  position: relative;
  min-width: 0;
  padding: 8px;
  border: 1px solid #f6efe6;
  border-radius: 9px;
  background: #fff;
  text-align: center;
  transition: box-shadow .2s ease, transform .2s ease;
}

.product:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 18px rgba(0, 0, 0, .08);
}

.product img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
}

.heart {
  position: absolute;
  top: 13px;
  right: 15px;
  border: 0;
  background: #0002;
  color: white;
  font: 23px Arial, sans-serif;
  text-shadow: 0 1px 3px #333;
}

.product h3 {
  overflow: hidden;
  margin: 8px 0 5px;
  font-size: 13px;
  font-weight: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seller-byline {
  margin: 3px 0 7px;
  color: #756b5e;
  font: 11px/1.35 Arial, sans-serif;
}

.seller-byline strong {
  color: #925b17;
  font-weight: 600;
}

.price {
  margin-bottom: 9px;
  font-size: 15px;
  font-weight: bold;
}

.product .gold-btn {
  width: 100%;
  padding: 9px 4px;
  border-radius: 6px;
  font-size: 12px;
}

/* =========================================
   PROMOTIONAL BANNERS
========================================= */

.promos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 2.2% 18px;
  background: linear-gradient(120deg, #fff9f0, #fffdf9);
}

.promo {
  display: flex;
  align-items: center;
  min-height: 174px;
  padding: 20px 7%;
  overflow: hidden;
  border-radius: 9px;
  background-position: center;
  background-size: cover;
  color: #fff;
}

.promo.bridal {
  justify-content: flex-end;
  background-image:
    linear-gradient(90deg, rgba(0, 0, 0, .08), rgba(0, 0, 0, .45)),
    url("/frontassets/promo-bridal.png");
}

.promo.diamond {
  background-image:
    linear-gradient(90deg, rgba(255, 249, 235, .2), rgba(255, 249, 235, 0)),
    url("/frontassets/promo-diamond.png");
  color: #111;
}

.promo-copy h2 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: normal;
}

.promo-copy p {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.3;
}

.promo .gold-btn {
  padding: 8px 16px;
  font-size: 13px;
}

/* =========================================
   SERVICES
========================================= */

.service-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 8px 3% 20px;
  background: var(--white);
}

.service {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 5px;
  border-right: 1px solid #eee4d7;
}

.service:last-child {
  border: 0;
}

.service .service-icon {
  color: #b86600;
  font: 30px Arial, sans-serif;
}

.service span {
  font-size: 12px;
  line-height: 1.25;
}

/* =========================================
   GIFT BANNER
========================================= */

.gift-banner {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr 1fr;
  align-items: center;
  gap: 18px;
  min-height: 168px;
  padding: 22px 4%;
  background: #170d05 url("/frontassets/gift-banner.png") center / cover no-repeat;
  color: #fff;
}

.gift-copy h2 {
  margin: 0 0 7px;
  color: #ffca58;
  font-size: 22px;
}

.gift-copy p {
  margin: 0 0 10px;
  font-size: 13px;
}

.gift-banner .gold-btn {
  padding: 8px 17px;
  font-size: 13px;
}

.quote {
  color: #ffdc8a;
  text-align: center;
  font-size: 20px;
  font-style: italic;
  line-height: 1.5;
}

/* =========================================
   FOOTER
========================================= */

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 4%;
  background: #080808;
  color: #eee;
  font-size: 13px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a:hover {
  color: var(--gold);
}

.subcategories .subcat .subcat-description {
  display: block;
  margin: 3px auto 0;
  color: #777;
  font-size: 11px;
  line-height: 1.3;
}

/* =========================================
   MOBILE BOTTOM NAVIGATION
========================================= */

.mobile-bottom-nav {
  display: none;
}

/* =========================================
   TOAST
========================================= */

.toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  z-index: 10002;
  display: none;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  transform: translateX(-50%);
  border-radius: 7px;
  background: #151515;
  color: white;
  box-shadow: 0 5px 20px #0003;
  font: 13px/1.5 Arial, sans-serif;
  text-align: center;
}

.toast.show {
  display: block;
}

/* =========================================
   DESKTOP AND LARGE SCREENS
========================================= */

@media (min-width: 1400px) {
  .hero {
    height: 470px;
  }

  .hero-content {
    max-width: 650px;
  }

  .categories {
    padding-top: 22px;
    padding-bottom: 24px;
  }

  .product h3 {
    font-size: 15px;
  }

  .product .gold-btn {
    font-size: 14px;
  }

  .promo {
    min-height: 210px;
  }

  .nav-menu>a {
    font-size: 13px;
  }
}

/* =========================================
   TABLET AND MOBILE SIDEBAR
========================================= */

@media (max-width: 800px) {

  body {
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  }

  .mobile-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9998;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    min-height: 68px;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #46381f;
    background: rgba(8, 8, 8, .98);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, .22);
    font-family: Arial, sans-serif;
  }

  .mobile-bottom-nav a {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    color: #c8c0b2;
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-bottom-nav a.active {
    color: var(--gold);
  }

  .mobile-bottom-nav a.active::before {
    position: absolute;
    top: -7px;
    left: 50%;
    width: 28px;
    height: 2px;
    transform: translateX(-50%);
    border-radius: 0 0 2px 2px;
    background: var(--gold);
    content: "";
  }

  .mobile-nav-icon {
    position: relative;
    display: block;
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
  }

  .mobile-cart-icon {
    position: relative;
    display: block;
    width: 23px;
    height: 23px;
  }

  .mobile-cart-icon .count {
    position: absolute;
    top: -5px;
    right: -9px;
    margin: 0;
  }

  .mobile-bottom-nav a:focus-visible {
    outline: 2px solid var(--gold2);
    outline-offset: -2px;
  }

  .toast {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }

  .top {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 16px;
  }

  .logo {
    flex: 1 1 180px;
  }

  .logo img {
    width: 220px;
  }

  .search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
  }

  .header-actions {
    gap: 13px;
  }

  .nav {
    min-height: 50px;
  }

  .nav-inner {
    justify-content: flex-start;
  }

  .nav-toggle {
    display: flex;
  }

  /* Full-screen dimming layer */
  .nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    /* display: block; */
    background: rgba(0, 0, 0, .58);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .3s ease, visibility .3s ease;
  }

  .nav-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* Sidebar drawer */
  .nav-menu {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 10001;

    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;

    width: min(86vw, 340px);
    height: 100vh;
    height: 100dvh;
    padding: 0;

    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;

    background: #080808;
    box-shadow: 12px 0 35px rgba(0, 0, 0, .25);

    transform: translateX(-105%);
    visibility: hidden;

    transition: transform .3s ease, visibility .3s ease;
  }

  .nav-menu.open {
    transform: translateX(0);
    visibility: visible;
  }

  /* Logo header inside the drawer */
  .drawer-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 86px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #17130b, #050505);
    border-bottom: 1px solid #342817;
  }

  .drawer-brand>a {
    display: block;
    min-width: 0;
    flex: 1;
  }

  .drawer-brand img {
    display: block;
    width: 190px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
  }

  .drawer-close {
    display: inline-flex;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #514127;
    border-radius: 50%;
    background: #15120d;
    color: var(--gold);
    font: 25px/1 Arial, sans-serif;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
  }

  .drawer-close:hover {
    transform: rotate(90deg);
    background: #2b2111;
  }

  /* Sidebar links */
  .nav-menu>a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 51px;
    padding: 15px 21px;
    border-bottom: 1px solid #222;
    border-left: 3px solid transparent;
    color: #f5f1e9;
    font-size: 14px;
  }

  .nav-menu>a:hover,
  .nav-menu>a.active {
    background: #17130c;
    color: var(--gold);
    border-left-color: var(--gold);
    border-bottom-color: #332818;
  }

  .nav-menu .hot {
    margin-left: 8px;
  }

  .hero {
    height: 390px;
    background-position: 58% center;
    padding: 26px 5%;
  }

  .hero h1 {
    font-size: clamp(48px, 9vw, 75px);
  }

  .hero-content {
    max-width: 65%;
  }

  .trust-row {
    bottom: 5px;
    gap: 10px;
  }

  .trust {
    font-size: 10px;
  }

  .trust .trust-icon {
    font-size: 21px;
  }

  .categories {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 18px;
  }

  .products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .promos {
    grid-template-columns: 1fr;
  }

  .promo {
    min-height: 180px;
  }

  .service-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .gift-banner {
    grid-template-columns: 1fr 1fr;
  }

  .quote {
    display: none;
  }
}

/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 480px) {

  .top {
    gap: 10px;
    padding: 12px;
  }

  .logo {
    flex: 1 1 130px;
  }

  .logo img {
    width: 190px;
  }

  .header-actions {
    gap: 8px;
  }

  .header-actions a {
    font-size: 10px;
  }

  .head-icon {
    font-size: 24px;
  }

  .nav {
    min-height: 48px;
  }

  .nav-toggle {
    width: 40px;
    height: 38px;
    flex-basis: 40px;
    margin-right: 8px;
  }

  .drawer-brand {
    min-height: 78px;
    padding: 13px 15px;
  }

  .drawer-brand img {
    width: 165px;
  }

  .nav-menu>a {
    min-height: 49px;
    padding: 13px 17px;
    font-size: 13px;
  }

  .hero {
    height: 430px;
    align-items: flex-start;
    padding-top: 40px;
    background-position: 61% center;
  }

  .hero:before {
    background: linear-gradient(90deg,
        rgba(10, 5, 1, .76),
        rgba(14, 6, 0, .45) 65%,
        rgba(14, 6, 0, .1));
  }

  .hero-content {
    max-width: 92%;
  }

  .hero h1 {
    font-size: 49px;
  }

  .tagline {
    max-width: 290px;
    font-size: 17px;
  }

  .qualities {
    font-size: 12px;
    word-spacing: 1px;
  }

  .trust-row {
    right: 4%;
    left: 4%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .trust {
    font-size: 10px;
  }

  .categories {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px 8px;
    padding: 16px 3%;
  }

  .category img {
    width: min(78px, 100%);
  }

  .category strong {
    font-size: 12px;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .category span {
    font-size: 11px;
  }

  .title-line {
    flex-wrap: wrap;
    row-gap: 4px;
  }

  .section-title h2 {
    font-size: clamp(18px, 5.5vw, 22px);
  }

  .section-title .ornament {
    margin: 0 4px;
    letter-spacing: 2px;
  }

  .view-all {
    display: block;
    float: none;
    margin-top: 0;
    margin-bottom: 10px;
    text-align: right;
  }

  .products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .product h3 {
    font-size: 12px;
  }

  .heart {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
  }

  .price {
    font-size: 14px;
  }

  .promos {
    padding-right: 3%;
    padding-left: 3%;
  }

  .promo {
    min-height: 165px;
    padding: 15px 5%;
  }

  .promo-copy h2 {
    font-size: 23px;
  }

  .promo-copy p {
    font-size: 13px;
  }

  .service-strip {
    grid-template-columns: repeat(2, 1fr);
    padding: 10px;
  }

  .service {
    justify-content: flex-start;
    border: 0;
  }

  .gift-banner {
    grid-template-columns: 1fr;
    padding: 22px;
    background-position: center;
  }

  .gift-copy h2 {
    font-size: 21px;
  }

  .quote {
    display: block;
    font-size: 17px;
  }

  .footer {
    flex-direction: column;
  }

  .footer-links {
    gap: 12px;
  }
}

/* =========================================
   KEYBOARD ACCESSIBILITY
========================================= */

.nav-toggle:focus-visible,
.drawer-close:focus-visible,
.nav-menu a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -3px;
}

/* =========================================
   REDUCED MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}