/* =====================================================
   MOON LILY LLC — Global Styles
   Modern, clean e-commerce styling
   ===================================================== */

:root {
  --primary: #0f172a;        /* deep slate */
  --primary-dark: #020617;
  --accent: #c89b3c;         /* warm gold */
  --accent-dark: #a87f23;
  --bg: #fafaf7;
  --surface: #ffffff;
  --muted: #6b7280;
  --border: #e5e7eb;
  --danger: #dc2626;
  --success: #16a34a;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .04);
  --shadow: 0 4px 16px rgba(15, 23, 42, .08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, .12);
  --radius: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--primary);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  color: var(--primary);
}

.btn { border-radius: 8px; font-weight: 600; padding: .6rem 1.2rem; transition: all .25s; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }
.btn-lg { padding: .85rem 1.8rem; font-size: 1rem; }

/* ---------- NAVBAR ---------- */
.ml-navbar {
  background: #fff;
  box-shadow: var(--shadow-sm);
  padding: .85rem 0;
  border-bottom: 1px solid var(--border);
}
.navbar-brand {
  display: flex !important;
  align-items: center;
  gap: .65rem;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--primary) !important;
  letter-spacing: .5px;
}
.brand-mark {
  display: inline-flex;
  width: 38px;
  height: 38px;
  background: var(--primary);
  color: var(--accent);
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .5px;
}
.brand-text small { color: var(--accent); font-size: .65rem; letter-spacing: 2px; display: block; line-height: 1; }
.nav-link {
  font-weight: 500;
  color: var(--primary) !important;
  padding: .5rem 1rem !important;
  position: relative;
  font-size: .95rem;
}
.nav-link:hover { color: var(--accent) !important; }
.nav-link.active { color: var(--accent) !important; }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: .35rem;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  font-size: .7rem;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  margin-left: 4px;
  padding: 0 6px;
}

/* ---------- ANNOUNCEMENT BAR ---------- */
.ml-announce {
  background: var(--primary);
  color: #fff;
  text-align: center;
  font-size: .82rem;
  padding: .5rem 1rem;
  letter-spacing: .3px;
}
.ml-announce strong { color: var(--accent); }

/* ---------- HERO BANNER ---------- */
.ml-hero {
  position: relative;
  min-height: 580px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.ml-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(15, 23, 42, .85) 0%, rgba(15, 23, 42, .45) 50%, rgba(15, 23, 42, .15) 100%);
}
.ml-hero .container { position: relative; z-index: 2; }
.ml-hero h1 {
  color: #fff;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.1;
  margin-bottom: 1.2rem;
  text-shadow: 0 2px 24px rgba(0,0,0,.3);
}
.ml-hero p.lead {
  font-size: 1.15rem;
  max-width: 540px;
  margin-bottom: 2rem;
  opacity: .95;
}
.ml-hero .badge-pill {
  display: inline-block;
  background: rgba(200, 155, 60, .15);
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: .3rem 1rem;
  border-radius: 999px;
  font-size: .75rem;
  letter-spacing: 2px;
  font-weight: 600;
  margin-bottom: 1.2rem;
}

/* ---------- SECTION TITLES ---------- */
.section {
  padding: 5rem 0;
}
.section-sm { padding: 3rem 0; }
.section-title {
  text-align: center;
  margin-bottom: 3rem;
}
.section-title span.eyebrow {
  color: var(--accent);
  font-size: .8rem;
  letter-spacing: 3px;
  font-weight: 600;
  text-transform: uppercase;
  display: block;
  margin-bottom: .5rem;
}
.section-title h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin: 0;
}
.section-title p {
  color: var(--muted);
  margin-top: 1rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- FEATURE BAR ---------- */
.feature-bar {
  background: #fff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0;
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.feature-item i {
  font-size: 1.8rem;
  color: var(--accent);
  flex: 0 0 auto;
}
.feature-item strong { display: block; font-size: .95rem; }
.feature-item span { font-size: .8rem; color: var(--muted); }

/* ---------- PRODUCT CARDS ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }

.product-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s;
  position: relative;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.product-card .img-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f3f4f6;
}
.product-card .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .5s;
  display: block;
}
.product-card:hover .img-wrap img {
  transform: scale(1.06);
}
.product-card .badge-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent);
  color: #fff;
  font-size: .68rem;
  padding: .3rem .65rem;
  border-radius: 4px;
  letter-spacing: 1px;
  font-weight: 700;
  z-index: 2;
}
.product-card .badge-tag.sale { background: var(--danger); }
.product-card .quick-actions {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  opacity: 0;
  transition: all .3s;
  display: flex;
  gap: 6px;
  z-index: 2;
}
.product-card:hover .quick-actions {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.product-card .quick-actions .btn {
  background: #fff;
  color: var(--primary);
  border: none;
  font-size: .85rem;
  padding: .55rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: var(--shadow);
}
.product-card .quick-actions .btn:hover { background: var(--accent); color: #fff; }
.product-card .body {
  padding: 1rem 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  flex: 1;
}
.product-card .category {
  font-size: .7rem;
  letter-spacing: 1.5px;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
}
.product-card .title {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--primary);
  line-height: 1.35;
  min-height: 2.7em;
}
.product-card .title a { color: inherit; }
.product-card .rating { font-size: .8rem; color: #f59e0b; }
.product-card .rating span { color: var(--muted); margin-left: 4px; }
.product-card .price-row {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  margin-top: .2rem;
}
.product-card .price { font-size: 1.15rem; font-weight: 700; color: var(--primary); }
.product-card .price-old { font-size: .9rem; color: var(--muted); text-decoration: line-through; }

/* ---------- CATEGORY BANNERS ---------- */
.category-card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow);
}
.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s;
  display: block;
}
.category-card:hover img { transform: scale(1.05); }
.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, .75) 0%, transparent 60%);
}
.category-card .overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  color: #fff;
}
.category-card h3 {
  color: #fff;
  margin: 0 0 .25rem;
  font-size: 1.4rem;
}
.category-card .overlay span { font-size: .85rem; opacity: .9; }

/* ---------- ABOUT INTRO ---------- */
.about-intro img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.about-intro h2 { margin-bottom: 1.2rem; }
.about-intro p { color: var(--muted); margin-bottom: 1rem; }

/* ---------- PRODUCT DETAIL ---------- */
.pd-gallery .main-img-wrap {
  background: #fff;
  border-radius: var(--radius);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
}
.pd-gallery .main-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pd-gallery .thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: .55rem;
}
.pd-gallery .thumb {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  background: #fff;
  transition: border-color .2s;
}
.pd-gallery .thumb.active { border-color: var(--accent); }
.pd-gallery .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pd-info h1 { font-size: 1.9rem; margin-bottom: .5rem; }
.pd-info .price-row { font-size: 1.4rem; margin: 1rem 0; }
.pd-info .price-row .sale { color: var(--danger); font-weight: 700; font-size: 1.8rem; }
.pd-info .price-row .old { color: var(--muted); text-decoration: line-through; margin-left: .65rem; font-size: 1.1rem; }
.pd-info .price-row .save { background: #fee2e2; color: var(--danger); padding: .15rem .6rem; border-radius: 6px; font-size: .8rem; margin-left: .65rem; font-weight: 600; }
.pd-info .stars { color: #f59e0b; }
.pd-info .stars + span { color: var(--muted); margin-left: 6px; }
.pd-info .variant-block { margin: 1.5rem 0; }
.pd-info .variant-block label.var-label { font-weight: 600; font-size: .9rem; display: block; margin-bottom: .5rem; }
.pd-info .variant-block label.var-label span { color: var(--muted); font-weight: 400; margin-left: .35rem; }
.option-pill {
  display: inline-block;
  border: 1px solid var(--border);
  background: #fff;
  padding: .5rem 1rem;
  border-radius: 8px;
  margin: 0 .35rem .4rem 0;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 500;
  transition: all .2s;
}
.option-pill:hover { border-color: var(--primary); }
.option-pill.selected {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.qty-control button {
  background: #fff;
  border: none;
  padding: .55rem .9rem;
  font-size: 1rem;
  cursor: pointer;
  color: var(--primary);
}
.qty-control button:hover { background: #f3f4f6; }
.qty-control input {
  border: none;
  width: 48px;
  text-align: center;
  font-weight: 600;
  outline: none;
}
.pd-info .feature-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}
.pd-info .feature-list li {
  padding: .35rem 0;
  color: var(--muted);
}
.pd-info .feature-list li i {
  color: var(--success);
  margin-right: .55rem;
}

/* ---------- CART ---------- */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table thead {
  background: #f9fafb;
  font-size: .8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}
.cart-table th, .cart-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.cart-item-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
}
.cart-item-name { font-weight: 600; }
.cart-item-meta { font-size: .8rem; color: var(--muted); }
.summary-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 90px;
}
.summary-card h4 { font-size: 1.2rem; margin-bottom: 1.2rem; }
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: .55rem 0;
  font-size: .95rem;
  border-bottom: 1px dashed var(--border);
}
.summary-row.total {
  font-size: 1.2rem;
  font-weight: 700;
  border-bottom: none;
  padding-top: 1rem;
  border-top: 2px solid var(--primary);
  margin-top: .5rem;
}

/* ---------- POLICY PAGES ---------- */
.policy-page {
  background: #fff;
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}
.policy-page h1 { margin-bottom: .5rem; }
.policy-page .updated { color: var(--muted); font-size: .85rem; margin-bottom: 2rem; }
.policy-page h2, .policy-page h3 { margin-top: 2rem; margin-bottom: .8rem; font-size: 1.3rem; }
.policy-page p, .policy-page li { color: #374151; }
.policy-page ul { padding-left: 1.25rem; }
.policy-page ul li { margin-bottom: .5rem; }

/* ---------- CONTACT ---------- */
.contact-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  height: 100%;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .75rem;
  transition: transform .25s, box-shadow .25s;
}
.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.contact-card .icon {
  display: inline-flex;
  width: 52px;
  height: 52px;
  background: rgba(200,155,60,.12);
  color: var(--accent);
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1.4rem;
}
.contact-card h5 { margin: 0; font-size: 1.05rem; }
.contact-card p { margin: 0; color: var(--muted); font-size: .95rem; }

.contact-form-wrap {
  background: #fff;
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}
.form-label { font-weight: 500; font-size: .9rem; }
.form-control, .form-select {
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: .65rem .85rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 .15rem rgba(200,155,60,.18);
}

/* ---------- BREADCRUMB ---------- */
.ml-breadcrumb {
  background: #f3f4f6;
  padding: 1.2rem 0;
  font-size: .85rem;
  color: var(--muted);
}
.ml-breadcrumb a { color: var(--muted); }
.ml-breadcrumb a:hover { color: var(--accent); }
.ml-breadcrumb .sep { margin: 0 .5rem; opacity: .5; }

/* ---------- FILTER BAR ---------- */
.filter-bar {
  background: #fff;
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}
.filter-bar .filter-tab {
  border: 1px solid var(--border);
  background: #fff;
  padding: .4rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: .85rem;
  font-weight: 500;
  transition: all .2s;
}
.filter-bar .filter-tab:hover { border-color: var(--primary); }
.filter-bar .filter-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ---------- FOOTER ---------- */
.ml-footer {
  background: var(--primary);
  color: #d1d5db;
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}
.ml-footer .footer-brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: #fff;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.3rem;
}
.ml-footer .footer-brand small { color: var(--accent); font-size: .65rem; letter-spacing: 2px; display: block; line-height: 1; }
.ml-footer h3, .ml-footer h4, .ml-footer h5, .ml-footer h6 { color: #fff; }
.ml-footer .footer-title {
  font-family: 'Inter', sans-serif;
  font-size: .85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1.2rem;
}
.ml-footer .footer-links li { margin-bottom: .55rem; }
.ml-footer .footer-links a { color: #9ca3af; font-size: .9rem; }
.ml-footer .footer-links a:hover { color: var(--accent); }
.ml-footer .footer-contact { margin-top: 1rem; }
.ml-footer .footer-contact li { margin-bottom: .55rem; color: #9ca3af; font-size: .88rem; }
.ml-footer .footer-contact i { color: var(--accent); margin-right: .5rem; }
.ml-footer .footer-contact a { color: #9ca3af; }
.ml-footer .footer-contact a:hover { color: var(--accent); }
.ml-footer .text-muted { color: #9ca3af !important; }
.ml-footer hr { border-color: rgba(255,255,255,.1); }
.ml-footer .social-links { display: flex; gap: .75rem; }
.ml-footer .social-links a {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.07);
  color: #fff;
  border-radius: 50%;
  font-size: .95rem;
  transition: all .25s;
}
.ml-footer .social-links a:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-3px);
}
.payment-icons { display: flex; gap: .75rem; font-size: 1.4rem; color: #9ca3af; }
.footer-subscribe .form-control { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); color: #fff; }
.footer-subscribe .form-control::placeholder { color: #9ca3af; }
.footer-subscribe .btn-primary { background: var(--accent); border-color: var(--accent); }
.footer-subscribe .btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

/* ---------- PAGE HEADER ---------- */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, #1e293b 100%);
  color: #fff;
  padding: 4rem 0 3rem;
  text-align: center;
}
.page-header h1 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: .5rem;
}
.page-header p { color: rgba(255,255,255,.85); margin: 0; }

/* ---------- TOAST ---------- */
.toast-host {
  position: fixed;
  top: 90px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  pointer-events: none;
}
.toast-msg {
  background: #fff;
  border-radius: 10px;
  padding: .85rem 1.2rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--success);
  font-size: .9rem;
  font-weight: 500;
  min-width: 260px;
  transform: translateX(120%);
  transition: transform .35s cubic-bezier(.2,.9,.3,1.2);
  pointer-events: auto;
}
.toast-msg.show { transform: translateX(0); }
.toast-msg i { font-size: 1.2rem; color: var(--success); }
.toast-msg.toast-error { border-left-color: var(--danger); }
.toast-msg.toast-error i { color: var(--danger); }
.toast-msg.toast-info { border-left-color: #2563eb; }
.toast-msg.toast-info i { color: #2563eb; }

/* ---------- EMPTY STATE ---------- */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--muted);
}
.empty-state i {
  font-size: 4rem;
  color: var(--border);
  display: block;
  margin-bottom: 1rem;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 991px) {
  .ml-hero { min-height: 460px; }
  .section { padding: 3.5rem 0; }
  .navbar-collapse { padding: 1rem 0; }
  .nav-link { padding: .65rem .25rem !important; }
}
@media (max-width: 575px) {
  .ml-hero { min-height: 400px; text-align: center; }
  .ml-hero .badge-pill { margin-left: auto; margin-right: auto; }
  .policy-page { padding: 1.5rem; }
  .contact-form-wrap { padding: 1.5rem; }
  .summary-card { position: static; }
  .cart-table thead { display: none; }
  .cart-table, .cart-table tbody, .cart-table tr, .cart-table td { display: block; width: 100%; }
  .cart-table tr {
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 1rem;
    padding: 1rem;
  }
  .cart-table td { border: none; padding: .35rem 0; }
}
