/* ============================================================
   Saraya Events — site styles (layout, responsive, motion).
   Tokens come from colors_and_type.css.
   ============================================================ */
:root { --page-gutter: 64px; }

html { scroll-behavior: smooth; }
body { background: var(--bg-canvas); color: var(--fg-primary); overflow-x: hidden; }
::selection { background: var(--gold-light); color: var(--espresso); }

/* ---------- buttons ---------- */
.saraya-btn:hover { filter: brightness(1.04); box-shadow: var(--shadow-soft); }
.saraya-btn[style*="--espresso"]:hover { background: var(--espresso-soft) !important; }
.saraya-btn:active { transform: translateY(1px); }

/* ---------- cards ---------- */
.saraya-lift { transition: transform 240ms var(--ease-out), box-shadow 240ms var(--ease-out); }
.saraya-lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.saraya-lift:hover .saraya-arrow { transform: translateX(4px); }
.saraya-arrow { transition: transform 220ms var(--ease-out); }
[dir="rtl"] .saraya-lift:hover .saraya-arrow { transform: translateX(-4px); }

.saraya-navlink:hover { color: var(--gold-deep) !important; }
.saraya-footlink:hover { color: var(--ivory) !important; }
.saraya-quicklink { transition: background 180ms var(--ease-out), border-color 180ms; }
.saraya-quicklink:hover { background: rgba(250,246,240,0.08); border-color: var(--gold-light) !important; }

/* ---------- grids ---------- */
.saraya-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.saraya-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.saraya-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.saraya-tilegrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

/* ---------- gallery (spanning mosaic) ---------- */
.saraya-gallery, .saraya-gallery-full { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 230px; gap: 18px; }
.saraya-g-wide { grid-column: span 2; }
.saraya-g-tall { grid-row: span 2; }
.saraya-g-sq { grid-column: span 1; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { :root { --page-gutter: 40px; } }
/* hand off to the hamburger a little early so the 9-item nav never crowds */
@media (max-width: 1080px) {
  .saraya-desktop-nav { display: none !important; }
  .saraya-mobile-nav { display: flex !important; }
}
@media (max-width: 960px) {
  .saraya-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .saraya-grid-4 { grid-template-columns: repeat(3, 1fr); }
  .saraya-split { grid-template-columns: 1fr !important; gap: 36px !important; }
  .saraya-checkout-grid { grid-template-columns: 1fr !important; }
     .saraya-rfq-band { grid-template-columns: 1fr !important; }
       .saraya-vd-shell { flex-direction: column !important; }
   .saraya-vd-sidebar { width: 100% !important; position: static !important; top: auto !important; }
   table { display: block; overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
}
@media (max-width: 760px) {
  :root { --page-gutter: 24px; }
  .saraya-grid-2 { grid-template-columns: 1fr; }
   
  .saraya-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .saraya-tilegrid { grid-template-columns: repeat(3, 1fr); }
  .saraya-gallery, .saraya-gallery-full { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .saraya-g-wide { grid-column: span 2; }
  .saraya-g-tall { grid-row: span 1; }
  .saraya-step-label { display: none; }
}
@media (max-width: 520px) {
  .saraya-grid-3, .saraya-grid-4 { grid-template-columns: 1fr; }
  .saraya-tilegrid { grid-template-columns: repeat(2, 1fr); }
  .saraya-gallery, .saraya-gallery-full { grid-template-columns: 1fr; }
  .saraya-g-wide, .saraya-g-tall { grid-column: span 1; grid-row: span 1; }
}

/* desktop default: hide mobile chrome */
.saraya-mobile-nav { display: none; }

/* ---------- admin mode ---------- */
.saraya-img-overlay:hover { opacity: 1 !important; }
.saraya-admin-cardtools { opacity: 0; transition: opacity 160ms var(--ease-out); }
.saraya-lift:hover .saraya-admin-cardtools,
[style*="position: relative"] > .saraya-admin-cardtools:hover { opacity: 1; }
.saraya-admin-cardtools:hover { opacity: 1; }
div:hover > .saraya-admin-cardtools { opacity: 1; }
.saraya-admin-access { opacity: 0.55; transition: opacity 160ms; }
.saraya-admin-access:hover { opacity: 1; }

/* hide scrollbar on category bar */
.saraya-catbar::-webkit-scrollbar { display: none; }
.saraya-catbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ---------- mobile fixes ---------- */
/* footer columns: 2-col at 760px, 1-col at 480px */
@media (max-width: 760px)  { .saraya-footer-grid { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 480px)  { .saraya-footer-grid { grid-template-columns: 1fr !important; } }

/* inline 2-col form grids inside modals / forms → stack on small screens */
@media (max-width: 640px)  { .saraya-form-2col  { grid-template-columns: 1fr !important; } }

/* checkout card detail 3-col → 1-col at 640px */
@media (max-width: 960px)  { .saraya-card-3col  { grid-template-columns: 1fr 1fr !important; } }
@media (max-width: 480px)  { .saraya-card-3col  { grid-template-columns: 1fr !important; } }

/* payment method buttons row → wrap gracefully */
@media (max-width: 480px)  { .saraya-pay-methods { flex-wrap: wrap !important; } }

/* "how it works" auto-fit grid: shrink min from 280px to 240px on mobile */
@media (max-width: 640px)  { .saraya-hiw-grid { grid-template-columns: 1fr !important; } }

/* page-level split grids that are not saraya-split (showroom hero, page-core hero) */
@media (max-width: 900px)  { .saraya-hero-split { grid-template-columns: 1fr !important; } }

/* modal padding responsive — reduce horizontal pad on tiny screens */
@media (max-width: 480px)  { .saraya-modal-body { padding-left: 18px !important; padding-right: 18px !important; } }

/* vendor dashboard status pipeline */
.saraya-vd-pipeline { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- motion ---------- */
@keyframes sarayaPop { from { opacity: 0; transform: translateY(8px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes sarayaFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sarayaSlideIn { from { transform: translateX(40px); opacity: 0.4; } to { transform: none; opacity: 1; } }
[dir="rtl"] @keyframes sarayaSlideIn { from { transform: translateX(-40px); } to { transform: none; } }
@keyframes sarayaStep { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes sarayaSpin { to { transform: rotate(360deg); } }
.saraya-spin { animation: sarayaSpin 0.8s linear infinite; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
