/* ==========================================================
   Base styles shared by every page: tokens, header, mega menu,
   footer, product cards, buttons and toast.
   ========================================================== */

:root {
  --pink: #ff3f6c;
  --pink-hover: #ff527b;
  --text: #282c3f;
  --text-2: #535766;
  --text-3: #7e818c;
  --muted: #94969f;
  --border: #eaeaec;
  --border-2: #d4d5d9;
  --bg: #ffffff;
  --bg-soft: #f5f5f6;
  --bg-footer: #fafbfc;
  --orange: #ff905a;
  --green: #03a685;
  --teal: #14958f;

  --men: #ee5f73;
  --women: #fb56c1;
  --kids: #f26a10;
  --home: #f2c210;
  --beauty: #0db7af;
  --genz: #ff3f6c;

  --header-h: 80px;
  --shadow-header: 0 4px 12px 0 rgba(0, 0, 0, 0.05);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Assistant", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

img {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, p {
  margin: 0;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 44px;
  padding: 0 24px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: background-color 0.15s, border-color 0.15s;
}

.btn-primary {
  background: var(--pink);
  color: #fff;
  border: 1px solid var(--pink);
}

.btn-primary:hover {
  background: var(--pink-hover);
  border-color: var(--pink-hover);
}

.btn-outline {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border-2);
}

.btn-outline:hover {
  border-color: var(--text);
}

.btn-link {
  color: var(--pink);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
}

/* ---------------- Demo banner ---------------- */

.demo-banner {
  padding: 6px 16px;
  background: var(--text);
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

/* ---------------- Header ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: #fff;
  box-shadow: var(--shadow-header);
}

.header-inner {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 4%;
  max-width: 1800px;
  margin: 0 auto;
}

.menu-toggle {
  display: none;
  margin-right: 12px;
  padding: 6px;
}

.logo {
  display: flex;
  align-items: center;
  margin-right: 36px;
  flex: none;
}

.logo svg {
  width: 53px;
  height: 36px;
}

.main-nav {
  display: flex;
  height: 100%;
}

.nav-item {
  position: static;
  height: 100%;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 17px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--text);
  border-bottom: 4px solid transparent;
}

.nav-link sup {
  position: absolute;
  top: 22px;
  right: -2px;
  font-size: 10px;
  color: var(--pink);
  letter-spacing: 0;
}

.nav-item:hover .nav-link,
.nav-item.is-open .nav-link {
  border-bottom-color: var(--accent);
}

/* Mega menu */
.mega-menu {
  position: absolute;
  left: 4%;
  right: 4%;
  top: var(--header-h);
  max-width: 1200px;
  margin: 0 auto;
  display: none;
  background: #fff;
  box-shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.08);
  border-top: 1px solid var(--border);
}

.nav-item:hover .mega-menu,
.nav-item:focus-within .mega-menu,
.nav-item.is-open .mega-menu {
  display: flex;
}

.mega-col {
  flex: 1;
  padding: 24px 22px 28px;
  min-height: 380px;
}

.mega-col:nth-child(even) {
  background: #f9f9f9;
}

.mega-group + .mega-group {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.mega-heading {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

.mega-group a:not(.mega-heading) {
  display: block;
  line-height: 25px;
  font-size: 14px;
  color: var(--text);
}

.mega-group a:not(.mega-heading):hover {
  font-weight: 700;
}

/* Search */
.search {
  position: relative;
  flex: 1;
  max-width: 560px;
  margin: 0 32px 0 auto;
}

.search-box {
  display: flex;
  align-items: center;
  height: 40px;
  background: var(--bg-soft);
  border: 1px solid var(--bg-soft);
  border-radius: 4px;
}

.search-box:focus-within {
  background: #fff;
  border-color: var(--border);
}

.search-box .icon {
  margin: 0 10px 0 14px;
  color: var(--text-2);
}

.search-box input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 14px;
}

.search-box input::placeholder {
  color: #696e79;
}

.search-suggest {
  position: absolute;
  top: 42px;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: none;
}

.search-suggest.is-open {
  display: block;
}

.search-suggest a {
  display: block;
  padding: 8px 16px;
  font-size: 14px;
}

.search-suggest a:hover,
.search-suggest a.is-active {
  background: var(--bg-soft);
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: stretch;
  height: 100%;
  gap: 6px;
}

.action {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 4px solid transparent;
}

.action .icon {
  margin-bottom: 4px;
}

.action:hover,
.action.is-open {
  border-bottom-color: var(--pink);
}

.badge {
  position: absolute;
  top: 18px;
  left: 50%;
  margin-left: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--pink);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.badge[hidden] {
  display: none;
}

.profile-menu {
  position: absolute;
  top: var(--header-h);
  right: -60px;
  width: 270px;
  padding: 24px 20px 16px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-top: 1px solid var(--border);
  display: none;
  text-align: left;
  cursor: default;
}

.action-profile:hover .profile-menu,
.action-profile.is-open .profile-menu {
  display: block;
}

.profile-menu h4 {
  font-size: 14px;
  font-weight: 700;
}

.profile-menu p {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-2);
  margin: 4px 0 14px;
}

.profile-menu .btn {
  height: 40px;
  padding: 0 18px;
  color: var(--pink);
  border: 1px solid var(--border);
  background: #fff;
}

.profile-menu .btn:hover {
  border-color: var(--pink);
}

.profile-menu ul {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.profile-menu li + li {
  margin-top: 2px;
}

.profile-menu ul + ul {
  margin-top: 12px;
}

.profile-menu ul a {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-2);
  line-height: 26px;
}

.profile-menu ul a:hover {
  color: var(--text);
  font-weight: 700;
}

/* Checkout header (bag page) */
.checkout-header .header-inner {
  justify-content: space-between;
}

.checkout-steps {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--text-2);
}

.checkout-steps .is-active {
  color: var(--green);
  border-bottom: 2px solid var(--green);
}

.checkout-steps .is-done {
  color: var(--green);
}

.checkout-steps .is-done a:hover {
  text-decoration: underline;
}

.checkout-steps .dash {
  width: 64px;
  border-top: 1px dashed var(--muted);
}

.secure {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--text-2);
}

.secure .icon {
  color: var(--green);
  width: 26px;
  height: 26px;
}

/* ---------------- Mobile drawer ---------------- */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 90;
  display: none;
}

.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 300px;
  max-width: 85vw;
  background: #fff;
  z-index: 100;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
}

body.drawer-open .drawer {
  transform: none;
}

body.drawer-open .drawer-backdrop {
  display: block;
}

.drawer-top {
  padding: 24px 20px;
  background: linear-gradient(135deg, #ff3f6c, #ff905a);
  color: #fff;
  font-weight: 700;
}

.drawer details {
  border-bottom: 1px solid var(--border);
}

.drawer summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  padding: 14px 20px;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  cursor: pointer;
}

.drawer summary::-webkit-details-marker {
  display: none;
}

.drawer details a {
  display: block;
  padding: 8px 32px;
  font-size: 14px;
  color: var(--text-2);
}

.drawer .drawer-link {
  display: block;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

/* ---------------- Section headings ---------------- */

.section-title {
  margin: 56px 0 40px;
  font-size: 1.8em;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #3e4152;
}

/* ---------------- Product card ---------------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 30px 20px;
}

.product-card {
  position: relative;
  display: block;
  background: #fff;
  transition: box-shadow 0.15s;
}

.product-card:hover {
  box-shadow: 0 2px 16px 4px rgba(40, 44, 63, 0.07);
}

.card-media {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  background: var(--bg-soft);
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.card-media img.is-hidden {
  display: none;
}

.card-rating {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
  height: 20px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 700;
}

.card-rating .star {
  color: var(--teal);
}

.card-rating .sep {
  color: var(--border-2);
  font-weight: 400;
}

.card-rating .count {
  font-weight: 400;
}

.card-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 6px;
  border-radius: 2px;
  background: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text);
}

.card-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: none;
  justify-content: center;
  gap: 4px;
}

.card-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #d4d5d9;
}

.card-dots span.is-active {
  background: var(--pink);
}

.card-info {
  position: relative;
  padding: 12px 10px 14px;
}

.card-brand {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

.card-name {
  font-size: 14px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

.card-text {
  display: block;
}

/* Wishlist + sizes panel that slides over the brand/name on hover */
.card-hover {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: -28px;
  padding: 10px 10px 0;
  background: #fff;
}

.card-wishlist {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 36px;
  border: 1px solid var(--border-2);
  border-radius: 2px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text);
  background: #fff;
}

.card-wishlist:hover {
  border-color: var(--text);
}

.card-wishlist.is-active {
  background: #535766;
  border-color: #535766;
  color: #fff;
}

.card-wishlist.is-active .icon {
  fill: currentColor;
}

.card-wishlist .icon {
  width: 16px;
  height: 16px;
}

.card-sizes {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card:hover .card-dots {
  display: flex;
}

.product-card:hover .card-rating {
  display: none;
}

@media (hover: hover) {
  .product-card:hover .card-hover {
    display: block;
  }

  .product-card:hover .card-brand,
  .product-card:hover .card-name {
    visibility: hidden;
  }
}

.price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 6px;
  font-size: 14px;
}

.price-now {
  font-weight: 700;
  color: var(--text);
}

.price-mrp {
  font-size: 12px;
  color: var(--text-3);
  text-decoration: line-through;
}

.price-off {
  font-size: 12px;
  color: var(--orange);
}

/* ---------------- Toast ---------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-radius: 4px;
  background: #282c3f;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  transform: translate(-50%, 140%);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  pointer-events: none;
  max-width: calc(100vw - 32px);
}

.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}

.toast a {
  color: var(--pink);
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------------- Modal ---------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.5);
}

.modal {
  position: relative;
  width: 100%;
  max-width: 440px;
  padding: 24px;
  background: #fff;
  border-radius: 4px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px;
  color: var(--text-2);
}

/* ---------------- Size buttons (PDP, wishlist modal) ---------------- */

.size-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.size-btn {
  min-width: 50px;
  height: 50px;
  padding: 0 12px;
  border: 1px solid #bfc0c6;
  border-radius: 25px;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.size-btn:hover:not(:disabled) {
  border-color: var(--pink);
}

.size-btn.is-selected {
  border-color: var(--pink);
  color: var(--pink);
}

.size-btn:disabled {
  color: #bfc0c6;
  border-color: var(--border);
  background: linear-gradient(to top right, transparent calc(50% - 1px), #d4d5d9, transparent calc(50% + 1px));
  cursor: not-allowed;
}

/* ---------------- Footer ---------------- */

.site-footer {
  margin-top: 80px;
  background: var(--bg-footer);
  color: #696e79;
}

.footer-inner {
  max-width: 1110px;
  margin: 0 auto;
  padding: 48px 32px 32px;
}

.footer-cols {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1.6fr 2fr;
  gap: 32px;
}

.footer-cols h4 {
  margin-bottom: 18px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.5px;
}

.footer-cols li a {
  display: block;
  font-size: 15px;
  line-height: 25px;
}

.footer-cols li a:hover {
  color: var(--text);
}

.app-badges {
  display: flex;
  gap: 10px;
}

.app-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 6px;
  background: #000;
  color: #fff;
  font-size: 11px;
  line-height: 1.1;
}

.app-badge strong {
  display: block;
  font-size: 14px;
}

.socials {
  display: flex;
  gap: 18px;
}

.socials a {
  color: #696e79;
}

.socials a:hover {
  color: var(--text);
}

.socials .icon {
  width: 22px;
  height: 22px;
}

.promise {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 28px;
  font-size: 16px;
}

.promise .icon {
  width: 46px;
  height: 46px;
  color: var(--text);
  stroke-width: 1.2;
}

.promise strong {
  color: var(--text);
}

.footer-popular {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.footer-popular h4 {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.footer-popular h4::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--border);
}

.footer-popular p {
  font-size: 15px;
  line-height: 25px;
}

.footer-popular a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}

.footer-bottom strong {
  color: var(--text);
}

/* ---------------- Empty states ---------------- */

.empty-state {
  max-width: 420px;
  margin: 80px auto;
  padding: 0 16px;
  text-align: center;
}

.empty-state .empty-art {
  width: 140px;
  height: 140px;
  margin: 0 auto 24px;
  color: var(--pink);
}

.empty-state h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 16px;
  color: var(--text-3);
  margin-bottom: 32px;
}

.empty-state .btn {
  min-width: 260px;
  height: 52px;
  color: #3466e8;
  border-color: #3466e8;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 1180px) {
  .nav-link {
    padding: 0 10px;
  }

  .search {
    margin-right: 16px;
  }
}

@media (max-width: 980px) {
  :root {
    --header-h: 56px;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    display: none;
  }

  .logo {
    margin-right: 0;
  }

  .logo svg {
    width: 40px;
    height: 28px;
  }

  .site-header:not(.checkout-header) {
    height: auto;
  }

  .site-header:not(.checkout-header) .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 0 16px;
  }

  .site-header:not(.checkout-header) .header-actions {
    height: var(--header-h);
    margin-left: auto;
  }

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

  .action {
    min-width: 44px;
  }

  .action-label {
    display: none;
  }

  .badge {
    top: 8px;
  }

  .profile-menu {
    right: -40px;
  }

  .container {
    padding: 0 16px;
  }

  .footer-cols {
    grid-template-columns: 1fr 1fr;
  }

  .checkout-steps,
  .secure span {
    display: none;
  }
}

@media (max-width: 560px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 10px;
  }

  .card-brand {
    font-size: 14px;
  }

  .card-name {
    font-size: 12px;
  }

  .section-title {
    margin: 32px 0 20px;
    font-size: 1.2em;
  }

  .footer-inner {
    padding: 32px 16px;
  }

  .footer-cols {
    grid-template-columns: 1fr;
  }

  .profile-menu {
    position: fixed;
    top: var(--header-h);
    right: 8px;
  }
}
