/* KTCSTORE premium mobile finishing layer.
   Loaded after each page's legacy mobile rules; presentation only. */
:root {
  --ktc-blush: #c94e68;
  --ktc-rose: #a83d56;
  --ktc-cream: #fff8f5;
  --ktc-line: #f0e1dc;
  --ktc-ink: #302824;
}

@media (max-width: 767px) {
  html, body { max-width: 100%; }
  body { color: var(--ktc-ink); background: #fffdfa; }
  header { box-shadow: 0 3px 16px rgba(82, 45, 44, .07) !important; }
  .nav .logo { color: #352725 !important; letter-spacing: .7px !important; }
  .nav .cart-btn, #customerLoginBtn, .hero-btn, .add-btn,
  .cart-checkout-btn, .checkout-btn, .primary-btn {
    background: linear-gradient(135deg, #cf536d, #a93652) !important;
    box-shadow: 0 5px 14px rgba(169, 54, 82, .16) !important;
  }
  .ktc-main-nav a { border-color: #f0dfdb !important; background: #fff8f5 !important; }
  .ktc-hero-slider, .ktc-hero-slides, .ktc-hero-slide,
  .ktc-hero-visual { min-height: 440px !important; height: 440px !important; }
  .ktc-hero-visual { opacity: .42 !important; }
  .ktc-hero-copy { padding-top: 28px !important; }
  .ktc-hero-copy h1 { font-size: clamp(36px, 10vw, 48px) !important; }
  .ktc-hero-copy .hero-btn { border-radius: 999px !important; }
  .category-showcase, .new-arrivals, .best-sellers, .why-ktc,
  .beauty-trust, #productsSection {
    padding-top: 25px !important; padding-bottom: 18px !important;
  }
  .category-showcase-head h2, .new-arrivals h2, .best-sellers h2,
  .why-ktc h2 { color: #382a28 !important; font-size: 27px !important; letter-spacing: -.35px; }
  .category-showcase-head p, .new-arrivals-head p, .best-sellers-head p {
    color: #82736f !important;
  }
  .category-showcase-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 12px !important; }
  .beauty-category { border: 1px solid #f2e4df !important; background: #fff !important; box-shadow: 0 5px 16px rgba(71, 41, 35, .055) !important; }
  .beauty-category-image { width: 78% !important; height: auto !important; aspect-ratio: 1 / 1; margin: 11px auto 0 !important; padding: 7px !important; border-radius: 50% !important; overflow: hidden !important; background-color: #fff4f1 !important; }
  .beauty-category-image img { border-radius: 50% !important; object-fit: cover !important; }
  .beauty-category-content { padding: 8px 4px 10px !important; text-align: center !important; }
  .beauty-category-content h3 { font-size: 10px !important; line-height: 1.2 !important; }
  .beauty-category-content p { display: none !important; }
  .new-arrivals-grid, .best-sellers-grid, .products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important;
  }
  .product-card {
    border: 1px solid #f1e7e3 !important; border-radius: 14px !important;
    background: #fff !important; box-shadow: 0 5px 18px rgba(61, 42, 37, .055) !important;
  }
  .product-img { height: clamp(140px, 42vw, 175px) !important; background: linear-gradient(145deg, #fff9f7, #f8efeb) !important; }
  .product-info { padding: 9px !important; }
  .product-name { color: #382e2b !important; font-size: 12px !important; }
  .selling-price, .price .selling-price { color: #a83d56 !important; }
  .add-btn { min-height: 40px !important; height: 40px !important; border-radius: 10px !important; font-size: 10px !important; }
  .wishlist-btn { border: 1px solid #f0e1dc !important; background: rgba(255,255,255,.96) !important; }
  .ktc-product-carousel-track { grid-auto-columns: calc((100% - 10px) / 2) !important; gap: 10px !important; }
  .ktc-product-carousel-track .product-img { height: clamp(140px, 42vw, 175px) !important; }
  .product-modal-overlay { padding: max(6px, env(safe-area-inset-top)) 6px max(6px, env(safe-area-inset-bottom)) !important; }
  .product-modal { max-height: calc(100dvh - 12px) !important; overflow-y: auto !important; overscroll-behavior: contain; }
  .product-modal-info { padding-bottom: max(20px, env(safe-area-inset-bottom)) !important; }
  .modal-variations { padding: 12px !important; border-radius: 14px !important; background: #fff8f6 !important; }
  .ktc-shade-options { gap: 8px !important; }
  .ktc-shade-option { min-height: 42px !important; border-radius: 12px !important; background: #fff !important; }
  .ktc-shade-option.active { border-color: var(--ktc-blush) !important; box-shadow: 0 0 0 3px rgba(201,78,104,.14) !important; }
  .ktc-shade-option { position: relative; width: 44px !important; height: 44px !important; min-height: 44px !important; padding: 4px !important; justify-content: center !important; border-radius: 12px !important; }
  .ktc-shade-dot { width: 32px !important; height: 32px !important; flex-basis: 32px !important; border-radius: 9px !important; }
  .ktc-shade-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
  .ktc-gallery-thumbs { justify-content: flex-start !important; gap: 8px !important; padding: 9px 2px 3px !important; }
  .ktc-gallery-thumb { flex-basis: 56px !important; width: 56px !important; height: 56px !important; border-color: #f0dfda !important; }
  .ktc-gallery-thumb.active { border: 2px solid var(--ktc-blush) !important; box-shadow: 0 0 0 2px rgba(201,78,104,.12) !important; }
  .cart-overlay { padding: 0 !important; align-items: stretch !important; }
  .cart-panel { width: min(100%, 440px) !important; height: 100dvh !important; max-height: 100dvh !important; border-radius: 20px 20px 0 0 !important; }
  .cart-header, .cart-footer { background: #fff !important; }
  .cart-footer { padding-bottom: max(16px, env(safe-area-inset-bottom)) !important; }
  .cart-items { overscroll-behavior: contain; }
  .ktc-account-modal-overlay { padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom)) !important; }
  .ktc-account-modal { width: 100% !important; max-height: calc(100dvh - 16px) !important; overflow-y: auto !important; border-radius: 19px !important; }
  .ktc-order-card, .ktc-profile-card { border-radius: 14px !important; }
  button, a, input, select, textarea { scroll-margin-bottom: 20px; }
}

@media (max-width: 390px) {
  .category-showcase-grid { gap: 8px !important; }
  .beauty-category-content h3 { font-size: 9px !important; }
  .product-img, .ktc-product-carousel-track .product-img { height: 145px !important; }
  .product-name { font-size: 11px !important; }
}

/* Homepage product sections share one responsive rhythm and card scale. */
@media (min-width: 768px) {
  body.ktc-home-page .featured-products-section,
  body.ktc-home-page .best-sellers:not(.featured-products-section),
  body.ktc-home-page .new-arrivals,
  body.ktc-home-page #productsSection,
  body.ktc-home-page #ktcDiscoverySection {
    max-width: 1600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: clamp(28px, 3vw, 52px) !important;
    padding-right: clamp(28px, 3vw, 52px) !important;
  }
  body.ktc-home-page .featured-products-section,
  body.ktc-home-page .best-sellers:not(.featured-products-section),
  body.ktc-home-page .new-arrivals {
    padding-top: 38px !important;
    padding-bottom: 30px !important;
  }
  body.ktc-home-page .featured-products-section {
    padding-bottom: 10px !important;
  }
  body.ktc-home-page .featured-products-section + .best-sellers {
    padding-top: 16px !important;
  }
  body.ktc-home-page .best-sellers:not(.featured-products-section) + .new-arrivals {
    padding-top: 24px !important;
  }
  body.ktc-home-page .new-arrivals-head,
  body.ktc-home-page .best-sellers-head { margin-bottom: 24px !important; }
  body.ktc-home-page #featuredProductsGrid,
  body.ktc-home-page #bestSellersGrid,
  body.ktc-home-page #newArrivalsGrid {
    grid-auto-columns: calc((100% - 32px) / 3) !important;
    gap: 16px !important;
    padding-bottom: 10px !important;
  }
  body.ktc-home-page #productsGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 22px !important;
  }
  body.ktc-home-page #productsGrid .product-img { height: 320px !important; }
  body.ktc-home-page #featuredProductsGrid > .product-card,
  body.ktc-home-page #bestSellersGrid > .product-card,
  body.ktc-home-page #newArrivalsGrid > .product-card {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
  }
  body.ktc-home-page #featuredProductsGrid .product-img,
  body.ktc-home-page #bestSellersGrid .product-img,
  body.ktc-home-page #newArrivalsGrid .product-img {
    height: clamp(300px, 22vw, 350px) !important;
    padding: 20px !important;
  }
  body.ktc-home-page #featuredProductsGrid .product-img img,
  body.ktc-home-page #bestSellersGrid .product-img img,
  body.ktc-home-page #newArrivalsGrid .product-img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
  }
  body.ktc-home-page #featuredProductsGrid .product-info,
  body.ktc-home-page #bestSellersGrid .product-info,
  body.ktc-home-page #newArrivalsGrid .product-info {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    padding: 17px !important;
  }
  body.ktc-home-page #featuredProductsGrid .product-actions,
  body.ktc-home-page #bestSellersGrid .product-actions,
  body.ktc-home-page #newArrivalsGrid .product-actions { margin-top: auto !important; padding-top: 12px; }

  body.ktc-home-page #ktcDiscoverySection {
    padding-top: 32px !important;
    padding-bottom: 40px !important;
  }
  body.ktc-home-page #ktcDiscoverySection .ktc-discovery-block { margin-top: 22px !important; }
  body.ktc-home-page #ktcDiscoverySection .ktc-discovery-head { margin-bottom: 22px !important; }
  body.ktc-home-page #ktcDiscoverySection .ktc-discovery-grid { gap: 18px !important; }
  body.ktc-home-page #ktcDiscoverySection .ktc-discovery-img {
    height: clamp(270px, 20vw, 320px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
  }
  body.ktc-home-page #ktcDiscoverySection .ktc-discovery-img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
  }
  body.ktc-home-page #ktcDiscoverySection .ktc-discovery-name {
    min-height: 2.7em;
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    line-height: 1.35;
  }
}

@media (min-width: 1600px) {
  body.ktc-home-page #featuredProductsGrid,
  body.ktc-home-page #bestSellersGrid,
  body.ktc-home-page #newArrivalsGrid {
    grid-auto-columns: calc((100% - 48px) / 4) !important;
  }
}

@media (max-width: 767px) {
  body.ktc-home-page .featured-products-section,
  body.ktc-home-page .best-sellers:not(.featured-products-section),
  body.ktc-home-page .new-arrivals {
    padding-top: 14px !important;
    padding-bottom: 12px !important;
  }
  body.ktc-home-page .featured-products-section { padding-bottom: 6px !important; }
  body.ktc-home-page .featured-products-section + .best-sellers { padding-top: 12px !important; }
  body.ktc-home-page .best-sellers:not(.featured-products-section) + .new-arrivals { padding-top: 14px !important; }
  body.ktc-home-page .featured-products-section .best-sellers-head,
  body.ktc-home-page .best-sellers:not(.featured-products-section) .best-sellers-head,
  body.ktc-home-page .new-arrivals-head { margin-bottom: 16px !important; }
  body.ktc-home-page #featuredProductsGrid,
  body.ktc-home-page #bestSellersGrid,
  body.ktc-home-page #newArrivalsGrid {
    grid-auto-columns: min(84%, 320px) !important;
    gap: 12px !important;
    padding: 2px 2px 8px !important;
    scroll-snap-type: x mandatory !important;
  }
  body.ktc-home-page #productsGrid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
  }
  body.ktc-home-page #productsGrid .product-img {
    height: clamp(220px, 72vw, 300px) !important;
  }
  body.ktc-home-page #featuredProductsGrid > .product-card,
  body.ktc-home-page #bestSellersGrid > .product-card,
  body.ktc-home-page #newArrivalsGrid > .product-card {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    scroll-snap-align: start !important;
  }
  body.ktc-home-page #featuredProductsGrid .product-img,
  body.ktc-home-page #bestSellersGrid .product-img,
  body.ktc-home-page #newArrivalsGrid .product-img {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: 1 / 1 !important;
    padding: 12px !important;
  }
  body.ktc-home-page #featuredProductsGrid .product-img img,
  body.ktc-home-page #bestSellersGrid .product-img img,
  body.ktc-home-page #newArrivalsGrid .product-img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
  }
  body.ktc-home-page #ktcDiscoverySection {
    padding-top: 20px !important;
    padding-bottom: 28px !important;
  }
  body.ktc-home-page #ktcDiscoverySection .ktc-discovery-head { margin-bottom: 18px !important; }
  body.ktc-home-page #ktcDiscoverySection .ktc-discovery-block { margin-top: 20px !important; }
  body.ktc-home-page #ktcDiscoverySection .ktc-discovery-grid {
    gap: 12px !important;
    scroll-padding-inline: 2px;
  }
  body.ktc-home-page #ktcDiscoverySection .ktc-discovery-card {
    flex: 0 0 min(84vw, 320px) !important;
    min-width: 0 !important;
    scroll-snap-align: start !important;
  }
  body.ktc-home-page #ktcDiscoverySection .ktc-discovery-img {
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    padding: 12px !important;
  }
  body.ktc-home-page #ktcDiscoverySection .ktc-discovery-img img { object-fit: contain !important; }
  body.ktc-home-page #ktcDiscoverySection .ktc-discovery-name {
    min-height: 2.7em;
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    line-height: 1.35;
  }
}

/* Homepage discovery stays in the same full-width, vertical section layout at every size. */
body.ktc-home-page #ktcDiscoverySection {
  width: min(1344px, 100%) !important;
  max-width: 1344px !important;
  margin: 0 auto !important;
  padding: 28px 24px 56px !important;
}
body.ktc-home-page #ktcDiscoverySection .ktc-discovery-block {
  display: block;
  width: 100%;
  margin: 24px 0 0 !important;
  padding: 22px !important;
  border: 1px solid rgba(183,123,101,.15) !important;
  border-radius: 22px !important;
  background: linear-gradient(135deg,#fffaf7,#fff) !important;
  box-shadow: 0 10px 30px rgba(75,45,35,.055) !important;
}
body.ktc-home-page #ktcDiscoverySection .ktc-offer-block { background: linear-gradient(135deg,#fff6f0,#f9ebe3) !important; }
body.ktc-home-page #ktcDiscoverySection .ktc-discovery-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,260px),1fr)) !important;
  gap: 16px !important;
  overflow: visible !important;
}
body.ktc-home-page #ktcDiscoverySection .ktc-discovery-card { min-width: 0 !important; scroll-snap-align: unset !important; }
body.ktc-home-page #ktcDiscoverySection .ktc-discovery-img {
  height: 280px !important;
  aspect-ratio: auto !important;
  padding: 12px !important;
}
body.ktc-home-page #ktcDiscoverySection .ktc-discovery-img img { object-fit: contain !important; }
body.ktc-home-page #ktcDiscoverySection .ktc-discovery-title { align-items: center !important; }
body.ktc-home-page #ktcDiscoverySection .ktc-discovery-see-all {
  display: inline-flex !important;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid rgba(169,110,89,.28);
  border-radius: 999px;
  background: #fff;
  color: #8c5847;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}
body.ktc-home-page .why-ktc {
  width: min(1344px,100%) !important;
  max-width: 1344px !important;
  margin: 0 auto !important;
  padding: 30px 24px !important;
}
body.ktc-home-page .why-ktc-head { margin-bottom: 16px !important; }
body.ktc-home-page .why-ktc-grid { gap: 12px !important; }
body.ktc-home-page .why-ktc-card { padding: 16px !important; }
@media (max-width: 1000px) {
  body.ktc-home-page #ktcDiscoverySection .ktc-discovery-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,220px),1fr)) !important; }
  body.ktc-home-page #ktcDiscoverySection .ktc-discovery-img { height: 250px !important; }
}
@media (max-width: 767px) {
  body.ktc-home-page #ktcDiscoverySection { padding: 20px 14px 38px !important; }
  body.ktc-home-page #ktcDiscoverySection .ktc-discovery-block { margin-top: 16px !important; padding: 16px !important; border-radius: 18px !important; }
  body.ktc-home-page #ktcDiscoverySection .ktc-discovery-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,145px),1fr)) !important; gap: 12px !important; }
  body.ktc-home-page #ktcDiscoverySection .ktc-discovery-img { height: auto !important; aspect-ratio: 1 / 1 !important; padding: 8px !important; }
  body.ktc-home-page #ktcDiscoverySection .ktc-discovery-title h3 { font-size: 22px !important; }
  body.ktc-home-page #ktcDiscoverySection .ktc-discovery-see-all { min-height: 36px; padding: 0 12px; font-size: 11px; }
  body.ktc-home-page #ktcDiscoverySection .ktc-discovery-title small { display: none; }
  body.ktc-home-page .why-ktc { padding: 22px 14px !important; }
  body.ktc-home-page .why-ktc-grid { gap: 9px !important; }
  body.ktc-home-page .why-ktc-card { padding: 13px !important; }
}

/* Standalone order and invoice pages use their own compact page markup. */
@media (max-width: 700px) {
  .wrap { width: 100%; padding-left: 12px !important; padding-right: 12px !important; }
  .invoice, .state { border-radius: 18px !important; }
  .top { padding-left: 14px !important; padding-right: 14px !important; }
  .back, .back-btn, .btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; }
}

/* Compact product grids for the three homepage collections. */
body.ktc-home-page .featured-products-section,
body.ktc-home-page .best-sellers:not(.featured-products-section),
body.ktc-home-page .new-arrivals {
  padding-top: clamp(18px, 2.2vw, 30px) !important;
  padding-bottom: clamp(18px, 2.2vw, 30px) !important;
}
body.ktc-home-page .featured-products-section .best-sellers-head,
body.ktc-home-page .best-sellers:not(.featured-products-section) .best-sellers-head,
body.ktc-home-page .new-arrivals-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin-bottom: 14px !important;
}
body.ktc-home-page .featured-products-section .best-sellers-head > div,
body.ktc-home-page .best-sellers:not(.featured-products-section) .best-sellers-head > div,
body.ktc-home-page .new-arrivals-head > div { min-width: 0; }
body.ktc-home-page .featured-products-section .best-sellers-btn,
body.ktc-home-page .best-sellers:not(.featured-products-section) .best-sellers-btn,
body.ktc-home-page .new-arrivals-btn {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 13px !important;
  border: 1px solid rgba(169,110,89,.28) !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #8c5847 !important;
  font-size: 11px !important;
  font-weight: 700;
  white-space: nowrap;
}
body.ktc-home-page .ktc-product-carousel {
  display: block !important;
  width: 100%;
}
body.ktc-home-page .ktc-product-carousel-track {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-auto-flow: row !important;
  grid-auto-columns: auto !important;
  gap: 14px !important;
  width: 100%;
  overflow: visible !important;
  padding: 2px 1px 6px !important;
  scroll-snap-type: none !important;
}
body.ktc-home-page .ktc-product-arrow { display: none !important; }
body.ktc-home-page #featuredProductsGrid > .product-card,
body.ktc-home-page #bestSellersGrid > .product-card,
body.ktc-home-page #newArrivalsGrid > .product-card {
  display: flex !important;
  flex-direction: column !important;
  width: auto !important;
  min-width: 0 !important;
  height: 100% !important;
  overflow: hidden;
  border: 1px solid #eee2dc !important;
  border-radius: 13px !important;
  background: #fff !important;
  box-shadow: 0 3px 12px rgba(61,42,37,.06) !important;
}
body.ktc-home-page #featuredProductsGrid .product-img,
body.ktc-home-page #bestSellersGrid .product-img,
body.ktc-home-page #newArrivalsGrid .product-img {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: clamp(170px, 18vw, 230px) !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 10px !important;
  background: #fffaf7 !important;
}
body.ktc-home-page #featuredProductsGrid .product-img img,
body.ktc-home-page #bestSellersGrid .product-img img,
body.ktc-home-page #newArrivalsGrid .product-img img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
}
body.ktc-home-page #featuredProductsGrid .product-info,
body.ktc-home-page #bestSellersGrid .product-info,
body.ktc-home-page #newArrivalsGrid .product-info {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  gap: 4px;
  min-width: 0;
  padding: 10px !important;
}
body.ktc-home-page #featuredProductsGrid .product-name,
body.ktc-home-page #bestSellersGrid .product-name,
body.ktc-home-page #newArrivalsGrid .product-name {
  display: -webkit-box !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  min-height: 2.6em !important;
  overflow: hidden !important;
  font-size: 13px !important;
  line-height: 1.3 !important;
}
body.ktc-home-page #featuredProductsGrid .product-actions,
body.ktc-home-page #bestSellersGrid .product-actions,
body.ktc-home-page #newArrivalsGrid .product-actions {
  gap: 6px !important;
  margin-top: auto !important;
  padding-top: 8px !important;
}
body.ktc-home-page #featuredProductsGrid .add-btn,
body.ktc-home-page #bestSellersGrid .add-btn,
body.ktc-home-page #newArrivalsGrid .add-btn {
  min-width: 0;
  min-height: 38px !important;
  height: 38px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
}

@media (min-width: 768px) and (max-width: 1100px) {
  body.ktc-home-page .ktc-product-carousel-track { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (max-width: 767px) {
  body.ktc-home-page .featured-products-section,
  body.ktc-home-page .best-sellers:not(.featured-products-section),
  body.ktc-home-page .new-arrivals { padding: 18px 14px !important; }
  body.ktc-home-page .ktc-product-carousel-track {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
  body.ktc-home-page .ktc-product-carousel-track > .product-card:nth-child(n+9) { display: none !important; }
  body.ktc-home-page #featuredProductsGrid .product-img,
  body.ktc-home-page #bestSellersGrid .product-img,
  body.ktc-home-page #newArrivalsGrid .product-img { height: clamp(135px, 40vw, 165px) !important; padding: 8px !important; }
  body.ktc-home-page #featuredProductsGrid .product-info,
  body.ktc-home-page #bestSellersGrid .product-info,
  body.ktc-home-page #newArrivalsGrid .product-info { padding: 8px !important; }
  body.ktc-home-page #featuredProductsGrid .product-name,
  body.ktc-home-page #bestSellersGrid .product-name,
  body.ktc-home-page #newArrivalsGrid .product-name { font-size: 12px !important; }
  body.ktc-home-page #featuredProductsGrid .add-btn,
  body.ktc-home-page #bestSellersGrid .add-btn,
  body.ktc-home-page #newArrivalsGrid .add-btn { min-height: 36px !important; height: 36px !important; font-size: 10px !important; }

  /* Fit the gallery stage and thumbnails together instead of clipping the image stage. */
  .product-modal-image {
    box-sizing: border-box !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 12px !important;
  }
  .product-modal-image .ktc-gallery-stage {
    flex: 0 0 auto !important;
    width: 100% !important;
    height: clamp(230px, 72vw, 300px) !important;
    min-height: 0 !important;
  }
  .product-modal-image #modalProductImage {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
  }
  .product-modal-image .ktc-gallery-thumbs { flex: 0 0 auto; }
}

/* Product detail modal: luxury cosmetics finish, scoped to the existing modal. */
.product-modal-overlay {
  --ktc-modal-ivory: #fbf7f2;
  --ktc-modal-blush: #f4e5e5;
  --ktc-modal-rose: #b76e79;
  --ktc-modal-espresso: #2b211f;
  --ktc-modal-gold: #c6a15b;
  background: rgba(43, 33, 31, .68);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.product-modal-overlay .product-modal {
  width: min(1120px, 100%);
  border: 1px solid rgba(183, 110, 121, .2);
  border-radius: 30px;
  background: var(--ktc-modal-ivory);
  box-shadow: 0 34px 100px rgba(43, 33, 31, .3), 0 4px 18px rgba(43, 33, 31, .08);
  scrollbar-color: #d7b7b6 transparent;
}
.product-modal-overlay .product-modal-grid { min-width: 0; }
.product-modal-overlay .product-modal-close {
  border: 1px solid rgba(43, 33, 31, .1);
  background: rgba(255, 255, 255, .94);
  color: var(--ktc-modal-espresso);
  box-shadow: 0 7px 22px rgba(43, 33, 31, .1);
  transition: color .2s ease, background .2s ease, transform .2s ease;
}
.product-modal-overlay .product-modal-close:hover { color: var(--ktc-modal-rose); transform: rotate(4deg); }

.product-modal-overlay .product-modal-image {
  min-width: 0;
  background: radial-gradient(ellipse at 50% 38%, #fff 0, var(--ktc-modal-ivory) 70%, #f1e8e1 100%);
  border-color: rgba(183, 110, 121, .12);
}
.product-modal-overlay .ktc-gallery-stage {
  border: 1px solid rgba(183, 110, 121, .1);
  border-radius: 24px;
  background: linear-gradient(145deg, #fff, #f8f1eb);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 12px 34px rgba(43, 33, 31, .055);
}
.product-modal-overlay .ktc-gallery-stage #modalProductImage {
  border-radius: 18px;
  transition: opacity .22s ease, transform .4s cubic-bezier(.2, .7, .2, 1);
}
@media (hover: hover) and (pointer: fine) {
  .product-modal-overlay .ktc-gallery-stage #modalProductImage:hover { transform: scale(1.045); }
}
.product-modal-overlay .ktc-gallery-arrow {
  border: 1px solid rgba(183, 110, 121, .22);
  background: rgba(255, 255, 255, .94);
  color: var(--ktc-modal-espresso);
  box-shadow: 0 7px 22px rgba(43, 33, 31, .12);
}
.product-modal-overlay .ktc-gallery-arrow:hover { color: var(--ktc-modal-rose); border-color: var(--ktc-modal-rose); }
.product-modal-overlay .ktc-gallery-thumbs { gap: 10px; }
.product-modal-overlay .ktc-gallery-thumb {
  border: 1px solid #e8d9d3;
  border-radius: 13px;
  box-shadow: 0 3px 12px rgba(43, 33, 31, .06);
}
.product-modal-overlay .ktc-gallery-thumb:hover { border-color: var(--ktc-modal-rose); }
.product-modal-overlay .ktc-gallery-thumb.active {
  border: 2px solid var(--ktc-modal-rose);
  box-shadow: 0 0 0 3px rgba(183, 110, 121, .12), 0 6px 18px rgba(43, 33, 31, .1);
}
.product-modal-overlay .ktc-gallery-counter { background: rgba(43, 33, 31, .72); }

.product-modal-overlay .product-modal-info { min-width: 0; color: var(--ktc-modal-espresso); }
.product-modal-overlay .ktc-product-brand { color: #9b6d63; letter-spacing: .19em; }
.product-modal-overlay .modal-product-category {
  border: 1px solid rgba(183, 110, 121, .18);
  border-radius: 999px;
  background: #fffaf7;
  color: #8f5d62;
  letter-spacing: .14em;
}
.product-modal-overlay .product-modal-info h2 {
  margin-top: 11px;
  color: var(--ktc-modal-espresso);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: 1.12;
}
.product-modal-overlay .modal-product-sku { color: #766963; }
.product-modal-overlay .modal-product-price {
  gap: 8px 11px;
  margin-top: 18px;
  padding: 15px 16px;
  border: 1px solid rgba(183, 110, 121, .16);
  border-radius: 17px;
  background: linear-gradient(135deg, #fff, #fbf2ee);
}
.product-modal-overlay .modal-selling-price { color: var(--ktc-modal-rose); font-weight: 750; }
.product-modal-overlay .modal-mrp { color: #857a73; }
.product-modal-overlay .modal-discount {
  border: 1px solid rgba(198, 161, 91, .24);
  border-radius: 999px;
  background: #fbf4e6;
  color: #765b25;
}
.product-modal-overlay .modal-stock { border-radius: 999px; }
.product-modal-overlay .modal-variations {
  border: 1px solid rgba(183, 110, 121, .17);
  border-radius: 18px;
  background: #fffdfb;
}
.product-modal-overlay .variation-type-label { color: #786961; letter-spacing: .1em; }
.product-modal-overlay .variation-option {
  border-color: #e6d9d2;
  background: #fff;
  color: #493a35;
  transition: border-color .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.product-modal-overlay .variation-option:hover:not(:disabled) { border-color: var(--ktc-modal-rose); transform: translateY(-1px); }
.product-modal-overlay .variation-option.active { border-color: var(--ktc-modal-rose); background: var(--ktc-modal-blush); color: var(--ktc-modal-espresso); box-shadow: 0 0 0 3px rgba(183, 110, 121, .12); }
.product-modal-overlay .variation-option:disabled { border-color: #e6dfdb; background: #f3f0ed; color: #655e59; }
.product-modal-overlay .ktc-shade-option { border-color: #e6d9d2; color: var(--ktc-modal-espresso); }
.product-modal-overlay .ktc-shade-option:hover { border-color: var(--ktc-modal-rose); }
.product-modal-overlay .ktc-shade-option.active { border-color: var(--ktc-modal-rose); box-shadow: 0 0 0 3px rgba(183, 110, 121, .14); }
.product-modal-overlay .ktc-shade-dot { border-radius: 50%; }
.product-modal-overlay .selected-variation-info { color: #6f625b; }
.product-modal-overlay .modal-product-description,
.product-modal-overlay .ktc-product-detail-copy { color: #514641; line-height: 1.75; }
.product-modal-overlay .ktc-product-description-heading { color: #7b554f; }
.product-modal-overlay .ktc-product-detail-group {
  border: 1px solid rgba(183, 110, 121, .13);
  border-radius: 16px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 4px 14px rgba(43, 33, 31, .035);
}
.product-modal-overlay .ktc-product-detail-group h3 { color: #76554d; }

.product-modal-overlay .modal-quantity {
  min-height: 46px;
  border: 1px solid #e5d7d0;
  border-radius: 999px;
  background: #fff;
}
.product-modal-overlay .modal-quantity button { color: var(--ktc-modal-espresso); transition: color .18s ease, background .18s ease; }
.product-modal-overlay .modal-quantity button:hover { background: var(--ktc-modal-blush); color: #8f505c; }
.product-modal-overlay .modal-quantity span { color: var(--ktc-modal-espresso); font-weight: 700; }
.product-modal-overlay .modal-product-actions { gap: 10px; }
.product-modal-overlay .modal-add-cart,
.product-modal-overlay .ktc-modal-buy-now {
  min-height: 48px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: .035em;
  transition: color .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.product-modal-overlay .modal-add-cart { border-color: var(--ktc-modal-espresso); background: var(--ktc-modal-espresso); color: #fff; box-shadow: 0 7px 18px rgba(43, 33, 31, .14); }
.product-modal-overlay .modal-add-cart:hover:not(:disabled) { border-color: #513b35; background: #513b35; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(43, 33, 31, .18); }
.product-modal-overlay .ktc-modal-buy-now { border-color: var(--ktc-modal-rose); background: #fff; color: #8f505c; }
.product-modal-overlay .ktc-modal-buy-now:hover:not(:disabled) { border-color: var(--ktc-modal-rose); background: var(--ktc-modal-rose); color: #fff; transform: translateY(-1px); }
.product-modal-overlay .modal-add-cart:disabled,
.product-modal-overlay .ktc-modal-buy-now:disabled { border-color: #d5ceca; background: #e7e2df; color: #514a46; box-shadow: none; }

.product-modal-overlay .product-rating-summary { margin-top: 17px; }
.product-modal-overlay .product-stars,
.product-modal-overlay .review-card-stars { color: #a67c32; letter-spacing: .09em; }
.product-modal-overlay .product-rating-text { color: #6d625c; }
.product-modal-overlay .product-rating-text strong { color: var(--ktc-modal-espresso); }
.product-modal-overlay .product-reviews-section { border-top-color: #eadbd6; }
.product-modal-overlay .reviews-heading h3,
.product-modal-overlay .write-review-box h4 { color: var(--ktc-modal-espresso); font-family: Georgia, "Times New Roman", serif; }
.product-modal-overlay .reviews-heading > span { color: #765b25; }
.product-modal-overlay .review-card { border: 1px solid #ecdfd9; border-radius: 15px; background: #fff; box-shadow: 0 4px 14px rgba(43, 33, 31, .04); }
.product-modal-overlay .review-card-name { color: var(--ktc-modal-espresso); }
.product-modal-overlay .review-card-text { color: #5d514c; line-height: 1.65; }
.product-modal-overlay .no-reviews { border-color: #e5d4cf; border-radius: 14px; background: #fffaf7; color: #685c56; }
.product-modal-overlay .write-review-box { border: 1px solid rgba(183, 110, 121, .14); border-radius: 17px; background: #f8efeb; }
.product-modal-overlay .write-review-box input,
.product-modal-overlay .write-review-box select,
.product-modal-overlay .write-review-box textarea { min-height: 44px; border-color: #e2d3cc; border-radius: 11px; background: #fff; color: var(--ktc-modal-espresso); font: inherit; }
.product-modal-overlay .write-review-box textarea { min-height: 92px; }
.product-modal-overlay .submit-review-btn { min-height: 46px; border-radius: 999px; background: var(--ktc-modal-espresso); color: #fff; font-weight: 700; transition: background .2s ease, transform .2s ease; }
.product-modal-overlay .submit-review-btn:hover { background: #513b35; transform: translateY(-1px); }
.product-modal-overlay :is(button, a, input, select, textarea):focus-visible { outline: 3px solid rgba(183, 110, 121, .78); outline-offset: 3px; }

@media (max-width: 767px) {
  .product-modal-overlay .product-modal { border-radius: 23px; }
  .product-modal-overlay .product-modal-image { padding: 12px; }
  .product-modal-overlay .ktc-gallery-stage { border-radius: 18px; }
  .product-modal-overlay .ktc-gallery-stage #modalProductImage { border-radius: 14px; }
  .product-modal-overlay .product-modal-info { padding-left: 18px; padding-right: 18px; }
  .product-modal-overlay .product-modal-info h2 { font-size: clamp(25px, 7vw, 32px); }
  .product-modal-overlay .modal-product-actions { gap: 9px; }
  .product-modal-overlay .modal-add-cart,
  .product-modal-overlay .ktc-modal-buy-now { min-height: 50px; }
  .product-modal-overlay .ktc-shade-option {
    width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    border-radius: 50% !important;
  }
  .product-modal-overlay .ktc-shade-dot { width: 30px !important; height: 30px !important; flex-basis: 30px !important; border-radius: 50% !important; }
  .product-modal-overlay .ktc-shade-option.active { border-color: var(--ktc-modal-rose) !important; box-shadow: 0 0 0 3px rgba(183, 110, 121, .2) !important; }
}

@media (max-width: 390px) {
  .product-modal-overlay .product-modal-info { padding-left: 14px; padding-right: 14px; }
  .product-modal-overlay .modal-product-actions { gap: 8px; }
}

@media (hover: none) {
  .product-modal-overlay .ktc-gallery-stage #modalProductImage:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .product-modal-overlay *,
  .product-modal-overlay *::before,
  .product-modal-overlay *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
