/* Ensure HTML hidden attribute always hides elements */
[hidden]{display:none !important;}

/*
  EMERALD LUX THEME
  Palette: Black, light gray, dark emerald.
  Premium minimal, desktop + mobile.
  Overrides Tailwind-heavy markup using .ts-theme prefix and !important.
*/

:root{
  --ts-black:#0b0c0f;
  --ts-ink:#101218;
  --ts-gray:#f3f5f7;
  --ts-gray2:#e7ebf0;
  --ts-border:rgba(16,18,24,.12);
  --ts-emerald:#0b4f3f;
  --ts-emerald2:#0f6a54;
  --ts-text:#0f1220;
  --ts-muted:rgba(15,18,32,.62);
  --ts-white:#ffffff;
  --ts-radius:18px;
  --ts-radius-sm:14px;
  --ts-shadow:0 18px 50px rgba(10,12,15,.08);
  --ts-shadow2:0 8px 22px rgba(10,12,15,.10);
  --ts-focus:0 0 0 4px rgba(11,79,63,.18);
}

/* Base */
.ts-theme{
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif !important;
  color: var(--ts-text) !important;
  background: radial-gradient(1200px 600px at 20% 0%, #ffffff 0%, var(--ts-gray) 55%, var(--ts-gray2) 100%) !important;
  min-height: 100vh;
}

.ts-theme a{ color: inherit; text-decoration: none; }
.ts-theme a:hover{ color: var(--ts-emerald); }

.ts-container{ max-width: 1200px; margin: 0 auto; padding: 0 18px; }

/* Normalize common Tailwind whites */
.ts-theme .bg-white{ background: var(--ts-white) !important; }
.ts-theme .text-gray-500,
.ts-theme .text-gray-600{ color: var(--ts-muted) !important; }

/* Cards / surfaces */
.ts-theme .shadow,
.ts-theme .shadow-md,
.ts-theme .shadow-lg,
.ts-theme .shadow-xl,
.ts-theme .shadow-2xl{
  box-shadow: var(--ts-shadow2) !important;
}

.ts-theme .rounded,
.ts-theme .rounded-lg,
.ts-theme .rounded-xl,
.ts-theme .rounded-2xl{
  border-radius: var(--ts-radius) !important;
}

.ts-theme .border,
.ts-theme .border-gray-200,
.ts-theme .border-gray-300{
  border-color: var(--ts-border) !important;
}

/* Buttons */
.ts-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--ts-border);
  background: var(--ts-white);
  color: var(--ts-text);
  font-weight: 600;
  letter-spacing: .2px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
  box-shadow: 0 8px 18px rgba(10,12,15,.06);
}
.ts-btn:hover{ transform: translateY(-1px); box-shadow: 0 14px 28px rgba(10,12,15,.10); border-color: rgba(11,79,63,.28); }
.ts-btn:active{ transform: translateY(0); }

.ts-btn--ghost{
  background: transparent;
  box-shadow: none;
  border-color: transparent;
}
.ts-btn--ghost:hover{ background: rgba(16,18,24,.04); border-color: rgba(16,18,24,.10); box-shadow: none; }

.ts-btn--accent{
  background: linear-gradient(180deg, var(--ts-emerald2), var(--ts-emerald));
  border-color: rgba(11,79,63,.55);
  color: #fff;
  box-shadow: 0 16px 30px rgba(11,79,63,.18);
}
.ts-btn--accent:hover{ border-color: rgba(11,79,63,.75); box-shadow: 0 20px 44px rgba(11,79,63,.22); }

/* Inputs */
.ts-theme input,
.ts-theme select,
.ts-theme textarea{
  border-radius: 14px !important;
  border: 1px solid var(--ts-border) !important;
  background: rgba(255,255,255,.92) !important;
  color: var(--ts-text) !important;
}
.ts-theme input:focus,
.ts-theme select:focus,
.ts-theme textarea:focus{
  outline: none !important;
  box-shadow: var(--ts-focus) !important;
  border-color: rgba(11,79,63,.55) !important;
}

/* Header */
.ts-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11,12,15,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.10);
  color: #fff;
}
.ts-topbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
}
.ts-brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}
.ts-brand__mark{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #1aa27f, var(--ts-emerald));
  box-shadow: 0 0 0 4px rgba(11,79,63,.35);
}
.ts-brand__name{
  font-family: "Playfair Display", serif;
  font-weight: 700;
  letter-spacing: .4px;
}

.ts-actions{ display: inline-flex; align-items: center; gap: 10px; }
.ts-nav-desktop{ display: none; gap: 18px; align-items: center; margin-right: 4px; }
@media (min-width: 1024px){
  .ts-nav-desktop{ display: inline-flex; }
}
.ts-navlink{
  color: rgba(255,255,255,.86);
  font-weight: 600;
  letter-spacing: .2px;
  padding: 8px 10px;
  border-radius: 999px;
  transition: background .15s ease, color .15s ease;
}
.ts-navlink:hover{ background: rgba(255,255,255,.08); color: #fff; }

.ts-iconbtn{
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.ts-iconbtn:hover{ transform: translateY(-1px); background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.22); }

.ts-badge{
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, #1aa27f, var(--ts-emerald));
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
  border: 1px solid rgba(255,255,255,.35);
}

.ts-burger{
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-left: 2px;
}
.ts-burger span{
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: rgba(255,255,255,.92);
}
@media (min-width: 1024px){
  .ts-burger{ display: none; }
}

/* Mobile nav */
.ts-nav-mobile{
  padding: 12px 0 16px;
  border-top: 1px solid rgba(255,255,255,.10);
  display: grid;
  gap: 8px;
}
.ts-nav-mobile .ts-navlink{
  display: block;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
}

/* Search overlay */
.ts-search{
  margin: 10px 0 16px;
  padding: 12px;
  border-radius: var(--ts-radius);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
}
.ts-search__form{
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
}
.ts-search__input{
  width: 100%;
  padding: 12px 14px;
  border-radius: 999px !important;
  border: 1px solid rgba(255,255,255,.20) !important;
  background: rgba(0,0,0,.18) !important;
  color: #fff !important;
}
.ts-search__input::placeholder{ color: rgba(255,255,255,.70); }
@media (max-width: 640px){
  .ts-search__form{ grid-template-columns: 1fr; }
  .ts-search__input{ border-radius: 14px !important; }
  .ts-btn{ width: 100%; }
}

/* Hide extra search forms on homepage to avoid duplicates */
.ts-theme form[action$="search.php"].max-w-2xl{ display: none !important; }

/* Main */
.ts-main{ padding: 18px 0 46px; }

/* Product cards (generic improvements) */
.ts-theme .group,
.ts-theme .product-card,
.ts-theme .card{
  border-radius: var(--ts-radius) !important;
}
.ts-theme img{ border-radius: 14px; }

/* Tables (cart/orders) */
.ts-theme table{
  background: var(--ts-white);
  border-radius: var(--ts-radius);
  overflow: hidden;
}
.ts-theme th{
  background: rgba(16,18,24,.04);
  color: rgba(15,18,32,.78);
  font-weight: 700;
}
.ts-theme td, .ts-theme th{
  border-color: var(--ts-border) !important;
}

/* Footer */
.ts-footer{
  background: var(--ts-black);
  color: rgba(255,255,255,.88);
  border-top: 1px solid rgba(255,255,255,.10);
}
.ts-footer__grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  padding: 30px 0;
}
@media (min-width: 900px){
  .ts-footer__grid{ grid-template-columns: 1.4fr 1fr 1fr; gap: 38px; padding: 44px 0; }
}
.ts-footer__brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.ts-footer__text{ color: rgba(255,255,255,.70); margin-top: 10px; line-height: 1.7; }
.ts-footer__title{
  font-weight: 800;
  letter-spacing: .2px;
  margin-bottom: 10px;
}
.ts-footer__links a{
  display: block;
  padding: 8px 0;
  color: rgba(255,255,255,.78);
}
.ts-footer__links a:hover{ color: #fff; }
.ts-footer__bottom{
  padding: 14px 0 18px;
  border-top: 1px solid rgba(255,255,255,.10);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  color: rgba(255,255,255,.68);
}
.ts-footer__muted{ color: rgba(255,255,255,.62); }

/* Popover */
.ts-popover{
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 220px;
  background: var(--ts-white);
  border: 1px solid var(--ts-border);
  border-radius: 16px;
  box-shadow: var(--ts-shadow);
  overflow: hidden;
  color: var(--ts-text);
}
.ts-popover__item{
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(16,18,24,.06);
}
.ts-popover__item:hover{ background: rgba(11,79,63,.06); }
.ts-popover__item:last-child{ border-bottom: none; }
.ts-danger{ color: #b42318; }

/* Accessible helper */
.ts-sr-only{
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Filter accordion (generic) */
.ts-filter-more{ margin-top: 10px; }
.ts-filter-toggle{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--ts-border);
  background: rgba(16,18,24,.02);
  font-weight: 700;
}
.ts-filter-panel{
  padding: 10px 0 0;
}


/* ================================
   PAGE LAYOUT (Home / Catalog / Discounts)
   Applies only to non-default theme via .ts-theme--emerald_lux
==================================*/
.ts-theme--emerald_lux .ts-page{
  padding: 18px 0 48px;
}
.ts-theme--emerald_lux .container{
  max-width: 1220px !important;
}
.ts-theme--emerald_lux .ts-page h2,
.ts-theme--emerald_lux .ts-page h1{
  letter-spacing: .2px;
}
.ts-theme--emerald_lux .ts-page h2{
  font-size: 20px !important;
  font-weight: 700 !important;
  margin: 10px 0 14px !important;
}
.ts-theme--emerald_lux .ts-page h2::after{
  content:"";
  display:block;
  height:2px;
  width:72px;
  margin-top:10px;
  background: linear-gradient(90deg,var(--ts-emerald2), rgba(11,79,63,.0));
  border-radius: 999px;
}

/* Hide duplicate search forms inside pages (keep header search) */
.ts-theme--emerald_lux .ts-page form[action="search.php"]{
  display:none !important;
}

/* PRODUCT CARDS (catalog + home) */
.ts-theme--emerald_lux .ts-page .grid > div.bg-white{
  background: rgba(255,255,255,.92) !important;
  border: 1px solid var(--ts-border) !important;
  box-shadow: 0 10px 28px rgba(16,18,24,.10) !important;
}
.ts-theme--emerald_lux .ts-page .grid > div.bg-white:hover{
  transform: translateY(-2px) !important;
  box-shadow: 0 16px 36px rgba(16,18,24,.14) !important;
}
.ts-theme--emerald_lux .ts-page .grid img{
  border-radius: 14px !important;
}

/* FILTERS: make sidebar premium + accordion styling */
.ts-theme--emerald_lux .ts-catalog form.space-y-4{
  background: rgba(255,255,255,.86) !important;
  border: 1px solid var(--ts-border) !important;
  border-radius: 16px !important;
  padding: 14px !important;
  box-shadow: 0 10px 26px rgba(16,18,24,.08) !important;
}
.ts-theme--emerald_lux .ts-accordion{
  border: 1px solid var(--ts-border) !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  background: rgba(255,255,255,.9) !important;
}
.ts-theme--emerald_lux .ts-accordion summary{
  cursor: pointer;
  list-style: none;
  padding: 12px 12px;
  font-weight: 700;
  color: rgba(15,18,32,.78);
}
.ts-theme--emerald_lux .ts-accordion summary::-webkit-details-marker{display:none;}
.ts-theme--emerald_lux .ts-accordion summary::after{
  content:"▾";
  float:right;
  opacity:.7;
  transition: transform .18s ease;
}
.ts-theme--emerald_lux .ts-accordion[open] summary::after{transform: rotate(180deg);}
.ts-theme--emerald_lux .ts-accordion__body{ padding: 10px 12px 12px; }

/* Mobile: filters become a drawer-like block */
@media (max-width: 860px){
  .ts-theme--emerald_lux .ts-page{ padding-top: 12px; }
  .ts-theme--emerald_lux .ts-catalog .flex.flex-col.md\:flex-row{
    gap: 14px !important;
  }
  .ts-theme--emerald_lux .ts-catalog .md\:w-1\/4{
    width: 100% !important;
  }
  .ts-theme--emerald_lux .ts-catalog .md\:w-3\/4{
    width: 100% !important;
  }
  .ts-theme--emerald_lux .ts-catalog .ts-accordion summary{
    padding: 14px 12px;
  }
}

/* Home: slider looks like jewelry hero */
.ts-theme--emerald_lux .ts-home .swiper-container,
.ts-theme--emerald_lux .ts-home .swiper{
  border-radius: 18px !important;
  overflow:hidden !important;
  box-shadow: 0 18px 48px rgba(16,18,24,.14) !important;
  border: 1px solid rgba(255,255,255,.10) !important;
}
.ts-theme--emerald_lux .ts-home .swiper-button-next,
.ts-theme--emerald_lux .ts-home .swiper-button-prev{
  color: rgba(255,255,255,.92) !important;
}

/* Discounts page: treat cards like premium offers */
.ts-theme--emerald_lux .ts-discounts .grid > div.bg-white{
  position: relative;
}
.ts-theme--emerald_lux .ts-discounts .grid > div.bg-white::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius: 16px;
  background: radial-gradient(1200px 220px at 20% 0%, rgba(15,106,84,.10), rgba(255,255,255,0));
  pointer-events:none;
}
