* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --ink: #18202b;
  --muted: #6c7480;
  --line: #e7e9ec;
  --surface: #f7f8f9;
  --white: #fff;
  --success: #258b5b;
  --warning: #a66a08;
  --danger: #b43d3d;
  --radius: 10px;
  --shadow: 0 8px 30px rgba(20, 28, 40, .06);
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.5;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  height: 70px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  background: rgba(255, 255, 255, .96);
  position: sticky;
  top: 0;
  z-index: 20;
}

.menu-toggle {
  display: none;
}

.logo {
  color: var(--ink);
  text-decoration: none;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.logo-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.footer-logo {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
}

.header-search {
  width: 20rem;
  flex-shrink: 0;
}

.header-search input {
  width: 100%;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.main-nav button {
  border: 0;
  background: none;
  color: #4e5661;
  font-size: 13px;
}

.main-nav button:hover,
.text-btn:hover {
  color: var(--ink);
}

.main-nav button.active {
  font-weight: bold;
  color: black;
}

.cart-link {
  font-weight: 700;
}

#cartCount {
  display: inline-grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 50px;
  background: var(--ink);
  color: white;
  font-size: 11px;
}

.container {
  width: min(1180px, 90%);
  margin: auto;
}

.section {
  padding: 64px 0;
}

.hero {
  min-height: 480px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  background: var(--surface);
  margin-top: 24px;
  border-radius: 16px;
  overflow: hidden;
}

.hero-copy {
  padding: 60px;
}

.eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.7px;
  color: #747c87;
}

.hero h1 {
  font-size: clamp(42px, 5vw, 66px);
  line-height: .98;
  letter-spacing: -3px;
  margin: 12px 0 22px;
}

.hero p {
  color: var(--muted);
  max-width: 470px;
  margin-bottom: 28px;
}

.hero-art {
  height: 100%;
  min-height: 480px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f1f3f4, #e8ebed);
  display: grid;
  place-items: center;
}

.hero-circle {
  width: 330px;
  height: 330px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 25px 70px rgba(0, 0, 0, .1);
}

.hero-product {
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .16));
}

.primary-btn,
.secondary-btn {
  border-radius: 7px;
  padding: 12px 18px;
  border: 1px solid var(--ink);
  font-weight: 700;
  font-size: 13px;
  transition: .18s ease;
}

.primary-btn {
  background: var(--ink);
  color: white;
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(24, 32, 43, .18);
}

.secondary-btn {
  background: white;
  color: var(--ink);
}

.secondary-btn:hover {
  background: var(--surface);
}

.primary-btn.small {
  padding: 8px 12px;
  font-size: 12px;
}

.primary-btn.full {
  width: 100%;
}

.section-heading,
.page-heading,
.admin-top,
.admin-card-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
}

.section-heading {
  margin-bottom: 28px;
}

h1,
h2 {
  letter-spacing: -.8px;
}

.section-heading h2 {
  margin-top: 4px;
}

.text-btn,
.back-btn {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.product-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: white;
  transition: .2s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.product-image {
  height: 210px;
  background: #f5f6f7;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder-image {
  font-size: 52px;
  color: #b8bdc4;
}

.product-info {
  padding: 16px;
}

.product-info h3 {
  font-size: 14px;
  margin-bottom: 4px;
}

.product-description {
  color: var(--muted);
  font-size: 12px;
  min-height: 36px;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}

.price {
  font-weight: 800;
  font-size: 14px;
}

.product-card .primary-btn {
  padding: 8px 10px;
  font-size: 11px;
}

.page-heading {
  align-items: center;
  margin-bottom: 36px;
}

.page-heading h1 {
  font-size: 38px;
  margin: 4px 0;
}

.page-heading p {
  color: var(--muted);
  font-size: 14px;
}

.search:focus,
input:focus,
textarea:focus {
  border-color: #9da4ad;
}

.hidden {
  display: none !important;
}

.narrow {
  width: min(900px, 90%);
}

.back-btn {
  margin-bottom: 26px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 60px;
  align-items: center;
}

.detail-image {
  min-height: 520px;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info h1 {
  font-size: 44px;
  line-height: 1.05;
  margin: 10px 0;
}

.detail-info>p {
  color: var(--muted);
  margin: 18px 0;
}

.stock {
  display: inline-block;
  color: var(--success);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 20px;
}

.qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  width: max-content;
  border-radius: 7px;
  overflow: hidden;
  margin-bottom: 16px;
}

.qty button {
  width: 38px;
  height: 38px;
  border: 0;
  background: white;
}

.qty span {
  width: 40px;
  text-align: center;
  font-size: 13px;
}

.full-detail-btn {
  width: 100%;
}

.cart-table {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.cart-head,
.cart-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 40px;
  gap: 12px;
  align-items: center;
  padding: 16px 20px;
}

.cart-head {
  font-size: 11px;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}

.cart-row {
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.cart-row:last-child {
  border-bottom: 0;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mini-image {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  background: var(--surface);
  object-fit: cover;
}

.remove-btn {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 17px;
}

.cart-summary {
  display: flex;
  justify-content: flex-end;
  margin-top: 22px;
}

.summary-box {
  width: 300px;
  border-top: 1px solid var(--ink);
  padding-top: 16px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
}

.summary-total {
  font-size: 18px;
  font-weight: 800;
  margin: 18px 0;
}

.checkout-layout {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 24px;
}

.form-card,
.summary-card,
.success-card,
.admin-card,
.login-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  background: white;
}

.form-card {
  display: grid;
  gap: 20px;
}

label {
  display: grid;
  gap: 7px;
  color: #414955;
  font-size: 12px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px 12px;
  outline: none;
  background: white;
  color: var(--ink);
}

textarea {
  min-height: 105px;
  resize: vertical;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.payment-box {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.radio-dot {
  width: 15px;
  height: 15px;
  border: 4px solid var(--ink);
  border-radius: 50%;
}

.payment-box small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  margin-top: 2px;
}

.summary-card h3 {
  margin-bottom: 15px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.summary-item:last-of-type {
  border-bottom: 0;
}

.success-wrap {
  text-align: center;
  max-width: 650px;
}

.success-icon {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  margin: 10px auto 20px;
  border-radius: 50%;
  background: #e7f6ee;
  color: var(--success);
  font-size: 30px;
  font-weight: 800;
}

.success-wrap h1 {
  margin: 7px 0;
}

.success-wrap>p {
  color: var(--muted);
  margin-bottom: 24px;
}

.success-card {
  text-align: left;
  margin: 0 auto 20px;
}

.detail-line {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}

.detail-line:last-child {
  border-bottom: 0;
}

.button-row {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.order-list {
  display: grid;
  gap: 10px;
}

.order-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 17px 20px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 25px;
}

.order-id {
  font-weight: 800;
  font-size: 13px;
}

.order-meta {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}

.status {
  padding: 5px 9px;
  border-radius: 30px;
  font-size: 10px;
  font-weight: 800;
  background: #eef1f4;
}

.status.delivered {
  background: #e5f6ed;
  color: var(--success);
}

.status.pending {
  background: #fff3dc;
  color: var(--warning);
}

.status.shipped {
  background: #e5efff;
  color: #2861a9;
}

.status.cancelled {
  background: #fdeaea;
  color: var(--danger);
}

.order-view {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.order-view-head {
  padding: 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.order-items {
  padding: 8px 22px;
}

.order-item {
  display: flex;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.order-view-total {
  padding: 20px 22px;
  display: flex;
  justify-content: space-between;
  font-weight: 800;
}

.admin-login-wrap {
  min-height: 650px;
  display: grid;
  place-items: center;
}

.login-card {
  width: min(390px, 100%);
  box-shadow: var(--shadow);
}

.login-card h1 {
  margin: 7px 0;
}

.login-card .muted {
  margin-bottom: 22px;
}

.login-card form {
  display: grid;
  gap: 15px;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.admin-top {
  align-items: center;
  margin-bottom: 25px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.stat {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 17px;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 4px;
}

.stat strong {
  font-size: 23px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1.5fr .8fr;
  gap: 15px;
  align-items: start;
}

.admin-card-heading {
  align-items: center;
  margin-bottom: 18px;
}

.admin-card h2 {
  font-size: 17px;
}

.admin-product {
  display: grid;
  grid-template-columns: 45px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.admin-product:last-child {
  border-bottom: 0;
}

.admin-product img {
  width: 45px;
  height: 45px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--surface);
}

.admin-product-name {
  font-size: 12px;
  font-weight: 700;
}

.admin-product-price {
  color: var(--muted);
  font-size: 11px;
}

.admin-actions button {
  border: 0;
  background: none;
  font-size: 11px;
  color: var(--danger);
}

.orders-admin-card {
  margin-top: 15px;
}

.admin-order-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr auto;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
  font-size: 12px;
}

.admin-order-row:last-child {
  border-bottom: 0;
}

.admin-order-row select {
  border: 1px solid var(--line);
  padding: 6px;
  border-radius: 5px;
  font-size: 11px;
}

.empty {
  text-align: center;
  padding: 50px 20px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
}

.empty h3 {
  color: var(--ink);
  margin-bottom: 5px;
}

.toast {
  position: fixed;
  top: 85px;
  right: 25px;
  background: var(--ink);
  color: white;
  padding: 12px 16px;
  border-radius: 7px;
  font-size: 12px;
  transform: translateY(-15px);
  opacity: 0;
  pointer-events: none;
  transition: .2s;
  z-index: 50;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

footer {
  border-top: 1px solid var(--line);
  margin-top: 30px;
}

.footer-inner {
  padding: 25px 0;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

/* =========================================
   PRODUCT IMAGE GALLERY
========================================= */

.product-gallery {
  width: 100%;
  min-width: 0;
}

.gallery-main {
  position: relative;
  width: 100%;
  height: 520px;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-main>img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.gallery-main .image-broken {
  display: none;
}

.gallery-placeholder {
  font-size: 52px;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 18px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .12);
  z-index: 2;
}

.gallery-arrow:hover {
  background: white;
  transform: translateY(-50%) scale(1.05);
}

.gallery-prev {
  left: 15px;
}

.gallery-next {
  right: 15px;
}

.image-counter {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  padding: 5px 10px;
  border-radius: 20px;
  background: rgba(0, 0, 0, .65);
  color: white;
  font-size: 11px;
  z-index: 2;
}

.product-thumbnails {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  padding: 3px 2px 8px;
}

.product-thumbnail {
  flex: 0 0 74px;
  width: 74px;
  height: 74px;
  padding: 3px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
  cursor: pointer;
}

.product-thumbnail.active {
  border-color: #d2b27f;
}

.product-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
  display: block;
}

.image-input-section {
  display: grid;
  gap: 8px;
}

.image-input-row {
  display: grid;
  grid-template-columns: 1fr 38px;
  gap: 8px;
  align-items: center;
}

.remove-image-btn {
  width: 38px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--danger);
  font-size: 20px;
}

.secondary-btn.small {
  width: max-content;
  padding: 8px 12px;
  font-size: 12px;
}

@media (max-width: 900px) {
  .gallery-main {
    height: 460px;
  }
}

@media (max-width: 650px) {
  .gallery-main {
    height: 350px;
  }

  .gallery-arrow {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }

  .product-thumbnail {
    flex-basis: 62px;
    width: 62px;
    height: 62px;
  }
}

@media (max-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-art {
    min-height: 300px;
  }

  .hero-copy {
    padding: 42px;
  }

  .detail-layout,
  .checkout-layout,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .site-header {
    gap: 12px;
  }

  .header-search {
    width: 10rem;
  }

  .main-nav {
    gap: 12px;
  }
}

@media (max-width: 650px) {

  /* =========================
     Header & Navigation
     ========================= */

  .site-header {
    position: relative;
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: block;
    border: none;
    background: transparent;
    font-size: 1.6rem;
    cursor: pointer;
  }

  .header-search {
    order: 3;
    width: 100%;
  }

  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    padding-top: 10px;
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav button {
    width: 100%;
    padding: 12px 8px;
    text-align: left;
  }


  /* =========================
     Hero
     ========================= */

  .hero h1 {
    font-size: 43px;
  }

  .hero-copy {
    padding: 32px;
  }


  /* =========================
     Products
     ========================= */

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-image {
    height: 165px;
  }

  .search {
    width: 100%;
  }


  /* =========================
     Headings
     ========================= */

  .page-heading,
  .section-heading {
    flex-direction: column;
    align-items: flex-start;
  }


  /* =========================
     Cart
     ========================= */

  .cart-head {
    display: none;
  }

  /* Cart becomes stacked cards on phones — unit price, quantity stepper
     and line total all stay visible (was: hidden entirely). */
  .cart-row {
    grid-template-columns: 1fr 36px;
    grid-template-areas:
      "item remove"
      "controls controls";
    gap: 10px;
    padding: 12px 0;
  }

  .cart-row .cart-item {
    grid-area: item;
  }

  .cart-row .remove-btn {
    grid-area: remove;
  }

  .cart-row .cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .cart-row .cart-unit-price {
    font-size: 13px;
  }

  /* Price, qty stepper and line total in one row under the item */
  .cart-row .cart-col-price {
    display: none; /* unit price already shown under the name */
  }

  .cart-row .qty {
    grid-area: controls;
    justify-self: start;
  }

  .cart-row .cart-col-total {
    grid-area: controls;
    justify-self: end;
    align-self: center;
    font-size: 16px;
  }


  /* =========================
     Forms
     ========================= */

  .field-row {
    grid-template-columns: 1fr;
  }


  /* =========================
     Orders
     ========================= */

  .order-card {
    grid-template-columns: 1fr auto;
  }

  .order-card .status {
    grid-column: 2;
    grid-row: 1;
  }

  .order-card .text-btn {
    grid-column: 1 / -1;
    text-align: left;
  }


  /* =========================
     Admin
     ========================= */

  .admin-order-row {
    grid-template-columns: 1fr 1fr;
  }


  /* =========================
     Footer
     ========================= */

  .footer-inner {
    flex-direction: column;
    gap: 7px;
  }
}

/* =========================================
   NEW: ratings, reviews, auth, chips, misc
========================================= */

.img-btn {
  border: 0;
  padding: 0;
  width: 100%;
  cursor: pointer;
  display: block;
}

.product-title-link {
  cursor: pointer;
}

.product-title-link:hover {
  text-decoration: underline;
}

.img-fallback::after {
  content: "◻";
  font-size: 42px;
  color: #b8bdc4;
}

.card-rating {
  margin-bottom: 4px;
}

.stars {
  font-size: 12px;
  letter-spacing: 1px;
}

.stars-filled {
  color: #e8a33d;
}

.detail-rating {
  margin: 6px 0 10px;
  font-size: 14px;
}

.detail-rating .stars {
  font-size: 16px;
}

.stock.out {
  color: var(--danger);
}

.detail-note {
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding-top: 22px;
}

.detail-note strong {
  font-size: 13px;
}

.detail-note p {
  font-size: 12px;
  margin-top: 6px;
}

/* Category chips */
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.chip {
  border: 1px solid var(--line);
  background: white;
  border-radius: 30px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  color: #4e5661;
  transition: .15s ease;
}

.chip:hover {
  border-color: var(--ink);
}

.chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}

/* Trust row on home */
.trust-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding-top: 0;
}

.trust-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  display: grid;
  gap: 4px;
}

.trust-item strong {
  font-size: 13px;
}

.trust-item span {
  color: var(--muted);
  font-size: 12px;
}

/* Reviews */
.reviews-section {
  margin-top: 56px;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}

.reviews-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.reviews-head h2 {
  font-size: 20px;
}

.reviews-list {
  display: grid;
  gap: 12px;
}

.review-item {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 15px 18px;
}

.review-top {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  flex-wrap: wrap;
}

.review-item p {
  margin-top: 8px;
  color: #414955;
  font-size: 13px;
}

.review-delete {
  margin-left: auto;
  border: 0;
  background: none;
  color: var(--danger);
  font-size: 16px;
  cursor: pointer;
}

.review-form {
  margin-bottom: 20px;
  gap: 14px;
}

.star-picker {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.star-picker button {
  border: 0;
  background: none;
  font-size: 26px;
  color: #d5d9de;
  transition: .12s ease;
}

.star-picker button.picked {
  color: #e8a33d;
}

.secondary-btn.small {
  width: max-content;
  padding: 8px 12px;
  font-size: 12px;
}

/* Auth modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 20, 26, .55);
  display: grid;
  place-items: center;
  z-index: 100;
  padding: 20px;
}

.auth-card {
  width: min(400px, 100%);
  background: white;
  border-radius: 12px;
  padding: 28px;
  position: relative;
  box-shadow: 0 25px 70px rgba(0, 0, 0, .25);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  background: none;
  font-size: 22px;
  color: var(--muted);
  cursor: pointer;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 20px;
  background: var(--surface);
  border-radius: 8px;
  padding: 4px;
}

.auth-tab {
  border: 0;
  background: none;
  padding: 9px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  color: var(--muted);
}

.auth-tab.active {
  background: white;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.center {
  text-align: center;
}

/* Header account area */
.nav-plain {
  border: 0;
  background: none;
  color: #4e5661;
  font-size: 13px;
  cursor: pointer;
}

.nav-plain:hover {
  color: var(--ink);
}

.account-chip {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.admin-tag {
  background: var(--ink);
  color: white;
  border-radius: 20px;
  padding: 2px 7px;
  font-size: 9px;
  font-weight: 800;
  margin-left: 4px;
  text-transform: uppercase;
}

/* Order detail totals */
.order-totals {
  padding: 6px 22px 4px;
}

/* Status: confirmed */
.status.confirmed {
  background: #e5efff;
  color: #2861a9;
}

/* Admin actions */
.admin-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.admin-actions button {
  border: 0;
  background: none;
  font-size: 11px;
  cursor: pointer;
  color: var(--ink);
}

.admin-actions button[data-delete-product] {
  color: var(--danger);
}

@media (max-width: 650px) {
  .trust-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .reviews-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =========================================
   MOBILE PASS — phones (max-width: 640px)
========================================= */

@media (max-width: 650px) {

  /* --- Layout & rhythm --- */
  .container {
    width: min(1180px, 92%);
  }

  .narrow {
    width: min(900px, 92%);
  }

  .section {
    padding: 36px 0;
  }

  .page-heading h1 {
    font-size: 27px;
  }

  /* --- Buttons: comfortable touch targets --- */
  .primary-btn,
  .secondary-btn {
    min-height: 44px;
    padding: 10px 18px;
  }

  /* --- Header --- */
  /* =========================
   Header & Navigation - Mobile
========================= */

  .site-header {
    position: relative;
    min-height: 70px;
    height: auto;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 14px 5%;
    background: #ffffff;
    z-index: 100;
  }

  .logo {
    order: 1;
  }

  .menu-toggle {
    display: block;
    order: 2;
    margin-left: auto;
    border: none;
    background: transparent;
    color: var(--ink);
    font-size: 1.6rem;
    cursor: pointer;
  }

  /* Search stays directly below the top header row */
  .header-search {
    order: 3;
    width: 100%;
    flex-basis: 100%;
    margin-top: 4px;
  }

  .header-search input {
    width: 100%;
  }

  /* Mobile menu */
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 5%;
    right: 5%;
    width: auto;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 8px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(20, 28, 40, 0.15);
    z-index: 200;
  }

  .main-nav.open {
    display: flex;
  }
}

.main-nav button {
  width: 100%;
  padding: 13px 12px;
  text-align: left;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #4e5661;
  font-size: 13px;
}

.main-nav button:hover,
.main-nav button.active {
  background: var(--surface);
  color: var(--ink);
}

.main-nav button.active {
  font-weight: 800;
}

/* --- Hero --- */
.hero {
  margin-top: 12px;
  min-height: 0;
}

.hero-copy {
  padding: 26px 22px 28px;
}

.hero h1 {
  font-size: 34px;
  letter-spacing: -1.5px;
  margin: 10px 0 14px;
}

.hero p {
  margin-bottom: 20px;
}

.hero-art {
  min-height: 230px;
}

.hero-circle {
  width: 200px;
  height: 200px;
}

.hero-product {
  width: 165px;
  height: 165px;
}

/* --- Product cards --- */
.product-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.product-image {
  height: 140px;
}

.product-info {
  padding: 12px;
}

.product-info h3 {
  font-size: 13px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-description {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 0;
}

.product-card .primary-btn {
  padding: 9px 8px;
  font-size: 11px;
}

/* --- Category chips --- */
.chips {
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
}

.chip {
  flex: 0 0 auto;
  padding: 9px 15px;
}

/* --- Product detail --- */
.detail-info h1 {
  font-size: 29px;
}

.detail-layout {
  gap: 22px;
}

.qty button {
  width: 44px;
  height: 44px;
}

/* --- Cart --- */
.cart-row {
  grid-template-columns: 1fr 34px;
  padding: 14px 14px;
}

.cart-item {
  align-items: flex-start;
}

.mini-image {
  width: 48px;
  height: 48px;
}

.cart-item .product-title-link {
  font-size: 13px;
}

.cart-item .qty {
  margin: 8px 0 0 60px !important;
}

.cart-summary {
  justify-content: stretch;
  margin-top: 18px;
}

.summary-box {
  width: 100%;
}

/* --- Checkout & success --- */
.button-row {
  flex-wrap: wrap;
}

.button-row .primary-btn,
.button-row .secondary-btn {
  flex: 1 1 auto;
}

/* --- Orders --- */
.order-card {
  padding: 14px 14px;
  gap: 10px;
}

.order-view-head {
  flex-direction: column;
  gap: 12px;
}

.order-items,
.order-totals,
.order-view-head {
  padding-left: 15px;
  padding-right: 15px;
}

/* --- Admin --- */
.stats-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.stat {
  padding: 14px;
}

.stat strong {
  font-size: 19px;
}

.admin-product {
  grid-template-columns: 45px 1fr;
  row-gap: 6px;
}

.admin-product .status {
  grid-column: 1 / 2;
  justify-self: start;
}

.admin-actions {
  grid-column: 2 / 3;
  grid-row: 2;
  justify-content: flex-end;
}

.admin-actions button {
  padding: 9px 2px;
  font-size: 12px;
}

.admin-order-row {
  grid-template-columns: 1fr auto;
  row-gap: 7px;
  padding: 12px 0;
}

.admin-order-row strong {
  font-size: 13px;
}

.admin-order-row>span:nth-of-type(1) {
  grid-column: 1;
  grid-row: 2;
}

.admin-order-row>span:nth-of-type(2) {
  grid-column: 1;
  grid-row: 3;
}

.admin-order-row>span:nth-of-type(3) {
  display: none;
}

.admin-order-row>span:nth-of-type(4) {
  grid-column: 1;
  grid-row: 3;
}

.admin-order-row>span:nth-of-type(4)::after {
  content: "";
}

.admin-order-row select {
  grid-column: 2;
  grid-row: 2 / span 2;
  align-self: center;
  padding: 9px;
  font-size: 12px;
}

.image-input-row {
  grid-template-columns: 1fr 44px;
}

.remove-image-btn {
  width: 44px;
  height: 44px;
}

/* --- Auth modal: bottom sheet on phones ---
     Sits above the iOS visual viewport so the keyboard
     can never cover the inputs or the submit button. */
.modal-overlay {
  padding: 12px;
  align-items: end;
  position: fixed;
  height: 100dvh;
}

.modal-overlay:not(.hidden) {
  display: flex;
  align-items: flex-end;
}

.auth-card {
  width: 100%;
  max-height: 82dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 22px 18px 18px;
}

/* --- Toast --- */
.toast {
  left: 12px;
  right: 12px;
  top: 12px;
  text-align: center;
}

/* --- Footer --- */
footer {
  margin-top: 18px;
}


/* =========================================
   SMALL PHONES (max-width: 380px)
========================================= */

@media (max-width: 380px) {
  .hero h1 {
    font-size: 29px;
  }

  .product-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .product-image {
    height: 120px;
  }

  .page-heading h1 {
    font-size: 24px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* =========================================
   TOUCH DEVICES — remove hover-only affordances
   and enable momentum scrolling everywhere
========================================= */

@media (hover: none) {
  .product-card:hover {
    transform: none;
    box-shadow: none;
  }

  .primary-btn:hover {
    transform: none;
    box-shadow: none;
  }

  .gallery-arrow:hover {
    background: rgba(255, 255, 255, 0.92);
  }

  body {
    -webkit-overflow-scrolling: touch;
  }
}
/* =========================================
   v2.3 — Support page, location box, order actions
========================================= */

/* Support page */
.support-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 34px;
}

.support-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px;
  background: #fff;
  border: 1px solid #e6e9ee;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.support-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.support-card strong {
  font-size: 15px;
}

.support-card span {
  font-weight: 600;
}

.faq-heading {
  margin-bottom: 14px;
}

.faq-item {
  background: #fff;
  border: 1px solid #e6e9ee;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 10px;
}

.faq-item summary {
  font-weight: 600;
  cursor: pointer;
}

.faq-item p {
  margin: 10px 0 0;
  color: #55606e;
}

@media (max-width: 650px) {
  .support-cards {
    grid-template-columns: 1fr;
  }
}

/* Checkout: location + delivery fee */
.location-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  background: #f5f8f6;
  border: 1px dashed #b9d4c5;
  border-radius: 12px;
  margin-bottom: 14px;
}

.location-box .location-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 14px;
}

.location-box small {
  line-height: 1.45;
}

@media (max-width: 650px) {
  .location-box {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }
}

/* Order actions (cancel / return) */
.order-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed #e2e6ec;
}

.order-actions .danger-btn {
  color: #b3261e;
  border-color: #e6b8b5;
  align-self: flex-start;
}

.order-actions-note {
  margin-top: 14px;
}

/* Status pills for the new states */
.status.return-requested,
.status.returned {
  background: #fff4e0;
  color: #92580a;
}

.status.cancelled-by-customer {
  background: #f3e8ff;
  color: #6b21a8;
}

/* ===== Share buttons (product cards + detail page) ===== */
.share-btn {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--muted);
  border-radius: 999px;
  cursor: pointer;
  font-size: .8rem;
  padding: 4px 10px;
  transition: color .15s, border-color .15s;
}
.share-btn:hover { color: var(--ink); border-color: var(--ink); }

/* ===== Open Box Delivery note (checkout + order pages) ===== */
.open-box-note {
  background: #f0f7f2;
  border: 1px solid #cfe5d6;
  color: #2c5e40;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: .9rem;
  margin: 10px 0;
}

/* ===== Delivery-day picker (checkout) ===== */
.delivery-day-picker {
  display: flex;
  gap: 8px;
  margin: 8px 0 4px;
}
.delivery-day-picker label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  cursor: pointer;
  background: var(--white);
  font-size: .92rem;
}
.delivery-day-picker label:has(input:checked) {
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
  font-weight: 600;
}

/* ===== Admin order rows: stacked selects + items list ===== */
.admin-order-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
}
.admin-order-controls select { width: 100%; }
.admin-order-row small.muted { word-break: break-word; }

/* ===== Supporting text under checkout fields ===== */
.supporting-text {
  color: var(--muted);
  font-size: .85rem;
  margin-top: 4px;
}

/* ===== Flipkart-style pricing (selling price + struck MRP + % off) ===== */
.price-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.mrp-strike {
  color: var(--muted);
  text-decoration: line-through;
  font-size: .85rem;
}
.off-badge {
  color: #1a7f4b;
  font-weight: 700;
  font-size: .85rem;
}
.mrp-inline {
  color: var(--muted);
  text-decoration: line-through;
  font-size: .9rem;
  font-weight: 400;
}
.off-inline {
  color: #1a7f4b;
  font-weight: 700;
  font-size: .9rem;
}

/* ===== Minimum order warning (checkout) ===== */
.min-order-warn {
  background: #fdf3e3;
  border: 1px solid #f0d9ae;
  color: #8a5a10;
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: .9rem;
  margin: 8px 0;
}

/* ===== WhatsApp button (admin orders) ===== */
.wa-btn {
  display: inline-block;
  margin-top: 6px;
  background: #dcf8c6;
  border: 1px solid #b9e3a6;
  color: #1f7a3d;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: .8rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.wa-btn:hover { background: #c9f0b4; }

/* ===== Floating cart button — sits beside the search bar on mobile ===== */
.cart-fab { display: none; }

@media (max-width: 900px) {
  /* Keep the first header row on one line: logo · search · cart · menu */
  .header-search {
    order: 1;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }
  .cart-fab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    order: 2;
    border: 1px solid var(--line);
    background: var(--white);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 1.05rem;
    cursor: pointer;
    line-height: 1;
  }
  .menu-toggle { order: 3; }

  #cartCountFab {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
  }
}

@media (max-width: 380px) {
  .cart-fab { padding: 6px 9px; font-size: .95rem; }
}
