/* THE KHATOON SHOP v3.3.2 — fitted luxury, visibility and accessibility */
:root {
  --khatoon-container: 1480px;
  --khatoon-side-padding: clamp(14px, 2vw, 28px);
  --khatoon-black: #090909;
  --khatoon-deep: #15070d;
  --khatoon-gold: #d7ad32;
  --khatoon-pink: #d92f6c;
  --khatoon-pink-dark: #a91648;
}

/* Wider fitted page, smaller logo, clearer navigation. */
.header-main,
.site-main,
.woocommerce .site-main,
.woocommerce-page .site-main,
.site-footer-inner,
.footer-bottom-inner {
  width: min(calc(100% - (var(--khatoon-side-padding) * 2)), var(--khatoon-container));
}

.site-header .header-main {
  min-height: 118px;
  gap: clamp(18px, 2.4vw, 38px);
}

.site-header .brand-logo,
.site-header .custom-logo-link {
  flex: 0 0 clamp(150px, 13vw, 205px);
  width: clamp(150px, 13vw, 205px);
}

.site-header .custom-logo {
  width: 100%;
  max-width: 205px;
  max-height: 82px;
  object-fit: contain;
}

.primary-menu > li > a,
.header-action span,
.desktop-product-search input,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
button,
input[type="submit"] {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .035em;
}

.primary-menu > li > a {
  min-height: 48px;
  padding: 0 18px;
  color: #fff !important;
  text-shadow: 0 1px 0 rgba(0,0,0,.35);
}

.primary-menu > li > a:hover,
.primary-menu > li.current-menu-item > a,
.primary-menu > li.current-menu-ancestor > a,
.primary-menu > li > a:focus-visible {
  color: #ff4f8c !important;
  background: linear-gradient(180deg, rgba(215,173,50,.10), rgba(217,47,108,.09));
  box-shadow: inset 0 -3px 0 var(--khatoon-gold);
}

.header-actions .header-action {
  color: #fff !important;
  opacity: 1 !important;
}
.header-actions .header-action:hover,
.header-actions .header-action:focus-visible { color: #ff4f8c !important; }

/* Accessible luxury buttons: never hide the wording. */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.button,
.wp-element-button,
input[type="submit"],
button[type="submit"] {
  min-height: 48px;
  padding: 13px 22px !important;
  border: 1px solid var(--khatoon-gold) !important;
  border-radius: 9px !important;
  background: #090909 !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
  letter-spacing: .035em !important;
  text-align: center;
  text-shadow: none !important;
  opacity: 1 !important;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.button:hover,
.wp-element-button:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
  background: var(--khatoon-pink-dark) !important;
  color: #fff !important;
  border-color: var(--khatoon-gold) !important;
}

/* Product pages: use more of the screen and place shade choices in a clear panel. */
.single-product.woocommerce div.product {
  width: min(calc(100% - (var(--khatoon-side-padding) * 2)), 1480px);
  grid-template-columns: minmax(440px, .94fr) minmax(500px, 1.06fr);
  gap: clamp(34px, 4vw, 72px);
}

.single-product.woocommerce div.product .product_title {
  font-size: clamp(36px, 4vw, 62px);
}

.khatoon-swatch-field .value {
  width: 100%;
}

.khatoon-variation-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 620px;
  max-height: 330px;
  padding: 12px;
  overflow: auto;
  border: 1px solid #ead8df;
  border-radius: 14px;
  background: linear-gradient(145deg, #fff, #fff7fa);
  box-shadow: inset 0 0 0 1px rgba(215,173,50,.18);
}

.khatoon-variation-swatch {
  width: 100%;
  height: 58px;
  min-width: 0;
  border-radius: 10px;
  background-color: #f8edf1;
  background-size: cover;
  box-shadow: inset 0 0 0 3px #fff, 0 2px 8px rgba(0,0,0,.08);
  font-size: 10px;
}

.khatoon-variation-swatch.has-variation-image::after {
  position: absolute;
  right: 3px;
  bottom: 3px;
  left: 3px;
  padding: 4px 2px;
  border-radius: 5px;
  background: rgba(0,0,0,.74);
  color: #fff;
  content: attr(data-short-label);
  font: 800 9px/1.1 Arial, sans-serif;
  text-align: center;
}

.khatoon-variation-swatch[aria-checked="true"] {
  border-color: var(--khatoon-pink);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--khatoon-gold), 0 8px 18px rgba(169,22,72,.18);
}

.khatoon-swatch-selection {
  padding: 9px 12px;
  border-left: 3px solid var(--khatoon-pink);
  background: #fff7fa;
  font-size: 14px;
}

/* Product archive grids fill the available screen and avoid oversized empty cards. */
body.woocommerce ul.products,
body.woocommerce-page ul.products,
body.khatoon-brand-archive ul.products {
  width: min(calc(100% - (var(--khatoon-side-padding) * 2)), 1480px) !important;
  max-width: 1480px !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: clamp(14px, 1.5vw, 24px) !important;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  min-width: 0;
  border-color: rgba(215,173,50,.55) !important;
}

.woocommerce ul.products li.product img,
.woocommerce-page ul.products li.product img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: linear-gradient(145deg, #fff, #fff7fa);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  min-height: 2.8em;
  color: #161016 !important;
  font-size: 16px !important;
  line-height: 1.38 !important;
}

/* Clear visual fallback while an importer is still repairing an image. */
.woocommerce ul.products li.product .woocommerce-LoopProduct-link:has(.woocommerce-placeholder),
.woocommerce ul.products li.product .woocommerce-LoopProduct-link:not(:has(img)) {
  background: linear-gradient(145deg, #fff9fb, #fff);
}

/* Infinite-scroll status and fallback control. */
.khatoon-infinite-scroll {
  width: min(calc(100% - 30px), 720px);
  margin: 24px auto 54px;
  text-align: center;
}
.khatoon-load-more {
  min-width: 260px;
}
.khatoon-infinite-status {
  margin: 12px 0 0;
  color: #5b4c53;
  font-size: 14px;
  font-weight: 700;
}
.khatoon-infinite-sentinel { height: 2px; }

/* Brand cards: names remain visible and hover is unmistakable. */
.brand-carousel-card {
  min-height: 158px;
  border-color: rgba(215,173,50,.55);
  background: linear-gradient(145deg, #fff, #fff7fa);
}
.brand-carousel-card .brand-carousel-name,
.brand-carousel-card strong {
  display: block !important;
  color: #161016 !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.brand-carousel-card:hover .brand-carousel-name,
.brand-carousel-card:focus-visible .brand-carousel-name,
.brand-carousel-card:hover strong,
.brand-carousel-card:focus-visible strong {
  color: var(--khatoon-pink-dark) !important;
}

/* Footer: larger, readable text for older customers. */
.site-footer,
.site-footer a,
.site-footer p,
.site-footer li {
  font-size: 14px !important;
  line-height: 1.7 !important;
}
.site-footer h2,
.site-footer h3,
.site-footer .widget-title {
  color: #f1c64d !important;
  font-size: 15px !important;
  letter-spacing: .08em;
}

@media (max-width: 1180px) {
  body.woocommerce ul.products,
  body.woocommerce-page ul.products,
  body.khatoon-brand-archive ul.products { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .single-product.woocommerce div.product { grid-template-columns: minmax(360px, .95fr) minmax(420px, 1.05fr); }
}

@media (max-width: 900px) {
  .site-header .header-main { min-height: 82px; }
  .site-header .brand-logo,
  .site-header .custom-logo-link { flex-basis: 130px; width: 130px; }
  .site-header .custom-logo { max-width: 130px; max-height: 62px; }
  .single-product.woocommerce div.product { grid-template-columns: 1fr; width: 100%; padding-inline: 18px; }
  body.woocommerce ul.products,
  body.woocommerce-page ul.products,
  body.khatoon-brand-archive ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}

@media (max-width: 640px) {
  .site-header .brand-logo,
  .site-header .custom-logo-link { flex-basis: 104px; width: 104px; }
  .site-header .custom-logo { max-width: 104px; max-height: 52px; }
  body.woocommerce ul.products,
  body.woocommerce-page ul.products,
  body.khatoon-brand-archive ul.products { width: calc(100% - 24px) !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
  .woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 14px !important; }
  .woocommerce ul.products li.product .button { min-height: 44px; padding: 11px 8px !important; font-size: 12px !important; }
  .khatoon-variation-swatches { grid-template-columns: repeat(4, minmax(0, 1fr)); max-height: 300px; padding: 9px; }
  .khatoon-variation-swatch { height: 52px; }
}
