/* Minimal base and preset-driven enhancements */

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    color: #111111;
    background: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.site-header {
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding: 1rem 0;
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 50;
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.site-title {
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.95rem;
}

.primary-navigation {
    display: flex;
    gap: 1.5rem;
}

.primary-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.5rem;
}

.primary-navigation a {
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid transparent;
}

.primary-navigation a:hover {
    border-color: currentColor;
}

.site-toggle-nav {
    display: none;
}

/* Mini cart toggle */
.phatsima-minicart-toggle {
    position: relative;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.phatsima-cart-icon {
    width: 20px;
    height: 20px;
    border: 1px solid currentColor;
    border-radius: 4px;
    display: inline-block;
    position: relative;
}

.phatsima-cart-count {
    position: absolute;
    top: -6px;
    right: -8px;
    font-size: 0.7rem;
    background: #111111;
    color: #ffffff;
    border-radius: 999px;
    padding: 0 4px;
}

/* Sticky Add to Cart bar */
.phatsima-sticky-atc {
    position: fixed;
    left: 0;
    right: 0;
    bottom: -120px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s ease;
    background: rgba(255,255,255,0.98);
    box-shadow: 0 -4px 16px rgba(0,0,0,0.06);
    z-index: 60;
}

.phatsima-sticky-atc.is-visible {
    bottom: 0;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.phatsima-sticky-atc-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.phatsima-sticky-atc-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.phatsima-sticky-atc-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.phatsima-sticky-atc-title {
    font-size: 0.95rem;
    font-weight: 500;
}

.phatsima-sticky-atc-price {
    font-size: 0.9rem;
    opacity: 0.8;
}

.phatsima-sticky-atc-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.phatsima-sticky-atc-form .qty {
    max-width: 60px;
}

/* Mini-cart drawer */
.phatsima-minicart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    z-index: 70;
}

.phatsima-minicart-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.phatsima-minicart-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 360px;
    max-width: 90vw;
    height: 100%;
    background: #ffffff;
    box-shadow: -4px 0 24px rgba(0,0,0,0.16);
    padding: 1.5rem 1.25rem;
    z-index: 80;
    transition: right 0.25s ease;
    display: flex;
    flex-direction: column;
}

.phatsima-minicart-drawer.is-open {
    right: 0;
}

.phatsima-minicart-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 1rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.phatsima-minicart-close {
    position: absolute;
    top: 12px;
    left: 12px;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    cursor: pointer;
}

.phatsima-minicart-content {
    flex: 1;
    overflow-y: auto;
    padding-top: 1.5rem;
}

/* Product badges + icon actions */
.phatsima-product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    z-index: 5;
    pointer-events: none; /* container itself never blocks card clicks */
}

.phatsima-badge-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    pointer-events: auto;
}

.phatsima-badge {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: #111111;
    color: #ffffff;
}

/* Badge colour variants */
.phatsima-badge--sale {
    background: #b91c1c;
}
.phatsima-badge--new {
    background: #15803d;
}
.phatsima-badge--trending {
    background: #1d4ed8;
}
.phatsima-badge--hot {
    background: #f97316;
}
.phatsima-badge--limited {
    background: #0f172a;
}

/* Icon-only quick actions (right side) */
.phatsima-card-icons {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    pointer-events: auto; /* icons remain clickable */
}

.phatsima-icon-btn {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.16);
    background: rgba(255,255,255,0.9);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.phatsima-icon-btn:hover {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transform: translateY(-1px);
}

.phatsima-icon-btn:focus-visible {
    outline: 2px solid #111111;
    outline-offset: 2px;
}

/* Heart icon (favourites) */
.phatsima-icon-heart::before {
    content: "\2661"; /* white heart */
    font-size: 14px;
    line-height: 1;
}

.phatsima-favorite-trigger.is-active .phatsima-icon-heart::before {
    content: "\2665"; /* black heart */
}

.phatsima-favorite-trigger.is-active {
    border-color: #111111;
    background: #111111;
    color: #ffffff;
}

/* Eye icon (quick view) */
.phatsima-icon-eye {
    position: relative;
    width: 16px;
    height: 10px;
}

.phatsima-icon-eye::before,
.phatsima-icon-eye::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
}

.phatsima-icon-eye::before {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    border: 1px solid currentColor;
}

.phatsima-icon-eye::after {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
}

/* Trust strip */
.phatsima-trust-strip {
    margin-top: 1.25rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.phatsima-trust-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    font-size: 0.85rem;
    opacity: 0.85;
}

/* Quick view modal */
.phatsima-quickview-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    z-index: 90;
}

.phatsima-quickview-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
}

.phatsima-quickview-modal {
    position: fixed;
    inset: 10% 10%;
    max-width: 900px;
    margin: auto;
    background: #ffffff;
    box-shadow: 0 24px 80px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s ease;
    z-index: 91;
    padding: 1.5rem;
}

.phatsima-quickview-modal.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.phatsima-quickview-loader {
    text-align: center;
    padding: 2rem 0;
}

.phatsima-quickview-modal-inner {
    display: grid;
    grid-template-columns: minmax(0,1.2fr) minmax(0,1fr);
    gap: 1.5rem;
    position: relative;
}

.phatsima-quickview-close {
    position: absolute;
    top: -4px;
    right: -4px;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    cursor: pointer;
}

.phatsima-quickview-title {
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

/* Presets */
body.phatsima-style-minimal-luxe {
    background: #ffffff;
    color: #121212;
}

body.phatsima-style-dark-luxury {
    background: #050506;
    color: #f5f5f5;
}

body.phatsima-style-editorial {
    background: #f7f4ef;
    color: #17130f;
}

/* Responsive */
@media (max-width: 768px) {
    .site-header-inner {
        gap: 0.75rem;
    }
    .primary-navigation {
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        background: #ffffff;
        flex-direction: column;
        padding: 0.75rem 1.5rem 1.25rem;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
    }
    .primary-navigation.is-open {
        max-height: 320px;
    }
    .primary-navigation ul {
        flex-direction: column;
        gap: 0.75rem;
    }
    .site-toggle-nav {
        display: inline-flex;
        flex-direction: column;
        gap: 4px;
        border: none;
        background: transparent;
        cursor: pointer;
    }
    .site-toggle-nav .bar {
        width: 18px;
        height: 2px;
        background: currentColor;
    }
    .phatsima-quickview-modal {
        inset: 5% 5%;
        padding: 1rem;
    }
    .phatsima-quickview-modal-inner {
        grid-template-columns: minmax(0,1fr);
    }
    .phatsima-sticky-atc-inner {
        padding: 0.5rem 1rem;
    }
}



/* ============================================================
   PHATSIMA JD Framework Pro v3.2 – Consolidated UI Layer
   Notes:
   - Keep selectors scoped to Phatsima components / Woo Blocks to avoid regressions.
   - Avoid styling wp-admin here (admin fixes are enqueued via functions.php).
   ============================================================ */

:root{
  --ph-black:#111111;
  --ph-grey:#6f6f6f;
  --ph-gold:#b08d57;
  --ph-border:rgba(0,0,0,.14);
  --ph-border-soft:rgba(0,0,0,.08);
  --ph-bg:#ffffff;
  --ph-bg-soft:#f9f9f9;
}

/* Gold links (site-wide, safe) */
a{color:var(--ph-gold)}
a:hover{color:var(--ph-black)}

/* ------------------------------------------------------------
   Order summary: injected thumbs wrapper (woocommerce_cart_item_name)
   ------------------------------------------------------------ */
.phatsima-os-name{
  display:grid;
  grid-template-columns:44px minmax(0,1fr);
  gap:12px;
  align-items:center;
}
.phatsima-os-thumb img{
  width:44px;
  height:44px;
  object-fit:cover;
  border:1px solid var(--ph-border-soft);
  border-radius:0;
  display:block;
}

/* ------------------------------------------------------------
   Woo Blocks Checkout layout + UI (scoped)
   Requires checkout root to include .phatsima-checkout (optional)
   ------------------------------------------------------------ */
.wp-block-woocommerce-checkout.phatsima-checkout{
  font-size:12px;
  line-height:1.45;
}
.wp-block-woocommerce-checkout.phatsima-checkout *{box-sizing:border-box}

/* Two column layout that matches your reference: left fluid, right fixed-ish */
@media (min-width:1140px){
  .wp-block-woocommerce-checkout.phatsima-checkout .wc-block-components-sidebar-layout{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(340px,420px);
    gap:28px;
    align-items:start;
  }
  .wp-block-woocommerce-checkout.phatsima-checkout .wc-block-components-sidebar-layout .wc-block-components-main{
    width:auto;
    padding-right:0;
  }
  .wp-block-woocommerce-checkout.phatsima-checkout .wc-block-components-sidebar-layout .wc-block-components-sidebar{
    width:auto;
    position:sticky;
    top:92px;
    align-self:start;
  }
}
@media (max-width:1139.98px){
  .wp-block-woocommerce-checkout.phatsima-checkout .wc-block-components-sidebar-layout{
    display:block;
  }
  .wp-block-woocommerce-checkout.phatsima-checkout .wc-block-components-sidebar-layout .wc-block-components-main,
  .wp-block-woocommerce-checkout.phatsima-checkout .wc-block-components-sidebar-layout .wc-block-components-sidebar{
    width:100%;
  }
}

/* Inputs + labels */
.wp-block-woocommerce-checkout.phatsima-checkout .wc-block-components-text-input label,
.wp-block-woocommerce-checkout.phatsima-checkout .wc-block-components-select-control__label,
.wp-block-woocommerce-checkout.phatsima-checkout .wc-block-components-combobox-control__label,
.wp-block-woocommerce-checkout.phatsima-checkout label{
  display:block;
  margin:0 0 8px;
  font-size:11px;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--ph-black);
  opacity:.75;
}
.wp-block-woocommerce-checkout.phatsima-checkout input[type="text"],
.wp-block-woocommerce-checkout.phatsima-checkout input[type="email"],
.wp-block-woocommerce-checkout.phatsima-checkout input[type="tel"],
.wp-block-woocommerce-checkout.phatsima-checkout input[type="password"],
.wp-block-woocommerce-checkout.phatsima-checkout select,
.wp-block-woocommerce-checkout.phatsima-checkout textarea,
.wp-block-woocommerce-checkout.phatsima-checkout .wc-block-components-text-input input,
.wp-block-woocommerce-checkout.phatsima-checkout .wc-block-components-combobox-control input{
  font-size:12px;
  min-height:40px;
  border-radius:0;
  border:.7px solid var(--ph-border);
  padding:10px 12px;
  box-shadow:none;
}
.wp-block-woocommerce-checkout.phatsima-checkout input:focus,
.wp-block-woocommerce-checkout.phatsima-checkout select:focus,
.wp-block-woocommerce-checkout.phatsima-checkout textarea:focus{
  outline:none;
  border-color:var(--ph-black);
  box-shadow:0 0 0 2px rgba(176,141,87,.18);
}

/* Buttons */
.wp-block-woocommerce-checkout.phatsima-checkout button,
.wp-block-woocommerce-checkout.phatsima-checkout .wc-block-components-button,
.wp-block-woocommerce-checkout.phatsima-checkout .wp-element-button{
  border-radius:0;
  border:1px solid #000;
  background:#000;
  color:#fff;
  font-size:12px;
  min-height:40px;
  padding:10px 14px;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.wp-block-woocommerce-checkout.phatsima-checkout button:hover,
.wp-block-woocommerce-checkout.phatsima-checkout .wc-block-components-button:hover,
.wp-block-woocommerce-checkout.phatsima-checkout .wp-element-button:hover{
  background:#000;
  color:#fff;
}

/* Order summary item dividers + shipping highlight */
.wp-block-woocommerce-checkout.phatsima-checkout .wc-block-components-order-summary-item{
  padding:12px 0;
  border-bottom:1px solid var(--ph-border-soft);
}
.wp-block-woocommerce-checkout.phatsima-checkout .wc-block-components-order-summary-item:last-child{border-bottom:0}
.wp-block-woocommerce-checkout.phatsima-checkout .wc-block-components-totals-item--shipping,
.wp-block-woocommerce-checkout.phatsima-checkout .wc-block-components-totals-shipping{
  background:var(--ph-bg-soft);
  border-radius:0;
  padding:8px 10px;
}
.wp-block-woocommerce-checkout.phatsima-checkout .wc-block-components-totals-footer-item{
  font-weight:500;
}

/* ------------------------------------------------------------
   Product cards: hide default loop ATC button when toggle is off
   (theme also removes action server-side; this is a UI safety net)
   ------------------------------------------------------------ */
body:not(.phatsima-loop-atc-enabled) .woocommerce ul.products li.product .button,
body:not(.phatsima-loop-atc-enabled) .elementor-widget-woocommerce-products ul.products li.product .button{
  display:none!important;
}

/* ------------------------------------------------------------
   Woo product images: enforce 500w x 600h crop in UI (display layer)
   Backend size is enforced via filters (functions.php)
   ------------------------------------------------------------ */
.woocommerce ul.products li.product img,
.woocommerce-page ul.products li.product img{
  width:100%;
  aspect-ratio:5 / 6;
  height:auto;
  object-fit:cover;
  background:#f5f5f5;
}

/* ------------------------------------------------------------
   Quick View (v3.2): fix intrinsic width/height lock + match luxe UI
   ------------------------------------------------------------ */
.phatsima-quickview-modal{
  inset:6vh 6vw;
  max-width:1120px;
  width:calc(100% - 12vw);
  max-height:88vh;
  padding:0;
  border-radius:0;
  overflow:hidden;
}
.phatsima-quickview-modal-inner{
  display:grid;
  grid-template-columns:minmax(0,56%) minmax(0,44%);
  gap:0;
  width:100%;
  height:100%;
  max-height:88vh;
}
@media (max-width:900px){
  .phatsima-quickview-modal{inset:5% 4%; width:92vw; max-height:86vh}
  .phatsima-quickview-modal-inner{grid-template-columns:1fr; max-height:86vh; overflow:auto}
}

.phatsima-quickview-gallery{
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:0;
  padding:0;
}
.phatsima-quickview-gallery img{
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:cover!important;
  aspect-ratio:auto!important;
  display:block;
  border:0;
}
@media (min-width:901px){
  .phatsima-quickview-gallery{height:88vh}
}

.phatsima-quickview-details{
  min-width:0;
  padding:28px;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.phatsima-quickview-details a{color:var(--ph-gold)}
.phatsima-quickview-details .button,
.phatsima-quickview-details button{
  border-radius:0;
  background:#000;
  color:#fff;
  border:1px solid #000;
}
.phatsima-quickview-close{
  position:absolute;
  top:16px;
  right:16px;
  width:40px;
  height:40px;
  border-radius:0;
  border:1px solid var(--ph-border);
  background:#fff;
  color:#111;
  z-index:2;
}



/* Newsroom (CPT) */
.phatsima-newsroom-header{padding:2rem 0 1rem;border-bottom:1px solid rgba(0,0,0,.08);margin-bottom:1.5rem}
.phatsima-newsroom-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.25rem}
@media(max-width:900px){.phatsima-newsroom-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.phatsima-newsroom-grid{grid-template-columns:1fr}}
.phatsima-newsroom-card{border:1px solid rgba(0,0,0,.12);background:#fff}
.phatsima-newsroom-link{display:block;color:inherit;text-decoration:none}
.phatsima-newsroom-thumb img{width:100%;height:auto;aspect-ratio:5/6;object-fit:cover;display:block}
.phatsima-newsroom-meta{padding:12px 14px 0;font-size:12px;color:#6f6f6f}
.phatsima-newsroom-title{padding:6px 14px 0;margin:0;font-size:16px;line-height:1.25;color:#111}
.phatsima-newsroom-excerpt{padding:10px 14px 14px;margin:0;font-size:13px;color:#111;opacity:.85}
.phatsima-newsroom-single__header{padding:2rem 0 1rem;border-bottom:1px solid rgba(0,0,0,.08);margin-bottom:1.5rem}
.phatsima-newsroom-single__meta{font-size:12px;color:#6f6f6f}
.phatsima-newsroom-single__meta a{color:#b08d57;text-decoration:none}
.phatsima-newsroom-single__title{margin:10px 0 0;font-size:28px;line-height:1.15}
.phatsima-newsroom-single__hero img{width:100%;height:auto;aspect-ratio:5/6;object-fit:cover;display:block}

body.phatsima-modal-open{overflow:hidden;height:100%}

/* Search popup (Elementor) – scope by adding CSS Class: phatsima-search-popup on the popup */
.elementor-popup-modal .elementor-location-popup.phatsima-search-popup{height:100%;max-height:100%;overflow:auto;-webkit-overflow-scrolling:touch;padding:calc(env(safe-area-inset-top,0px) + 16px) 16px calc(env(safe-area-inset-bottom,0px) + 16px)}
.elementor-popup-modal .elementor-location-popup.phatsima-search-popup .e-con,.elementor-popup-modal .elementor-location-popup.phatsima-search-popup .elementor-container{max-width:1140px;margin-inline:auto}

/* Search “popular” categories as Nike-style pills */
.woocommerce .product-categories{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:12px;align-items:center}
.woocommerce .product-categories li{margin:0;display:inline-flex;align-items:flex-start}
.woocommerce .product-categories li a{display:inline-flex;align-items:center;gap:10px;padding:12px 18px;border:1px solid rgba(0,0,0,.14);background:#f2f2f2;color:#111;text-decoration:none;border-radius:999px;font-weight:600;line-height:1;position:relative;padding-right:44px}
.woocommerce .product-categories li a:focus{outline:2px solid rgba(0,0,0,.35);outline-offset:2px}
.woocommerce .product-categories li .count{display:inline-block;margin-left:-34px;transform:translateY(-6px);font-size:12px;line-height:1;opacity:.65}
@media (max-width:767px){
  .woocommerce .product-categories{gap:14px;justify-content:center}
  .woocommerce .product-categories li a{padding:12px 16px;padding-right:42px}
  .woocommerce .product-categories li .count{margin-left:-32px}
}
