/* Naheed.pk-inspired sketch theme */
:root {
  --green: #1a8c3f;
  --green-dark: #146b31;
  --green-light: #e8f5ec;
  --black: #1a1a1a;
  --gray-700: #444;
  --gray-500: #777;
  --gray-300: #ddd;
  --gray-100: #f5f5f5;
  --white: #fff;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --radius: 6px;
  --font: "Open Sans", system-ui, sans-serif;
  --container: 1200px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--black);
  background: var(--white);
  line-height: 1.5;
  overflow-x: clip;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--green);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

/* Ad margin frame */
body.has-ad-margins {
  background: #e4e4e4;
}

.site-frame {
  display: grid;
  grid-template-columns: var(--ad-side-width, 140px) minmax(0, 1fr) var(--ad-side-width, 140px);
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
}

.site-shell {
  min-width: 0;
  background: var(--white);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.06);
}

.site-ad {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.site-ad img,
.site-ad iframe,
.site-ad ins {
  max-width: 100%;
}

.site-ad--top,
.site-ad--bottom {
  width: 100%;
  min-height: var(--ad-banner-min-height, 90px);
  padding: 0.5rem;
  border-bottom: 1px solid var(--gray-300);
  text-align: center;
}

.site-ad--bottom {
  border-bottom: 0;
  border-top: 1px solid var(--gray-300);
}

.site-ad--left,
.site-ad--right {
  width: var(--ad-side-width, 140px);
  padding: 0.75rem 0.5rem;
  position: sticky;
  top: 0;
  align-self: start;
  max-height: 100vh;
  overflow: auto;
  background: #ececec;
  border-inline: 1px solid #d8d8d8;
}

.site-ad--left {
  border-left: 0;
}

.site-ad--right {
  border-right: 0;
}

.site-ad--empty.site-ad--top,
.site-ad--empty.site-ad--bottom {
  background: #ececec;
}

.site-ad--empty.site-ad--left,
.site-ad--empty.site-ad--right {
  background: #ececec;
}

.container--narrow {
  max-width: 720px;
}

.container--medium {
  max-width: 820px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Top bar */
.top-bar {
  background: var(--green);
  color: var(--white);
  font-size: 0.85rem;
}

.top-bar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  gap: 1rem;
  flex-wrap: wrap;
}

.top-bar a {
  color: var(--white);
  font-weight: 600;
}

.top-bar__welcome {
  margin: 0;
}

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-300);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.site-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--black);
}

.logo:hover {
  text-decoration: none;
}

.logo__mark {
  width: 42px;
  height: 42px;
  background: var(--green);
  color: var(--white);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.25rem;
}

.logo__text {
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.logo__text span {
  color: var(--green);
  font-weight: 600;
}

.search-form {
  display: flex;
  border: 2px solid var(--green);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 560px;
  width: 100%;
  margin-inline: auto;
}

.search-form input {
  flex: 1;
  border: 0;
  padding: 0.65rem 1rem;
  font: inherit;
  min-width: 0;
}

.search-form button {
  background: var(--green);
  color: var(--white);
  border: 0;
  padding: 0 1.25rem;
  font-weight: 600;
  cursor: pointer;
}

.search-form button:hover {
  background: var(--green-dark);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-actions__item {
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  color: var(--black);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
}

.cart-link {
  position: relative;
  font-weight: 600;
}

.cart-badge {
  background: var(--green);
  color: var(--white);
  font-size: 0.7rem;
  min-width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 0 0.25rem;
}

.icon-cart::before {
  content: "🛒";
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 0.25rem;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--black);
}

/* Main nav */
.main-nav {
  border-top: 1px solid var(--gray-300);
  background: var(--gray-100);
}

.main-nav__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  align-items: center;
}

.main-nav__links > li > a,
.mega-trigger {
  display: block;
  padding: 0.65rem 0.25rem;
  color: var(--black);
  font-size: 0.9rem;
  font-weight: 600;
  background: none;
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

.main-nav__links a:hover,
.mega-trigger:hover {
  color: var(--green);
  text-decoration: none;
}

.has-mega {
  position: relative;
}

.mega-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 320px;
  background: var(--white);
  border: 1px solid var(--gray-300);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 1rem;
  z-index: 50;
}

.has-mega.is-open .mega-menu {
  display: block;
}

.mega-menu__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.mega-menu__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: var(--radius);
  color: var(--black);
  font-size: 0.9rem;
}

.mega-menu__item:hover {
  background: var(--green-light);
  text-decoration: none;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--green-light) 0%, var(--white) 60%);
  border-bottom: 1px solid var(--gray-300);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2.5rem 0;
}

.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--green);
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin: 0 0 0.75rem;
  line-height: 1.2;
}

.hero__text {
  color: var(--gray-700);
  margin: 0 0 1.25rem;
  max-width: 42ch;
}

.hero__visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  min-height: 220px;
}

.hero__slide {
  border-radius: var(--radius);
  border: 2px dashed var(--gray-300);
  background: repeating-linear-gradient(
    -45deg,
    var(--white),
    var(--white) 10px,
    var(--gray-100) 10px,
    var(--gray-100) 20px
  );
}

.hero__slide--1 {
  background-color: var(--green-light);
}

/* Sections */
.section {
  padding: 2.5rem 0;
}

.section--muted {
  background: var(--gray-100);
}

.section__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.section__head h2 {
  margin: 0;
  font-size: 1.5rem;
}

.badge {
  background: var(--green);
  color: var(--white);
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
}

/* Category grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.25rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--black);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.category-card:hover {
  border-color: var(--green);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.category-card__icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
}

.category-icon-img {
  object-fit: contain;
  display: block;
}

.category-card__icon .category-icon-img {
  width: 64px;
  height: 64px;
}

.mega-menu__icon .category-icon-img {
  width: 32px;
  height: 32px;
}

.sidebar__cat-icon {
  display: inline-flex;
  vertical-align: middle;
  margin-right: 0.35rem;
}

.sidebar__cat-icon .category-icon-img {
  width: 24px;
  height: 24px;
}

.mega-menu__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.category-card__name {
  font-size: 0.9rem;
  font-weight: 600;
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.product-card {
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s;
}

.product-card:hover {
  box-shadow: var(--shadow);
}

.product-card__image {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: var(--gray-100);
  position: relative;
  text-decoration: none;
  overflow: hidden;
}

.product-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-photo--lg {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-detail__gallery {
  overflow: hidden;
}

.product-detail__gallery .product-photo--lg {
  width: 100%;
  height: auto;
  max-height: 480px;
}

.product-card__image--grocery { background: #fff8e6; }
.product-card__image--beauty { background: #fce8f3; }
.product-card__image--fashion { background: #f0e8fc; }
.product-card__image--mobile { background: #e8f0fc; }
.product-card__image--home { background: #e8fcf0; }
.product-card__image--baby { background: #fcf0e8; }
.product-card__image--sports { background: #e8f8fc; }
.product-card__image--books { background: #f5f5e8; }

.product-card__placeholder {
  color: var(--gray-500);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-card__placeholder--lg {
  font-size: 1rem;
}

.product-card__body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.35rem;
}

.product-card__category {
  margin: 0;
  font-size: 0.75rem;
  color: var(--gray-500);
  text-transform: uppercase;
}

.product-card__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
}

.product-card__title a {
  color: var(--black);
}

.product-card__price {
  margin: 0.25rem 0 0.5rem;
  font-weight: 700;
  color: var(--green-dark);
  font-size: 1.05rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn--primary {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

.btn--primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
}

.btn--outline {
  background: var(--white);
  color: var(--green);
  border-color: var(--green);
}

.btn--outline:hover {
  background: var(--green-light);
}

.btn--small {
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  margin-top: auto;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Promo strip */
.promo-strip {
  background: var(--green);
  color: var(--white);
}

.promo-strip__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  padding: 1.25rem 0;
  text-align: center;
}

.promo-strip__item strong {
  display: block;
  margin-bottom: 0.15rem;
}

.promo-strip__item span {
  font-size: 0.85rem;
  opacity: 0.9;
}

/* Breadcrumb */
.breadcrumb {
  background: var(--gray-100);
  padding: 0.75rem 0;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--gray-300);
}

.breadcrumb a {
  color: var(--gray-700);
}

/* Category page */
.category-page__layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  align-items: start;
}

.sidebar {
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--white);
  position: sticky;
  top: 120px;
}

.sidebar h2,
.sidebar h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.sidebar__list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.sidebar__list a {
  display: block;
  padding: 0.4rem 0;
  color: var(--gray-700);
  font-size: 0.9rem;
}

.sidebar__list a.is-active {
  color: var(--green);
  font-weight: 700;
}

.category-page__head h1 {
  margin: 0 0 0.25rem;
}

.category-page__meta {
  color: var(--gray-500);
  margin: 0 0 1rem;
}

.toolbar select {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font: inherit;
}

/* Product detail */
.product-detail__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.product-detail__gallery {
  aspect-ratio: 1;
  border-radius: var(--radius);
  border: 1px solid var(--gray-300);
  display: grid;
  place-items: center;
}

.product-detail h1 {
  margin: 0.25rem 0 0.75rem;
}

.product-detail__price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--green-dark);
  margin: 0 0 0.75rem;
}

.product-detail__note {
  color: var(--gray-500);
  font-size: 0.9rem;
}

.product-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0;
  padding: 1rem;
  background: var(--gray-100);
  border-radius: var(--radius);
  border: 1px solid var(--gray-300);
}

.product-option {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.product-option__label {
  font-weight: 600;
  font-size: 0.9rem;
}

.product-option select {
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font: inherit;
  max-width: 280px;
}

.product-detail__actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.product-detail__actions {
  margin: 1.25rem 0;
}

.cart-options {
  font-size: 0.85rem;
  color: var(--gray-700);
  max-width: 200px;
}

.qty-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.qty-label input {
  width: 4rem;
  padding: 0.5rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font: inherit;
}

.product-detail__features {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--gray-700);
}

/* Cart */
.cart-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.cart-table th,
.cart-table td {
  border-bottom: 1px solid var(--gray-300);
  padding: 0.75rem;
  text-align: left;
}

.cart-summary {
  text-align: right;
}

.cart-remove-form {
  margin: 0;
}

.cart-remove-btn {
  white-space: nowrap;
}

.checkout-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.checkout-actions .btn {
  margin: 0;
}

.empty-state {
  padding: 3rem;
  text-align: center;
  background: var(--gray-100);
  border-radius: var(--radius);
  border: 2px dashed var(--gray-300);
}

/* Footer */
.site-footer {
  background: var(--black);
  color: #ccc;
  margin-top: 2rem;
}

.site-footer a {
  color: #ccc;
}

.site-footer a:hover {
  color: var(--white);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2rem;
  padding: 2.5rem 0;
}

.site-footer h4 {
  color: var(--white);
  margin: 0 0 0.75rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 0.35rem;
}

.logo__mark--footer {
  margin-bottom: 0.75rem;
}

.site-footer__bottom {
  border-top: 1px solid #333;
  padding: 1rem 0;
  font-size: 0.85rem;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--black);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 200;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Auth & account */
.auth-section {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.auth-card {
  max-width: 440px;
  margin: 0 auto;
  padding: 2rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
}

.auth-subtitle {
  color: var(--gray-500);
  margin: 0 0 1.25rem;
}

.auth-form {
  display: grid;
  gap: 1rem;
}

.auth-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.auth-form input,
.auth-form textarea {
  font: inherit;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-weight: 400;
}

.auth-form input:focus,
.auth-form textarea:focus {
  outline: 2px solid var(--green-light);
  border-color: var(--green);
}

.btn--block {
  width: 100%;
  justify-content: center;
}

.auth-alert {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.92rem;
}

.auth-alert--error {
  background: #fde8e8;
  border: 1px solid #e57373;
}

.auth-alert--success {
  background: var(--green-light);
  border: 1px solid var(--green);
}

.auth-switch {
  text-align: center;
  margin: 1.25rem 0 0;
  font-size: 0.92rem;
}

.auth-field-hint {
  margin: -0.35rem 0 0.25rem;
  font-size: 0.85rem;
  min-height: 1.1rem;
  color: var(--gray-500);
}

.auth-field-hint--ok {
  color: var(--green-dark);
}

.auth-field-hint--error {
  color: #c62828;
}

.auth-field-hint--checking {
  color: var(--gray-500);
}

.auth-social {
  margin-top: 1.25rem;
}

.auth-social__divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1rem;
  color: var(--gray-500);
  font-size: 0.88rem;
}

.auth-social__divider::before,
.auth-social__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--gray-300);
}

.auth-social__buttons {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.auth-social__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--gray-300);
  background: #fff;
  color: var(--black);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.auth-social__btn:hover {
  text-decoration: none;
  background: var(--gray-100);
}

.auth-social__btn--google .auth-social__icon {
  color: #ea4335;
  font-weight: 700;
}

.auth-social__btn--facebook {
  background: #1877f2;
  border-color: #1877f2;
  color: #fff;
}

.auth-social__btn--facebook:hover {
  background: #166fe5;
  border-color: #166fe5;
  color: #fff;
}

.auth-social__btn--facebook .auth-social__icon {
  font-weight: 700;
  font-family: Georgia, serif;
}

.auth-social__icon {
  display: inline-flex;
  width: 1.25rem;
  justify-content: center;
}

.account-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  align-items: start;
}

.account-nav {
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  overflow: hidden;
}

.account-nav__user {
  padding: 1rem;
  background: var(--gray-100);
  border-bottom: 1px solid var(--gray-300);
}

.account-nav__user small {
  display: block;
  color: var(--gray-500);
  margin-top: 0.25rem;
  word-break: break-all;
}

.account-nav nav {
  display: flex;
  flex-direction: column;
}

.account-nav nav a {
  padding: 0.75rem 1rem;
  color: var(--black);
  border-bottom: 1px solid var(--gray-100);
  text-decoration: none;
}

.account-nav nav a:hover,
.account-nav nav a.is-active {
  background: var(--green-light);
  color: var(--green-dark);
  text-decoration: none;
}

.account-main h1 {
  margin-top: 0;
}

.account-form {
  max-width: 480px;
}

.account-orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.account-orders-table th,
.account-orders-table td {
  border-bottom: 1px solid var(--gray-300);
  padding: 0.6rem 0.5rem;
  text-align: left;
}

.account-orders-table th {
  background: var(--gray-100);
}

.order-totals {
  margin-top: 1rem;
  max-width: 320px;
  margin-left: auto;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  overflow: hidden;
}

.order-totals__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--gray-100);
}

.order-totals__row:last-child {
  border-bottom: 0;
}

.order-totals__row--total {
  background: var(--gray-100);
  font-size: 1.05rem;
}

.status-pill {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.78rem;
  background: var(--gray-100);
}

.status-pill--completed { background: var(--green-light); color: var(--green-dark); }
.status-pill--shipped { background: #e3f2fd; color: #1565c0; }
.status-pill--processing { background: #fff3e0; color: #e65100; }
.status-pill--pending { background: #f3e5f5; color: #6a1b9a; }
.status-pill--cancelled { background: #fde8e8; color: #c62828; }

.account-order-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}

.main-nav__mobile-only {
  display: none;
}

/* Responsive */
@media (max-width: 1200px) {
  .site-frame {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-ad--left,
  .site-ad--right {
    display: none;
  }

  .site-shell {
    box-shadow: none;
  }
}

@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

@media (max-width: 900px) {
  .site-header__inner {
    grid-template-columns: auto 1fr auto;
    gap: 0.75rem;
  }

  .search-form {
    grid-column: 1 / -1;
    order: 3;
    max-width: none;
  }

  .hero__inner,
  .category-page__layout,
  .product-detail__layout {
    grid-template-columns: 1fr;
  }

  .hero__inner {
    padding: 2rem 0;
  }

  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .sidebar {
    position: static;
  }

  .product-detail__price {
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  .account-layout,
  .account-order-grid {
    grid-template-columns: 1fr;
  }

  .section__head h2 {
    font-size: 1.25rem;
  }

  .category-page__layout {
    gap: 1.25rem;
  }

  .product-detail__layout {
    gap: 1.5rem;
  }

  .product-detail__gallery {
    aspect-ratio: auto;
    min-height: 240px;
  }
}

@media (max-width: 640px) {
  .site-ad--top,
  .site-ad--bottom {
    min-height: auto;
    padding: 0.35rem;
  }

  .site-ad--empty.site-ad--top,
  .site-ad--empty.site-ad--bottom {
    display: none;
  }

  .container {
    width: min(100% - 1.25rem, var(--container));
  }

  .section {
    padding: 1.75rem 0;
  }

  .top-bar__inner {
    justify-content: center;
    text-align: center;
    font-size: 0.8rem;
  }

  .site-header__inner {
    padding: 0.65rem 0;
  }

  .logo__text {
    font-size: 1.1rem;
  }

  .logo__mark {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }

  .header-actions {
    gap: 0.35rem;
  }

  .header-actions__item--hide-mobile {
    display: none;
  }

  .search-form input {
    padding: 0.55rem 0.75rem;
    font-size: 16px;
  }

  .search-form button {
    padding: 0 0.85rem;
    font-size: 0.85rem;
  }

  .nav-toggle {
    display: flex;
  }

  .main-nav__links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-bottom: 0.75rem;
  }

  .main-nav.is-open .main-nav__links {
    display: flex;
  }

  .main-nav__links > li > a,
  .mega-trigger {
    padding: 0.75rem 0.25rem;
  }

  .main-nav__mobile-only {
    display: list-item;
  }

  .has-mega .mega-menu {
    position: static;
    box-shadow: none;
    border: 0;
    padding: 0 0 0.5rem;
    min-width: 0;
  }

  .mega-menu__grid {
    grid-template-columns: 1fr;
  }

  .hero__visual {
    grid-template-columns: 1fr;
    min-height: 140px;
  }

  .category-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.65rem;
  }

  .category-card {
    padding: 0.85rem 0.5rem;
  }

  .category-card__icon {
    min-height: 48px;
    font-size: 1.5rem;
  }

  .category-card__icon .category-icon-img {
    width: 48px;
    height: 48px;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }

  .product-card__body {
    padding: 0.75rem;
  }

  .product-card__title {
    font-size: 0.88rem;
  }

  .product-card__price {
    font-size: 0.95rem;
  }

  .btn--small {
    padding: 0.5rem 0.65rem;
    font-size: 0.8rem;
  }

  .breadcrumb {
    font-size: 0.82rem;
    overflow-x: auto;
    white-space: nowrap;
  }

  .toolbar {
    width: 100%;
  }

  .toolbar select {
    width: 100%;
    max-width: 100%;
  }

  .product-option select {
    max-width: 100%;
    width: 100%;
  }

  .product-detail__actions-row {
    flex-direction: column;
    align-items: stretch;
  }

  .product-detail__actions-row .btn {
    width: 100%;
  }

  .cart-summary {
    text-align: left;
  }

  .cart-summary .btn {
    display: block;
    width: 100%;
    margin-top: 0.75rem;
    text-align: center;
  }

  .checkout-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .checkout-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .auth-card {
    padding: 1.25rem;
    margin-inline: 0;
    width: 100%;
  }

  .auth-card h1 {
    font-size: 1.35rem;
  }

  .empty-state {
    padding: 2rem 1rem;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
    padding: 2rem 0;
  }

  .toast {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    text-align: center;
  }

  /* Stack data tables as cards */
  .responsive-table thead {
    display: none;
  }

  .responsive-table tbody tr {
    display: block;
    margin-bottom: 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background: var(--white);
    overflow: hidden;
  }

  .responsive-table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid var(--gray-100);
    text-align: right;
  }

  .responsive-table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--gray-700);
    text-align: left;
    flex-shrink: 0;
  }

  .responsive-table tbody td[data-label=""]::before {
    content: none;
  }

  .responsive-table tbody td:last-child {
    border-bottom: 0;
  }

  .responsive-table tfoot {
    display: block;
    margin-top: 0.5rem;
  }

  .responsive-table tfoot tr {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-100);
  }

  .responsive-table tfoot td {
    display: block;
    padding: 0;
    border: 0;
    text-align: right;
  }

  .responsive-table tfoot td:first-child {
    text-align: left;
    flex: 1;
  }

  .responsive-table tfoot td[colspan] {
    display: none;
  }

  .responsive-table tfoot td:not([colspan])::before {
    content: none;
  }
  .order-totals {
    max-width: none;
    margin-left: 0;
  }
}

body.nav-open {
  overflow: hidden;
}

@media (max-width: 400px) {
  .top-bar__welcome {
    display: none;
  }

  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .category-card__name {
    font-size: 0.72rem;
    line-height: 1.25;
  }

  .product-grid {
    gap: 0.5rem;
  }

  .promo-strip__inner {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}
