/* =================================================================
 * Souk Profumi — Header & Footer CSS
 * All colors derived from the brand logo (gold calligraphy on white).
 * #25D366 (WhatsApp brand) is the only hardcoded color exception.
 * ================================================================= */

:root {
  --sp-color-1: #FFFFFF;
  --sp-color-2: #F5EDD9;
  --sp-color-3: #E8C77E;
  --sp-color-4: #C99A4B;
  --sp-color-5: #8B6A2E;
  --sp-color-6: #1A1A1A;

  --sp-bg:          var(--sp-color-1);
  --sp-surface:     var(--sp-color-2);
  --sp-primary:     var(--sp-color-6);
  --sp-accent:      var(--sp-color-4);
  --sp-accent-dark: var(--sp-color-5);
  --sp-accent-light:var(--sp-color-3);

  --sp-text:  #2A2A2A;
  --sp-muted: #5C5C5C;

  --sp-hdr-main-height: 72px;
  --sp-hdr-offer-height: 50px;
  --sp-hdr-height: calc(var(--sp-hdr-main-height) + var(--sp-hdr-offer-height));

  --sp-font-head: 'Cinzel', 'Times New Roman', serif;
  --sp-font-body: 'Manrope', system-ui, -apple-system, sans-serif;
}

/* ---------- Body offset for fixed header ---------- */
body.sp-header-active { padding-top: var(--sp-hdr-height) !important; }
body.admin-bar.sp-header-active { padding-top: calc(var(--sp-hdr-height) + 32px) !important; }

/* ---------- Suppress active theme header/footer so only the Souk header/footer show ---------- */
body.sp-header-active header:not(.sp-hdr-bar),
body.sp-header-active .site-header,
body.sp-header-active #masthead,
body.sp-header-active .wp-site-blocks > .wp-block-template-part:first-child,
body.sp-header-active .wp-block-site-title,
body.sp-header-active .wp-block-site-logo,
body.sp-header-active .wp-block-navigation:not(.sp-hdr-mobile-nav):not(.sp-hdr-nav-desktop) {
  display: none !important;
}

body.sp-header-active footer:not(.sp-ftr),
body.sp-header-active .site-footer,
body.sp-header-active #colophon,
body.sp-header-active .wp-site-blocks > .wp-block-template-part:last-child {
  display: none !important;
}

body.sp-header-active .wp-site-blocks,
body.sp-header-active .site,
body.sp-header-active #page,
body.sp-header-active #content,
body.sp-header-active .site-content,
body.sp-header-active .content-area,
body.sp-header-active main {
  max-width: none !important;
}

body.sp-header-active .wp-site-blocks {
  padding-top: 0 !important;
}

/* =====================================================================
 * HEADER
 * ===================================================================== */
.sp-hdr-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  background: var(--sp-bg);
  color: var(--sp-primary);
  border-bottom: 1px solid var(--sp-accent);
  font-family: var(--sp-font-body);
  box-shadow: 0 2px 14px rgba(139,106,46,0.08);
}
body.admin-bar .sp-hdr-bar { top: 32px; }
.sp-hdr-offer-wrapper {
  width: 100%;
  height: var(--sp-hdr-offer-height);
  box-sizing: border-box;
  overflow: hidden;
  background: #fff8ef;
  border-top: 1px solid #b8863b;
  border-bottom: 1px solid #b8863b;
  padding: 10px 0;
}
.sp-hdr-offer-track {
  display: flex;
  gap: 14px;
  width: max-content;
  white-space: nowrap;
  animation: spHdrOfferScroll 22s linear infinite;
}
.sp-hdr-offer-item {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  color: #3b2515;
  padding: 6px 14px;
  background: #ffffff;
  border-radius: 30px;
  border: 1px solid #ead3a4;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(184, 134, 59, 0.12);
}
.sp-hdr-offer-dot {
  width: 7px;
  height: 7px;
  background: #b8863b;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(184, 134, 59, 0.6);
  flex-shrink: 0;
}
.sp-hdr-offer-highlight { color: #8a5a18; }
@keyframes spHdrOfferScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.sp-hdr-offer-wrapper:hover .sp-hdr-offer-track {
  animation-play-state: paused;
}
.sp-hdr-inner {
  max-width: 1300px;
  height: var(--sp-hdr-main-height);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.sp-hdr-logo { flex: 0 0 auto; display: flex; align-items: center; min-width: 126px; }
.sp-hdr-logo img {
  height: 50px;
  width: auto;
  max-width: 170px;
  display: block;
  object-fit: contain;
}

.sp-hdr-search {
  flex: 1 1 auto;
  max-width: 520px;
  display: flex;
  background: var(--sp-surface);
  border: 1px solid rgba(201,154,75,0.4);
  border-radius: 999px;
  overflow: hidden;
  transition: border-color .2s;
}
.sp-hdr-search:focus-within { border-color: var(--sp-accent); }
.sp-hdr-search input {
  flex: 1; border: none; background: transparent;
  padding: 11px 18px; font-family: var(--sp-font-body); font-size: 14px;
  color: var(--sp-primary); outline: none;
}
.sp-hdr-search input::placeholder { color: var(--sp-muted); }
.sp-hdr-search button {
  border: none; background: var(--sp-primary); color: var(--sp-bg);
  width: 46px; cursor: pointer; transition: background .2s;
}
.sp-hdr-search button:hover { background: var(--sp-accent-dark); }

.sp-hdr-nav-desktop { display: flex; gap: 22px; }
.sp-hdr-nav-desktop a {
  color: #1A1A1A !important;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 2px;
  border-bottom: 1px solid transparent;
  transition: all .2s;
}
.sp-hdr-nav-desktop a:hover { color: #8B6A2E !important; border-bottom-color: var(--sp-accent); }

.sp-hdr-icons { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.sp-hdr-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  color: #1A1A1A !important;
  font-size: 16px;
  border-radius: 50%;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  transition: all .2s;
}
.sp-hdr-icon:hover { background: var(--sp-surface); color: #8B6A2E !important; border-color: var(--sp-accent); }
.sp-hdr-cart-count {
  position: absolute;
  top: -2px; right: -2px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--sp-accent-dark);
  color: var(--sp-bg);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
#spHdrSearchToggle { display: none; }
.sp-hdr-burger    { display: none; }

/* ---------- Mobile panels ---------- */
.sp-hdr-mobile-search,
.sp-hdr-mobile-nav {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--sp-surface);
  border-bottom: 1px solid var(--sp-accent);
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.sp-hdr-mobile-search.is-open,
.sp-hdr-mobile-nav.is-open { max-height: 520px; }
.sp-hdr-mobile-search form { display: flex; padding: 16px; gap: 8px; }
.sp-hdr-mobile-search input {
  flex: 1; padding: 12px 16px;
  background: var(--sp-bg);
  border: 1px solid var(--sp-accent);
  border-radius: 999px;
  font-family: var(--sp-font-body); font-size: 14px;
  color: var(--sp-primary); outline: none;
}
.sp-hdr-mobile-search button {
  width: 46px; border: none;
  background: var(--sp-primary); color: var(--sp-bg);
  border-radius: 999px; cursor: pointer;
}
.sp-hdr-mobile-nav { display: flex; flex-direction: column; }
.sp-hdr-mobile-nav.is-open { padding: 8px 0; }
.sp-hdr-mobile-nav a {
  padding: 16px 24px;
  color: #1A1A1A !important;
  text-decoration: none;
  border-bottom: 1px solid rgba(201,154,75,0.25);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background .2s, color .2s;
}
.sp-hdr-mobile-nav a:hover { background: var(--sp-bg); color: #8B6A2E !important; }
.sp-hdr-mobile-nav a:last-child { border-bottom: none; }

/* =====================================================================
 * FOOTER
 * ===================================================================== */
.sp-ftr {
  width: 100%;
  background: #111111;
  color: #F7F0DF !important;
  border-top: 1px solid var(--sp-accent);
  font-family: var(--sp-font-body);
  padding: 64px 24px 0;
  clear: both;
}
.sp-ftr-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(160px, .85fr) minmax(220px, 1fr) minmax(280px, 1.2fr);
  gap: 56px;
  align-items: start;
}
.sp-ftr,
.sp-ftr p,
.sp-ftr li,
.sp-ftr span {
  color: #F7F0DF !important;
  opacity: 1 !important;
}
.sp-ftr-col h4 {
  font-family: var(--sp-font-head);
  color: var(--sp-accent-light) !important;
  font-size: 1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 22px;
  position: relative;
  padding-bottom: 12px;
}
.sp-ftr-col h4::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 48px; height: 2px;
  background: var(--sp-accent);
  transform-origin: left center;
}
.sp-ftr-col ul { list-style: none; margin: 0; padding: 0; }
.sp-ftr-col ul li { padding: 7px 0; }
.sp-ftr-col a {
  color: #E8C77E !important;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: color .2s, text-shadow .25s;
}
.sp-ftr-col a:hover {
  color: #FFFFFF !important;
  text-shadow: 0 0 12px rgba(232,199,126,0.55);
}

.sp-ftr-brand .sp-ftr-logo {
  width: 190px;
  max-width: 100%;
  height: auto;
  margin-bottom: 20px;
  display: block;
  object-fit: contain;
}
.sp-ftr-tag {
  font-family: var(--sp-font-head);
  color: #E8C77E !important;
  letter-spacing: 0.12em;
  font-size: 0.95rem;
  margin: 0 0 12px;
  opacity: 1 !important;
}
.sp-ftr-desc { color: #F7F0DF !important; font-size: 0.95rem; line-height: 1.75; margin: 0 0 20px; opacity: 1 !important; }

.sp-ftr-socials { display: flex; gap: 10px; }
.sp-ftr-socials a {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--sp-accent);
  color: var(--sp-accent-light);
  border-radius: 50%;
  font-size: 14px;
  transition: all .25s;
}
.sp-ftr-socials a:hover {
  background: var(--sp-accent);
  color: var(--sp-primary);
  text-shadow: none;
  transform: translateY(-2px);
}

.sp-ftr-reach { color: #F7F0DF !important; font-size: 0.95rem; line-height: 1.75; margin: 0 0 18px; opacity: 1 !important; }
.sp-ftr-reach--muted { font-size: 0.84rem; color: #D8CCAF !important; margin-top: 14px; opacity: 1 !important; }
.sp-ftr-wa-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px;
  background: #25D366;
  color: #fff !important;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform .25s, box-shadow .25s;
}
.sp-ftr-wa-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(37,211,102,0.35); text-shadow: none !important; color:#fff !important; }

.sp-ftr-bottom {
  max-width: 1300px;
  margin: 52px auto 0;
  padding: 22px 0;
  border-top: 1px solid rgba(232,199,126,0.2);
  text-align: center;
  color: #D8CCAF !important;
  font-size: 0.85rem;
  opacity: 1 !important;
}
.sp-ftr-bottom a { color: var(--sp-accent-light); text-decoration: none; }
.sp-ftr-bottom a:hover { text-shadow: 0 0 12px rgba(232,199,126,0.6); }

/* =====================================================================
 * WHATSAPP FLOATING BUTTON
 * ===================================================================== */
.sp-wa-fab {
  position: fixed;
  right: 22px; bottom: 22px;
  width: 60px; height: 60px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  text-decoration: none;
  box-shadow: 0 8px 26px rgba(37,211,102,0.45);
  z-index: 9998;
  animation: spWaPulse 2s infinite;
  transition: transform .25s;
}
.sp-wa-fab:hover { transform: scale(1.08); }
@keyframes spWaPulse {
  0%   { box-shadow: 0 0 0 0    rgba(37,211,102,0.55); }
  70%  { box-shadow: 0 0 0 18px rgba(37,211,102,0);    }
  100% { box-shadow: 0 0 0 0    rgba(37,211,102,0);    }
}

/* =====================================================================
 * RESPONSIVE
 * ===================================================================== */
@media (max-width: 1024px) {
  .sp-hdr-inner { position: relative; justify-content: space-between; }
  .sp-hdr-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    min-width: 0;
    transform: translate(-50%, -50%);
  }
  .sp-hdr-search { display: none; }
  .sp-hdr-nav-desktop { display: none; }
  #spHdrSearchToggle { display: flex; }
  .sp-hdr-burger { display: flex; }
  .sp-hdr-icons { margin-left: auto; }
  .sp-ftr-inner { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 768px) {
  :root {
    --sp-hdr-main-height: 64px;
    --sp-hdr-offer-height: 44px;
  }
  body.admin-bar.sp-header-active { padding-top: calc(var(--sp-hdr-height) + 46px) !important; }
  body.admin-bar .sp-hdr-bar { top: 46px; }
  .sp-hdr-offer-wrapper { padding: 8px 0; }
  .sp-hdr-offer-track {
    gap: 10px;
    animation-duration: 18s;
  }
  .sp-hdr-offer-item {
    font-size: 12px;
    padding: 5px 11px;
  }
  .sp-hdr-inner { padding: 0 16px; gap: 10px; }
  .sp-hdr-logo img { height: 42px; max-width: 120px; }
  .sp-ftr { padding: 56px 20px 0; }
  .sp-ftr-inner { grid-template-columns: 1fr; gap: 32px; text-align: left; }
  .sp-ftr-bottom { margin-top: 40px; }
  .sp-wa-fab { width: 54px; height: 54px; font-size: 26px; right: 16px; bottom: 16px; }
}
@media (max-width: 600px) {
  body.admin-bar.sp-header-active { padding-top: var(--sp-hdr-height) !important; }
  body.admin-bar .sp-hdr-bar { top: 0; }
}
@media (max-width: 540px) {
  .sp-hdr-icons { gap: 2px; }
  .sp-hdr-icon  { width: 36px; height: 36px; font-size: 15px; }
}
