/* EvyStore design round 2: mega menu, search, quick view, sticky bar, recently viewed,
   skeletons, zoom, confetti, and the dark theme. Loaded after evy.css. */
:root { --evy-bg: #ffffff; --evy-surface: #ffffff; --evy-overlay: rgba(17, 17, 20, .45); }

/* Header extras */
.evy-caret { font-size: 10px; opacity: .6; margin-left: 2px; }
.evy-theme-btn { font-size: 19px; color: var(--evy-ink); }
.evy-theme-btn .evy-moon { display: none; }
html[data-theme="dark"] .evy-theme-btn .evy-sun { display: none; }
html[data-theme="dark"] .evy-theme-btn .evy-moon { display: inline; }

/* Card top: image, quick view, heart */
.evy-card-top { position: relative; }
.evy-quick-btn { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 2; border: 0; border-radius: 999px; background: rgba(17, 17, 20, .86); color: #fff; font-size: 13px; font-weight: 600; letter-spacing: .04em; padding: 10px; opacity: 0; transform: translateY(8px); transition: opacity .25s var(--evy-ease), transform .25s var(--evy-ease); backdrop-filter: blur(6px); }
.evy-quick-btn:focus-visible { opacity: 1; transform: none; }
@media (hover: hover) { .evy-card:hover .evy-quick-btn { opacity: 1; transform: none; } }
@media (hover: none) { .evy-quick-btn { display: none; } }

/* Mega menu */
.evy-mega { position: absolute; left: 0; right: 0; top: 100%; background: var(--evy-surface); border-top: 1px solid var(--evy-line); box-shadow: 0 30px 60px rgba(0, 0, 0, .12); opacity: 0; transform: translateY(-8px); transition: opacity .22s var(--evy-ease), transform .22s var(--evy-ease); }
.evy-mega.open { opacity: 1; transform: none; }
.evy-mega-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; padding: 30px 12px 34px; }
.evy-mega-cats { display: grid; gap: 8px; align-content: start; }
.evy-mega-cat { display: flex; gap: 14px; align-items: center; padding: 10px; border-radius: 16px; text-decoration: none; color: var(--evy-ink); transition: background .2s; }
.evy-mega-cat:hover { background: var(--evy-soft); color: var(--evy-ink); }
.evy-mega-cat img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--evy-soft); }
.evy-mega-cat strong { display: block; font-size: 17px; }
.evy-mega-cat small { color: var(--evy-muted); }
.evy-mega-cats .evy-link { margin: 8px 10px 0; justify-self: start; }
.evy-mega-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.evy-mega-pick { text-decoration: none; color: var(--evy-ink); display: flex; flex-direction: column; gap: 4px; }
.evy-mega-pick img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 18px; background: var(--evy-soft); transition: transform .4s var(--evy-ease); margin-bottom: 6px; }
.evy-mega-pick:hover img { transform: scale(1.03); }
.evy-mega-pick span { color: var(--evy-muted); }

/* Search overlay */
.evy-lock { overflow: hidden; }
.evy-search-layer { position: fixed; inset: 0; z-index: 1060; background: var(--evy-overlay); backdrop-filter: blur(6px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; opacity: 0; transition: opacity .2s; }
.evy-search-layer[hidden] { display: none; }
.evy-search-layer.open { opacity: 1; }
.evy-search-panel { width: 100%; max-width: 640px; background: var(--evy-surface); border-radius: 24px; box-shadow: var(--evy-shadow-lg); overflow: hidden; transform: translateY(-10px) scale(.98); transition: transform .25s var(--evy-ease); }
.evy-search-layer.open .evy-search-panel { transform: none; }
.evy-search-form { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--evy-line); margin: 0; }
.evy-search-form svg { width: 20px; height: 20px; opacity: .55; flex: none; }
.evy-search-form input { flex: 1; border: 0; outline: none; font-size: 20px; background: transparent; color: var(--evy-ink); min-width: 0; }
.evy-search-close { border: 1px solid var(--evy-line); background: var(--evy-soft); color: var(--evy-muted); border-radius: 8px; font-size: 12px; padding: 4px 8px; }
.evy-search-results { max-height: 60vh; overflow-y: auto; padding: 8px; }
.evy-search-hint { color: var(--evy-muted); padding: 14px; margin: 0; }
.evy-search-hit { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 10px 12px; border-radius: 14px; text-decoration: none; color: var(--evy-ink); animation: evy-in .3s var(--evy-ease); }
.evy-search-hit:hover, .evy-search-hit:focus { background: var(--evy-soft); outline: none; color: var(--evy-ink); }
.evy-search-hit img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--evy-soft); }
.evy-search-mid strong { display: block; }
.evy-search-mid small { color: var(--evy-muted); }
.evy-search-price { font-weight: 700; }
.evy-search-all { display: block; padding: 14px 12px; font-weight: 600; color: var(--evy-accent); text-decoration: none; }

/* Quick view */
.evy-quick-content { border: 0; border-radius: 28px; overflow: hidden; background: var(--evy-surface); color: var(--evy-ink); }
.evy-quick-close { position: absolute; right: 18px; top: 18px; z-index: 3; background-color: var(--evy-soft); border-radius: 50%; padding: 10px; opacity: 1; }
.evy-quick { display: grid; grid-template-columns: 1.1fr 1fr; }
.evy-quick-media { background: var(--evy-soft); }
.evy-quick-media > img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.evy-quick-thumbs { display: flex; gap: 8px; padding: 12px; }
.evy-quick-thumbs .evy-thumb { width: 60px; height: 60px; }
.evy-quick-info { padding: 40px 36px; display: flex; flex-direction: column; gap: 8px; }
.evy-quick-title { font-size: 32px; font-weight: 800; letter-spacing: -.03em; text-transform: none; margin: 0; }
.evy-quick-price { display: flex; gap: 10px; align-items: baseline; margin: 6px 0; }
.evy-quick-price strong { font-size: 26px; }
.evy-quick-price s { color: var(--evy-muted); }
.evy-chip-link.off { opacity: .4; text-decoration: line-through; }
.evy-quick .evy-variants .evy-chip-link { background: transparent; }
.evy-quick .evy-variants .evy-chip-link.on { background: var(--evy-ink); color: var(--evy-bg); }
@media (max-width: 767px) { .evy-quick { grid-template-columns: 1fr; } .evy-quick-info { padding: 24px 20px; } }

/* Skeletons and image fade */
.evy-skel { background: linear-gradient(90deg, var(--evy-soft) 25%, var(--evy-line) 37%, var(--evy-soft) 63%); background-size: 400% 100%; animation: evy-skel 1.3s ease infinite; border-radius: 14px; }
.evy-skel-quick { height: 460px; border-radius: 0; }
@keyframes evy-skel { from { background-position: 100% 50%; } to { background-position: 0 50%; } }
img.evy-fade { opacity: 0; transition: opacity .5s var(--evy-ease); }
img.evy-fade.in { opacity: 1; }
#drawer-lines:empty::before, #cart-page:empty::before { content: ""; display: block; height: 84px; margin: 18px 0; border-radius: 14px; background: linear-gradient(90deg, var(--evy-soft) 25%, var(--evy-line) 37%, var(--evy-soft) 63%); background-size: 400% 100%; animation: evy-skel 1.3s ease infinite; }

/* Product image zoom */
.evy-pdp-media img { transition: transform .35s var(--evy-ease); }
@media (hover: hover) { .evy-pdp-media img { cursor: zoom-in; } }
.evy-pdp-media.zoom img { transform: scale(1.8); }

/* Sticky add-to-cart on phones */
.evy-sticky { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 1040; display: none; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; background: var(--evy-surface); border: 1px solid var(--evy-line); border-radius: 20px; box-shadow: var(--evy-shadow-lg); transform: translateY(140%); transition: transform .35s var(--evy-ease); }
.evy-sticky.show { transform: none; }
.evy-sticky img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.evy-sticky-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.evy-sticky-text strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.evy-sticky-text span { color: var(--evy-muted); font-size: 13px; }
.evy-sticky .btn { border-radius: 14px; padding: 10px 18px; }
@media (max-width: 991px) { .evy-sticky { display: flex; } }

/* Recently viewed */
.evy-recent { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 190px); gap: 16px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.evy-mini { scroll-snap-align: start; text-decoration: none; color: var(--evy-ink); display: flex; flex-direction: column; gap: 6px; }
.evy-mini:hover { color: var(--evy-ink); }
.evy-mini-media { display: block; border-radius: 16px; overflow: hidden; background: var(--evy-soft); aspect-ratio: 1; }
.evy-mini-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--evy-ease); }
.evy-mini:hover img { transform: scale(1.05); }
.evy-mini strong { font-size: 14px; font-weight: 600; }
.evy-mini-price { font-weight: 700; font-size: 14px; }
.evy-mini-price s { color: var(--evy-muted); font-weight: 400; }

/* Confetti */
.evy-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 2100; overflow: hidden; }
.evy-confetti i { position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px; animation-name: evy-fall; animation-timing-function: cubic-bezier(.25, .6, .4, 1); animation-fill-mode: forwards; }
.evy-confetti i.round { border-radius: 50%; width: 10px; height: 10px; }
@keyframes evy-fall { to { transform: translate(var(--x), 105vh) rotate(var(--r)); opacity: .9; } }

/* ===== Dark mode ===== */
html[data-theme="dark"] {
  color-scheme: dark;
  --evy-ink: #f2f2f4;
  --evy-soft: #1b1c21;
  --evy-line: #2c2e35;
  --evy-muted: #9a9eab;
  --evy-bg: #0e0f12;
  --evy-surface: #15161a;
  --evy-overlay: rgba(0, 0, 0, .6);
  --evy-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --evy-shadow-lg: 0 24px 60px rgba(0, 0, 0, .6);
  --dark-color: #f2f2f4;
  --light-color: #15161a;
  --light-blue-color: #15161a;
  --gray-color: #1b1c21;
}
html[data-theme="dark"] body { background: var(--evy-bg); color: var(--evy-ink); }
html[data-theme="dark"] h1, html[data-theme="dark"] h2, html[data-theme="dark"] h3,
html[data-theme="dark"] h4, html[data-theme="dark"] h5, html[data-theme="dark"] h6,
html[data-theme="dark"] .text-dark, html[data-theme="dark"] .text-black { color: var(--evy-ink) !important; }
html[data-theme="dark"] p, html[data-theme="dark"] li { color: #c9ccd4; }
html[data-theme="dark"] .text-muted { color: var(--evy-muted) !important; }
html[data-theme="dark"] a { color: var(--evy-ink); }
html[data-theme="dark"] a:hover { color: var(--evy-accent); }
html[data-theme="dark"] label, html[data-theme="dark"] legend, html[data-theme="dark"] .form-label { color: var(--evy-ink); }
html[data-theme="dark"] .site-header.bg-light, html[data-theme="dark"] .site-header.is-scrolled { background: rgba(14, 15, 18, .9) !important; }
html[data-theme="dark"] .announce-bar { background: #000; }
html[data-theme="dark"] .evy-logo, html[data-theme="dark"] .navbar-brand { color: var(--evy-ink) !important; }
html[data-theme="dark"] .nav-link, html[data-theme="dark"] #navbar .nav-link { color: var(--evy-ink) !important; }
html[data-theme="dark"] #navbar .nav-link::after { background: var(--evy-ink); }
html[data-theme="dark"] .evy-pill { border-color: var(--evy-ink); }
html[data-theme="dark"] .site-header svg, html[data-theme="dark"] .evy-add svg, html[data-theme="dark"] .evy-chip svg, html[data-theme="dark"] .evy-search svg, html[data-theme="dark"] .evy-search-form svg { fill: var(--evy-ink); }
@media (max-width: 991px) { html[data-theme="dark"] .offcanvas { background: var(--evy-surface); color: var(--evy-ink); } }
html[data-theme="dark"] .evy-drawer, html[data-theme="dark"] #header-nav .offcanvas.show { background: var(--evy-surface); color: var(--evy-ink); }
@media (min-width: 992px) { html[data-theme="dark"] #header-nav .offcanvas:not(.show) { background: transparent; } }
html[data-theme="dark"] .btn-close { filter: invert(1) grayscale(1) brightness(2); }
html[data-theme="dark"] .evy-hero { background: radial-gradient(1200px 500px at 80% 0%, #1d2230 0%, var(--evy-bg) 60%); }
html[data-theme="dark"] .evy-hero-lead, html[data-theme="dark"] .evy-hero-stats span { color: var(--evy-muted); }
html[data-theme="dark"] .evy-chip { background: rgba(21, 22, 26, .85); border-color: var(--evy-line); color: var(--evy-ink); }
html[data-theme="dark"] .evy-badge { background: rgba(21, 22, 26, .92); color: var(--evy-ink); }
html[data-theme="dark"] .evy-heart { background: rgba(21, 22, 26, .92); color: #6b6f7a; }
html[data-theme="dark"] .evy-heart.on, html[data-theme="dark"] .evy-heart:hover { color: var(--evy-hot); }
html[data-theme="dark"] .evy-add { background: transparent; color: var(--evy-ink); border-color: var(--evy-ink); }
html[data-theme="dark"] .evy-add:hover { background: var(--evy-ink); color: var(--evy-bg); }
html[data-theme="dark"] .evy-add:hover svg { fill: var(--evy-bg); }
html[data-theme="dark"] .btn-dark { background: #f2f2f4; border-color: #f2f2f4; color: #0e0f12; }
html[data-theme="dark"] .btn-dark:hover, html[data-theme="dark"] .btn-dark:focus { background: #fff; border-color: #fff; color: #000; }
html[data-theme="dark"] .btn-outline-dark { color: var(--evy-ink); border-color: var(--evy-ink); }
html[data-theme="dark"] .btn-outline-dark:hover { background: var(--evy-ink); color: var(--evy-bg); }
html[data-theme="dark"] .evy-chip-link { border-color: var(--evy-line); color: var(--evy-ink); }
html[data-theme="dark"] .evy-chip-link.on { background: var(--evy-ink); color: var(--evy-bg); border-color: var(--evy-ink); }
html[data-theme="dark"] .evy-variant input:checked + span { background: var(--evy-ink); color: var(--evy-bg); }
html[data-theme="dark"] .form-control, html[data-theme="dark"] .form-select,
html[data-theme="dark"] .evy-search input, html[data-theme="dark"] .evy-sort, html[data-theme="dark"] .evy-coupon input,
html[data-theme="dark"] .evy-qty input { background-color: var(--evy-soft); color: var(--evy-ink); border-color: var(--evy-line); }
html[data-theme="dark"] .evy-qty { border-color: var(--evy-line); }
html[data-theme="dark"] .evy-qty input { background: transparent; }
html[data-theme="dark"] input::placeholder, html[data-theme="dark"] textarea::placeholder { color: #6b6f7a; }
html[data-theme="dark"] .evy-sub { background: var(--evy-soft); border-color: var(--evy-ink); }
html[data-theme="dark"] .evy-sub input { color: var(--evy-ink); }
html[data-theme="dark"] .evy-sub button, html[data-theme="dark"] .evy-coupon button { background: var(--evy-ink); color: var(--evy-bg); }
html[data-theme="dark"] .evy-qty button { color: var(--evy-ink); }
html[data-theme="dark"] .evy-summary, html[data-theme="dark"] .evy-acct-tile, html[data-theme="dark"] .evy-ship { background: var(--evy-soft); }
html[data-theme="dark"] .evy-ship progress { background: var(--evy-line); }
html[data-theme="dark"] .evy-ship progress::-webkit-progress-bar { background: var(--evy-line); }
html[data-theme="dark"] .evy-order, html[data-theme="dark"] .evy-review, html[data-theme="dark"] .evy-line, html[data-theme="dark"] .evy-drawer .offcanvas-header, html[data-theme="dark"] .evy-drawer-foot { border-color: var(--evy-line); }
html[data-theme="dark"] .evy-success { background: #0f2a1f; border-color: #1f5c43; }
html[data-theme="dark"] .evy-status { background: var(--evy-soft); }
html[data-theme="dark"] .evy-status.paid, html[data-theme="dark"] .evy-status.ordered { background: #15303d; }
html[data-theme="dark"] .evy-status.shipped { background: #2a2147; }
html[data-theme="dark"] .evy-status.delivered { background: #0f2a1f; }
html[data-theme="dark"] .evy-status.pending { background: #3a2c10; }
html[data-theme="dark"] .evy-status.cancelled, html[data-theme="dark"] .evy-status.refunded { background: #3d1520; }
html[data-theme="dark"] .evy-save { background: #3d1520; color: #ff8aa0; }
html[data-theme="dark"] .evy-toast, html[data-theme="dark"] .evy-flash { background: #f2f2f4; color: #0e0f12; }
html[data-theme="dark"] .modal-backdrop.show { opacity: .7; }
html[data-theme="dark"] #footer, html[data-theme="dark"] #footer-bottom { background: var(--evy-bg); color: var(--evy-muted); }
html[data-theme="dark"] #footer hr { border-color: var(--evy-line); opacity: 1; }
html[data-theme="dark"] .card-wrap img { border-radius: 4px; }
html[data-theme="dark"] .evy-promo-box { background: linear-gradient(120deg, #000 0%, #1d2a33 55%, #3c6a80 130%); }
html[data-theme="dark"] .evy-hero-art img, html[data-theme="dark"] .evy-promo-box img { filter: drop-shadow(0 40px 50px rgba(0, 0, 0, .7)); }
html[data-theme="dark"] .evy-trust { border-color: var(--evy-line); }
html[data-theme="dark"] .evy-crumbs a { color: var(--evy-muted); }
html[data-theme="dark"] hr { border-color: var(--evy-line); opacity: 1; }

/* Keep the desktop menu on one line now that the header holds more icons */
#navbar .nav-link { white-space: nowrap; }
@media (min-width: 992px) and (max-width: 1299px) {
  #navbar .nav-link.me-4 { margin-right: .9rem !important; }
  #navbar .nav-link { font-size: 13px; }
}

/* Phones: keep logo and the four header icons on one row */
@media (max-width: 991px) {
  #header-nav { flex-wrap: nowrap; }
  #header-nav > .container-fluid { flex-wrap: nowrap; gap: 6px; }
  #header-nav .navbar-brand.evy-logo { margin-right: auto; }
}
@media (max-width: 420px) {
  .evy-logo { font-size: 22px; }
  .evy-icon-btn { width: 38px; height: 38px; }
  .evy-icon-btn svg { width: 20px; height: 20px; }
  .evy-icon-btn.navbar-toggler svg { width: 26px; height: 26px; }
  #header-nav { padding-left: 10px !important; padding-right: 10px !important; }
}
