/* RAM Boutique - Shop & Fast Checkout Enhancements */
html.ram-fast-checkout-open { overflow: hidden !important; }
.checkout-legal { display: none !important; }

/* Sticky Luxury Header on /shop */
header[class*="brand-site_header__"] {
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  background: rgba(11, 11, 11, 0.92) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  transition: background 0.3s ease, border-color 0.3s ease !important;
}

/* Floating Fast Checkout Trigger */
.ram-quick-order-fab {
  position: fixed;
  z-index: 2147483643;
  right: 50%;
  bottom: calc(5.9rem + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  width: min(26rem, calc(100% - 1.25rem));
  min-height: 4.25rem;
  padding: .8rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 1.25rem;
  background: #0b0b0b;
  color: #fff;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, .4);
  transform: translateX(50%);
  font: inherit;
}
.ram-quick-order-fab > * { pointer-events: none; }
.ram-guest-checkout-label {
  position: absolute;
  top: -.72rem;
  left: 50%;
  box-sizing: border-box;
  min-width: max-content;
  padding: .32rem .7rem;
  border: 1px solid rgba(11, 11, 11, .12);
  border-radius: 999px;
  background: #f4f2ed;
  color: #0b0b0b;
  box-shadow: 0 .45rem 1.3rem rgba(0, 0, 0, .13);
  transform: translateX(-50%);
  font-size: .58rem;
  font-weight: 800;
  line-height: 1;
}

/* Cards & Frames */
.shop-product-grid > article:nth-child(n) .shop-editorial-frame { transform: none !important; }
.shop-editorial-frame { background: #171717 !important; border-radius: 1rem 1rem 0 0; }
.shop-product-image { background: #efede7 !important; }
.shop-product-image img { background: transparent !important; mix-blend-mode: normal !important; }
.shop-frame-bottom b { cursor: pointer; transition: color 0.2s ease; }
.shop-frame-bottom b:hover { color: #d4af37; }

/* Hero Section Refinements */
.shop-hero > aside { display: none !important; }
.shop-hero {
  grid-template-columns: minmax(0, 1fr) !important;
  padding: 3.5rem 1.5rem 2.5rem !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}
.shop-hero h1 {
  font-size: clamp(1.8rem, 4.5vw, 2.8rem) !important;
  line-height: 1.35 !important;
  margin: 0.8rem 0 1rem !important;
}
.shop-hero p {
  font-size: clamp(0.85rem, 2vw, 1.05rem) !important;
  color: rgba(255, 255, 255, 0.72) !important;
  max-width: 36rem !important;
  line-height: 1.7 !important;
}
.shop-hero .primary {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.6rem !important;
  padding: 0.85rem 1.8rem !important;
  font-weight: 750 !important;
  border-radius: 999px !important;
  text-decoration: none !important;
  cursor: pointer !important;
}
.ram-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.8rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  direction: rtl;
}
.ram-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.75);
}
.ram-hero-badge svg {
  color: #d4af37;
  flex: 0 0 auto;
}

/* Category & Search Filter Bar */
.ram-shop-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem 0 2.2rem;
  direction: rtl;
  width: 100%;
}
.ram-shop-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 38rem;
  margin: 0 auto;
}
.ram-shop-search-wrapper svg.ram-search-icon {
  position: absolute;
  right: 1.15rem;
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}
.ram-shop-search-input {
  box-sizing: border-box;
  width: 100%;
  height: 3.25rem;
  padding: 0 3.1rem 0 2.8rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.25s ease;
}
.ram-shop-search-input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}
.ram-shop-search-input:focus {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}
.ram-shop-search-clear {
  position: absolute;
  left: 1rem;
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}
.ram-shop-search-clear:hover {
  background: rgba(255, 255, 255, 0.28);
}
.ram-shop-chips-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.ram-shop-chips {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.ram-shop-chips::-webkit-scrollbar {
  display: none;
}
.ram-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 2.35rem;
  padding: 0 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.78);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.ram-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}
.ram-chip.active {
  background: #fff;
  color: #0b0b0b;
  border-color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.15);
}

/* Card Direct Order Button */
.ram-btn-direct-order {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.45rem !important;
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: 2.75rem !important;
  margin-top: 0.55rem !important;
  padding: 0.55rem 0.9rem !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  border-radius: 0.85rem !important;
  background: linear-gradient(135deg, #242424 0%, #111111 100%) !important;
  color: #fff !important;
  font-family: inherit !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}
.ram-btn-direct-order:hover {
  background: #fff !important;
  color: #0b0b0b !important;
  border-color: #fff !important;
  box-shadow: 0 4px 18px rgba(255, 255, 255, 0.2) !important;
}
.ram-btn-direct-order:active {
  transform: scale(0.98) !important;
}
.shop-product-info button.secondary.wide {
  min-height: 2.5rem !important;
  font-size: 0.76rem !important;
  border-radius: 0.85rem !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

/* Empty State */
.ram-shop-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
  margin: 2rem auto;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 1.5rem;
  text-align: center;
  max-width: 32rem;
  background: rgba(255, 255, 255, 0.02);
  direction: rtl;
}
.ram-shop-empty-state .ram-empty-icon {
  font-size: 2.4rem;
  margin-bottom: 0.8rem;
  opacity: 0.6;
}
.ram-shop-empty-state h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  color: #fff;
}
.ram-shop-empty-state p {
  margin: 0 0 1.5rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
}
.ram-empty-reset-btn {
  padding: 0.65rem 1.4rem;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #0b0b0b;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.ram-empty-reset-btn:hover {
  transform: scale(1.03);
}

/* Fast Checkout Modal */
.ram-fast-checkout {
  position: fixed;
  z-index: 2147483647;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background: rgba(0, 0, 0, .76);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.ram-fast-checkout-dialog {
  box-sizing: border-box;
  width: min(34rem, 100%);
  max-height: calc(100dvh - 2rem);
  padding: 1.45rem;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 1.65rem;
  background: #f4f2ed;
  color: #111;
  box-shadow: 0 2rem 7rem rgba(0, 0, 0, .48);
}
.ram-fast-checkout-dialog header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.ram-fast-checkout-dialog header small,
.ram-fast-checkout-success small {
  color: #77736c;
  font: 700 .58rem/1 Arial, sans-serif;
  letter-spacing: .18em;
}
.ram-fast-checkout-dialog h2 {
  margin: .5rem 0 .25rem;
  font-size: clamp(1.45rem, 5vw, 2rem);
}
.ram-fast-checkout-dialog header p {
  margin: 0;
  color: #6c6962;
  font-size: .72rem;
}
.ram-fast-checkout-close {
  display: grid;
  flex: 0 0 auto;
  width: 2.65rem;
  height: 2.65rem;
  place-items: center;
  padding: 0;
  border: 1px solid #ccc8c0;
  border-radius: 50%;
  background: transparent;
  color: #111;
  font-size: 1.25rem;
  cursor: pointer;
}
.ram-fast-checkout-summary {
  display: grid;
  gap: .45rem;
  margin: 0 0 1rem;
  padding: .85rem;
  border-radius: 1rem;
  background: #0b0b0b;
  color: #fff;
}
.ram-fast-checkout-summary span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .3rem .2rem;
}
.ram-fast-checkout-summary b {
  font-size: .74rem;
}
.ram-fast-checkout-summary em {
  color: rgba(255, 255, 255, .65);
  font-size: .65rem;
  font-style: normal;
  direction: ltr;
}
.ram-fast-checkout-dialog label {
  display: grid;
  gap: .4rem;
  margin: .75rem 0;
  color: #57544f;
  font-size: .68rem;
  font-weight: 700;
}
.ram-fast-checkout-dialog label i {
  color: #99958d;
  font-style: normal;
  font-weight: 400;
}
.ram-fast-checkout-dialog input,
.ram-fast-checkout-dialog textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 3.2rem;
  padding: .8rem 1rem;
  border: 1px solid #d0cdc5;
  border-radius: .95rem;
  background: #fff;
  color: #111;
  outline: none;
  font: inherit;
  font-size: 16px;
}
.ram-fast-checkout-dialog textarea {
  min-height: 4.8rem;
  resize: vertical;
}
.ram-fast-checkout-dialog input:focus,
.ram-fast-checkout-dialog textarea:focus {
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .07);
}
.ram-fast-checkout-submit,
.ram-fast-checkout-success a,
.ram-fast-checkout-success button {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 3.35rem;
  margin-top: .6rem;
  padding: .8rem 1rem;
  border: 0;
  border-radius: 999px;
  background: #0b0b0b;
  color: #fff;
  text-align: center;
  text-decoration: none;
  font: 700 .76rem/1.4 inherit;
  cursor: pointer;
}
.ram-fast-checkout-submit:disabled { opacity: .55; }
.ram-fast-checkout-status {
  min-height: 1.2rem;
  margin: .55rem 0;
  color: #4b6f57;
  font-size: .68rem;
}
.ram-fast-checkout-status.error { color: #9a2828; }
.ram-fast-checkout-trust {
  margin: .75rem 0 0;
  color: #77736b;
  text-align: center;
  font-size: .6rem;
}
.ram-fast-checkout-success {
  padding: .5rem 0;
  text-align: center;
}
.ram-fast-checkout-success p {
  color: #66625b;
  font-size: .75rem;
  line-height: 1.8;
}
.ram-fast-checkout-success button {
  border: 1px solid #ccc8c0;
  background: transparent;
  color: #111;
}

@media(max-width: 600px) {
  .ram-fast-checkout {
    place-items: end center;
    padding: .5rem .5rem max(.5rem, env(safe-area-inset-bottom));
  }
  .ram-fast-checkout-dialog {
    width: 100%;
    max-height: calc(100dvh - .5rem);
    padding: 1.15rem;
    border-radius: 1.5rem 1.5rem 1rem 1rem;
  }
  .ram-guest-checkout-label { font-size: .55rem; }
  .shop-product-image img { will-change: auto; }
  .shop-product-grid article { content-visibility: auto; contain-intrinsic-size: 34rem; }
  .shop-hero { padding: 2.2rem 1rem 1.8rem !important; }
}
@media(prefers-reduced-motion: reduce) {
  .ram-fast-checkout { backdrop-filter: none; }
}

.ram-btn-direct-order:disabled,.shop-product-info button:disabled,.ram-product-quickview-add:disabled{opacity:.65;cursor:not-allowed}
@media(max-width:640px){.ram-home-telegram,.ram-shop-contact-link,.ram-telegram-widget{display:none!important}}

/* Scoped product-list controls; card, brand and stock-operation styles remain native. */
:is(.shop-product-grid,.inventory-balance-grid) > :is(.ram-product-list-controls,.ram-product-pagination) { grid-column:1 / -1; min-width:0; box-sizing:border-box; direction:rtl; }
:is(.shop-product-grid,.inventory-balance-grid) .ram-product-list-controls { padding:18px; border:1px solid #3c4049; border-radius:16px; background:#181a20; color:#f1f5f9; }
:is(.shop-product-grid,.inventory-balance-grid) .ram-list-fields { display:grid; grid-template-columns:minmax(0,2fr) minmax(150px,1fr) auto; gap:14px; align-items:end; }
.inventory-balance-grid .ram-list-fields { grid-template-columns:minmax(0,1fr) auto; }
:is(.shop-product-grid,.inventory-balance-grid) .ram-list-fields label { display:grid; gap:8px; min-width:0; font-size:14px; color:#e2e8f0; }
:is(.shop-product-grid,.inventory-balance-grid) .ram-list-fields :is(input,select) { width:100%; min-width:0; height:46px; box-sizing:border-box; padding:10px 12px; border:1px solid #59616f; border-radius:10px; background:#101217; color:#f1f5f9; font:inherit; }
:is(.shop-product-grid,.inventory-balance-grid) :is(.ram-product-list-controls,.ram-product-pagination) button { min-width:44px; min-height:44px; padding:9px 13px; border:1px solid #59616f; border-radius:10px; background:#222630; color:#f1f5f9; font:inherit; font-size:13px; line-height:1.7; cursor:pointer; }
:is(.shop-product-grid,.inventory-balance-grid) :is(.ram-product-list-controls,.ram-product-pagination) button:disabled { opacity:.5; cursor:default; }
:is(.shop-product-grid,.inventory-balance-grid) :is(.ram-product-list-controls,.ram-product-pagination) :is(button,input,select):focus-visible { outline:3px solid #d4ad6b; outline-offset:3px; }
:is(.shop-product-grid,.inventory-balance-grid) :is(.ram-list-scope,.ram-list-result) { margin:12px 0 0; font-size:12px; line-height:1.9; color:#c3cbd6; }
:is(.shop-product-grid,.inventory-balance-grid) .ram-list-result { font-size:14px; color:#eef2f6; }
:is(.shop-product-grid,.inventory-balance-grid) .ram-list-empty { padding:24px 12px; text-align:center; }
:is(.shop-product-grid,.inventory-balance-grid) .ram-list-empty p { color:#c3cbd6; font-size:13px; line-height:1.9; }
:is(.shop-product-grid,.inventory-balance-grid) .ram-product-pagination { display:flex; flex-wrap:wrap; gap:14px; align-items:center; justify-content:space-between; padding:18px 0; color:#e2e8f0; font-size:13px; }
:is(.shop-product-grid,.inventory-balance-grid) .ram-pagination-buttons { display:flex; flex-wrap:wrap; gap:7px; align-items:center; }
:is(.shop-product-grid,.inventory-balance-grid) .ram-pagination-current { font-size:13px; }
:is(.shop-product-grid,.inventory-balance-grid) .ram-product-pagination button[aria-current="page"] { border:2px solid #d4ad6b; box-shadow:inset 0 -3px #d4ad6b; }
.ram-inventory-leave-dialog { width:min(440px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); box-sizing:border-box; padding:24px; border:1px solid #59616f; border-radius:16px; background:#181a20; color:#f1f5f9; font-family:inherit; direction:rtl; }
.ram-inventory-leave-dialog::backdrop { background:#000b; }
.ram-inventory-leave-dialog h2 { margin:0; font-size:22px; }
.ram-inventory-leave-dialog p { margin:14px 0 20px; color:#c3cbd6; font-size:14px; line-height:1.9; }
.ram-inventory-leave-dialog > div { display:flex; flex-wrap:wrap; gap:8px; }
.ram-inventory-leave-dialog button { min-height:44px; padding:10px 14px; border:1px solid #59616f; border-radius:10px; background:#222630; color:#f1f5f9; font:inherit; font-size:14px; cursor:pointer; }
.ram-inventory-leave-dialog button:focus-visible { outline:3px solid #d4ad6b; outline-offset:3px; }
@media(max-width:850px) {
  :is(.shop-product-grid,.inventory-balance-grid) .ram-list-fields { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  :is(.shop-product-grid,.inventory-balance-grid) .ram-list-fields label:first-child { grid-column:1 / -1; }
  .inventory-balance-grid .ram-list-fields > button { grid-column:1 / -1; justify-self:start; }
}
@media(max-width:480px) {
  :is(.shop-product-grid,.inventory-balance-grid) .ram-list-fields { grid-template-columns:minmax(0,1fr); }
  :is(.shop-product-grid,.inventory-balance-grid) .ram-product-list-controls { padding:14px; }
  :is(.shop-product-grid,.inventory-balance-grid) .ram-list-fields :is(input,select) { font-size:16px; }
  :is(.shop-product-grid,.inventory-balance-grid) .ram-product-pagination { justify-content:center; }
  :is(.shop-product-grid,.inventory-balance-grid) .ram-pagination-range { flex-basis:100%; text-align:center; }
  :is(.shop-product-grid,.inventory-balance-grid) .ram-pagination-buttons > button[aria-label] { display:none; }
  :is(.shop-product-grid,.inventory-balance-grid) .ram-pagination-buttons > button[aria-current="page"] { display:inline-flex; align-items:center; justify-content:center; }
  :is(.shop-product-grid,.inventory-balance-grid) .ram-pagination-buttons > span[aria-hidden] { display:none; }
}
