/*
Theme Name: Rosemary Blocksy Child
Theme URI: https://abdulrahmaneldiehy.com/
Description: Child theme for Rosemary built on Blocksy.
Author: عبدالرحمن الديهي
Author URI: https://abdulrahmaneldiehy.com/
Template: blocksy
Version: 1.0.0
Text Domain: rosemary-blocksy-child
*/

/* Font is loaded via wp_enqueue_style('ibm-plex-arabic') in functions.php
   (no @import here — avoids a duplicate render-blocking request). */

/* ═══════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════ */
:root {
  /* Brand Colors */
  --color-primary:           #1B5E20;
  --color-primary-hover:     #154A19;
  --color-primary-light:     #E8F5E9;
  --color-primary-subtle:    #F1F8F1;
  --color-accent-gold:       #C9A84C;
  --color-accent-gold-light: #FDF6E3;
  --color-black:             #0F0F10;
  --color-dark:              #1A1A1A;
  --color-body:              #374151;
  --color-muted:             #6B7280;
  --color-light-text:        #9CA3AF;
  --color-white:             #FFFFFF;
  --color-off-white:         #FAFAFA;
  --color-cream:             #FDF8F0;
  --color-border:            #E5E7EB;
  --color-olive:             #8A9A5B;
  --color-success:           #16A34A;
  --color-error:             #DC2626;
  --color-divider:           #F3F4F6;

  /* Typography */
  --font-main:            "IBM Plex Sans Arabic", sans-serif;
  --font-heading-special: "Ping AR + LT Bold", "IBM Plex Sans Arabic", sans-serif;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:  0 12px 32px rgba(0,0,0,0.10);
  --shadow-xl:  0 24px 56px rgba(0,0,0,0.12);

  /* Legacy aliases – keeps any residual old references working */
  --rosemary-green:       var(--color-primary);
  --rosemary-green-2:     var(--color-primary-hover);
  --rosemary-green-3:     #0e3b25;
  --rosemary-gold:        var(--color-accent-gold);
  --rosemary-gold-dark:   #8a6a24;
  --rosemary-cream:       var(--color-cream);
  --rosemary-card:        var(--color-white);
  --rosemary-ink:         var(--color-body);
  --rosemary-muted:       var(--color-muted);
  --rosemary-line:        var(--color-border);
  --rosemary-shadow:      var(--shadow-xl);
  --rosemary-shadow-soft: var(--shadow-md);
}

/* ═══════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  direction: rtl;
  margin: 0;
  font-family: var(--font-main) !important;
  font-size: 16px;
  color: var(--color-body);
  background: var(--color-white);
}

/* Beat Blocksy's own typography. NOTE: we deliberately do NOT target <i>/icon
   elements so Font Awesome keeps its own font-family and glyphs render. */
body,
.ct-body,
.site-content,
.entry-content,
#main,
.rosemary-page {
  font-family: var(--font-main) !important;
}

.rosemary-page :where(h1, h2, h3, h4, h5, h6, p, a, span, button,
  input, select, textarea, label, li, td, th, div, strong, small, b, ul) {
  font-family: var(--font-main) !important;
}

/* Section titles use the special display face, falling back to IBM Plex Arabic */
.rosemary-page .rosemary-title,
.rosemary-page h2 {
  font-family: var(--font-heading-special) !important;
}

body, button, input, select, textarea,
h1, h2, h3, h4, h5, h6, p { letter-spacing: 0; }

img { max-width: 100%; display: block; }
a { text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; }

/* Hide Blocksy's own header on front page */
.home #header { display: none; }
.site-main, .ct-container-full { padding: 0; }

/* Hide Blocksy's default footer — we render our own .rosemary-footer in front-page.php.
   Selectors are Blocksy-specific (ct-*) so our custom footer is never matched. */
.home .ct-footer,
.home footer.ct-footer,
.home [data-footer],
.home #footer.ct-footer {
  display: none !important;
}
.rosemary-footer { display: block !important; }

/* ═══════════════════════════════════════
   LAYOUT
═══════════════════════════════════════ */
.rosemary-page { overflow-x: hidden; }

.rosemary-wrap {
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
}

.rosemary-section {
  position: relative;
  padding: 96px 0;
}

/* Section background variants — alternating rhythm */
.rosemary-section--white    { background: var(--color-white); }
.rosemary-section--offwhite { background: var(--color-off-white); }
.rosemary-section--cream    { background: var(--color-cream); }
.rosemary-section--green    { background: var(--color-primary); }

.rosemary-section-header {
  text-align: center;
  margin-bottom: 48px;
}

.rosemary-title {
  font-family: var(--font-heading-special);
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 700;
  color: var(--color-dark);
  line-height: 1.25;
}
.rosemary-title--white { color: var(--color-white); }

.rosemary-subtitle {
  margin-top: 12px;
  font-size: 17px;
  font-weight: 400;
  color: var(--color-muted);
  line-height: 1.65;
  max-width: 640px;
  margin-inline: auto;
}
.rosemary-subtitle--white { color: rgba(255,255,255,0.70); }

/* ═══════════════════════════════════════
   SCROLL REVEAL
═══════════════════════════════════════ */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.reveal-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.reveal-on-scroll:nth-child(4) { transition-delay: 0.3s; }

/* ═══════════════════════════════════════
   BUTTONS
═══════════════════════════════════════ */
.rosemary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: var(--color-primary);
  color: var(--color-white);
  font: 600 15px/1 var(--font-main);
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}
.rosemary-btn:hover, .rosemary-btn:focus {
  background: var(--color-primary-hover);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Hero buttons */
.rosemary-btn--hero-primary {
  height: 56px;
  padding: 0 36px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  background: var(--color-primary);
  box-shadow: 0 8px 24px rgba(27,94,32,0.35);
}
.rosemary-btn--hero-primary:hover {
  background: var(--color-primary-hover);
}
.rosemary-btn--hero-outline {
  height: 56px;
  padding: 0 36px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  background: transparent;
  border-color: rgba(255,255,255,0.85);
  color: var(--color-white);
}
.rosemary-btn--hero-outline:hover {
  background: rgba(255,255,255,0.12);
  color: var(--color-white);
}

/* Header CTA */
.rosemary-header-cta {
  height: 40px;
  padding: 0 20px;
  font-size: 14px;
  border-radius: 8px;
}

/* Search button */
.rosemary-btn--search {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 10px;
  background: var(--color-primary);
  font-size: 18px;
}
.rosemary-btn--search:hover { background: var(--color-primary-hover); }

/* Outline green button */
.rosemary-btn--outline-green {
  background: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
  height: 48px;
  padding: 0 32px;
  font-size: 15px;
  border-radius: 10px;
}
.rosemary-btn--outline-green:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
  transform: none;
}

/* White button (for dark sections) */
.rosemary-btn--white {
  background: var(--color-white);
  color: var(--color-primary);
  border-color: var(--color-white);
}
.rosemary-btn--white:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

/* ═══════════════════════════════════════
   HEADER
═══════════════════════════════════════ */
.rosemary-topbar {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  height: 78px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-block-end: 1px solid var(--color-divider);
  transition: box-shadow 0.2s ease;
}
.rosemary-topbar.is-scrolled {
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.06);
}

.rosemary-topbar-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 24px;
}

.rosemary-brand { display: inline-flex; align-items: center; padding-block: 7px; }
.rosemary-brand img { height: 64px; width: auto; }

.rosemary-nav {
  display: flex !important;
  align-items: center;
  gap: 32px;
  flex: 1;
  justify-content: center;
}
.rosemary-nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-body);
  transition: color 0.15s ease;
}
.rosemary-nav a:hover,
.rosemary-nav a.is-active { color: var(--color-primary); font-weight: 600; }

.rosemary-header-end {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-inline-start: auto;
}

.rosemary-hamburger {
  display: none !important;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  background: transparent;
  color: var(--color-body);
  font-size: 18px;
  cursor: pointer;
}

/* ═══════════════════════════════════════
   MOBILE DRAWER
═══════════════════════════════════════ */
.rosemary-drawer {
  display: none; /* hidden entirely on desktop */
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  width: min(320px, 85vw);
  background: var(--color-white);
  flex-direction: column;
  gap: 0;
  padding: 24px;
  transform: translateX(100%); /* off-screen to the right (RTL slide-in) */
  transition: transform 0.3s ease;
  box-shadow: -4px 0 24px rgba(0,0,0,0.10);
}

@media (max-width: 809px) {
  .rosemary-drawer { display: flex; }
  .rosemary-drawer.is-open { transform: translateX(0); }
}

.rosemary-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
.rosemary-drawer-header img { height: 52px; width: auto; }

.rosemary-drawer-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  background: transparent;
  color: var(--color-muted);
  font-size: 16px;
  cursor: pointer;
}

.rosemary-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.rosemary-drawer-nav a {
  display: block;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-body);
  transition: background 0.15s ease, color 0.15s ease;
}
.rosemary-drawer-nav a:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.rosemary-drawer-cta {
  width: 100%;
  margin-top: 24px;
  justify-content: center;
}

.rosemary-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.rosemary-drawer-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}
body.drawer-open { overflow: hidden; }

/* ═══════════════════════════════════════
   HERO
═══════════════════════════════════════ */
.rosemary-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 85vh;
  background: center / cover no-repeat;
  padding-block-start: 64px; /* offset for fixed header */
  color: var(--color-white);
}

.rosemary-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(10,10,10,0.48) 0%, rgba(27,94,32,0.34) 100%);
  pointer-events: none;
}

.rosemary-hero-wrap {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  padding-block: 72px 48px;
}

.rosemary-hero-content {
  max-width: 800px;
  margin-inline: auto;
  text-align: center;
}

.rosemary-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-accent-gold);
  letter-spacing: 0.08em;
}

.rosemary-hero h1 {
  margin-bottom: 20px;
  font-size: clamp(30px, 4.5vw, 52px);
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.30;
  letter-spacing: -0.02em;
}

.rosemary-hero p {
  margin-bottom: 36px;
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 400;
  color: rgba(255,255,255,0.80);
  line-height: 1.6;
}

.rosemary-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

/* Stats bar */
.rosemary-hero-statsbar {
  position: relative;
  z-index: 5;
  background: rgba(0,0,0,0.25);
  padding: 16px 0;
  margin-block-end: 40px; /* clears the overlapping filter card below */
}

.rosemary-statsbar-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.rosemary-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 40px;
}
.rosemary-stat-item strong {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-white);
  line-height: 1;
}
.rosemary-stat-item span {
  font-size: 13px;
  font-weight: 400;
  color: rgba(255,255,255,0.60);
}

.rosemary-stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.15);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════
   FILTER BAR
═══════════════════════════════════════ */
.rosemary-filter-section {
  position: relative;
  z-index: 10;
  margin-block-start: -40px;
  padding-block-end: 0;
}

.rosemary-filter-card {
  background: var(--color-white);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.10);
  padding: 24px 32px 20px;
  max-width: 960px;
  margin-inline: auto;
}

.rosemary-filter-form {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 16px;
  align-items: end;
}

.rosemary-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rosemary-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-muted);
}
.rosemary-field input,
.rosemary-field select {
  width: 100%;
  min-width: 0;
  height: 48px;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  padding: 0 14px;
  font: 400 15px var(--font-main);
  color: var(--color-body);
  background: var(--color-white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.rosemary-field input:focus,
.rosemary-field select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.rosemary-filter-btn-col { align-self: end; }

.rosemary-filter-reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-block-start: 12px;
  border: 0;
  background: transparent;
  color: var(--color-muted);
  font: 500 14px var(--font-main);
  cursor: pointer;
  padding: 0;
}
.rosemary-filter-reset:hover { color: var(--color-primary); }

/* ═══════════════════════════════════════
   OFFERS GRID
═══════════════════════════════════════ */
.rosemary-offers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.rosemary-empty {
  grid-column: 1 / -1;
  padding: 48px 24px;
  border: 1.5px dashed var(--color-border);
  border-radius: 16px;
  color: var(--color-muted);
  font-size: 15px;
  text-align: center;
}

.rosemary-showmore-wrap {
  margin-block-start: 40px;
  display: flex;
  justify-content: center;
}

.rosemary-mobile-carousel {
  position: relative;
}

.rosemary-mobile-carousel-controls {
  display: none;
}

/* ═══════════════════════════════════════
   OFFER CARD
═══════════════════════════════════════ */
.rosemary-offer-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-white);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.rosemary-offer-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.rosemary-offer-card.is-exclusive {
  border-color: var(--color-accent-gold);
}
.rosemary-offer-card.is-exclusive:hover {
  box-shadow: 0 12px 32px rgba(201,168,76,0.20);
}
.rosemary-offer-card.offer-hidden {
  display: none;
}

/* Image */
.rosemary-offer-img {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--color-cream);
}
.rosemary-offer-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
  background: var(--color-cream);
}
.rosemary-offer-card:hover .rosemary-offer-img img {
  transform: scale(1.05);
}

/* Badge */
.rosemary-badge {
  position: absolute;
  inset-block-start: 14px;
  inset-inline-start: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 8px;
  background: var(--color-accent-gold);
  color: var(--color-white);
  font-size: 12px;
  font-weight: 700;
}
.rosemary-badge i { font-size: 11px; }

/* Body */
.rosemary-offer-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}

/* Supplier row */
.rosemary-supplier {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.rosemary-supplier-logo {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: 13px;
  font-weight: 700;
}
.rosemary-supplier-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rosemary-supplier-logo--default {
  border-radius: 50%;
  background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
  color: var(--color-primary);
  font-size: 15px;
  border: 1px solid #C8E6C9;
  flex-shrink: 0;
}
.rosemary-supplier-info { flex: 1; min-width: 0; }
.rosemary-offer-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-dark);
  line-height: 1.3;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rosemary-cuisine-tag {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--color-muted);
  margin-block-start: 2px;
}
.rosemary-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent-gold);
  white-space: nowrap;
}
.rosemary-rating i { font-size: 11px; }

/* Detail pills */
.rosemary-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.rosemary-pills span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 500;
}
.rosemary-pills i { font-size: 11px; }

/* Description */
.rosemary-description {
  flex: 1;
  font-size: 14px;
  font-weight: 400;
  color: var(--color-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* Divider */
.rosemary-card-divider {
  border: none;
  border-block-start: 1px solid var(--color-divider);
  margin: 0 0 16px;
}

/* Price */
.rosemary-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  margin-block-start: auto;
}
.rosemary-price-new {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.2;
}
.rosemary-price-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--color-muted);
  margin-block-start: 2px;
}
.rosemary-price-old {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-light-text);
  text-decoration: line-through;
}

/* CTA button */
.rosemary-offer-cta {
  width: 100%;
  height: 48px;
  border-radius: 10px;
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 15px;
  font-weight: 600;
  gap: 8px;
  justify-content: center;
  transition: background 0.18s ease, transform 0.18s ease;
}
.rosemary-offer-cta:hover {
  background: var(--color-primary-hover);
  color: var(--color-white);
  transform: none;
}
.rosemary-offer-cta i { font-size: 18px; }

/* Keep legacy classes that may still be generated */
.rosemary-details-link,
.rosemary-trust-mark { display: none; }
.rosemary-riyal-symbol {
  display: inline-block;
  width: 0.78em;
  height: 0.78em;
  background: currentColor;
  vertical-align: -0.06em;
  -webkit-mask: url("assets/images/photos/riyal.png") center / contain no-repeat;
  mask: url("assets/images/photos/riyal.png") center / contain no-repeat;
}

/* ═══════════════════════════════════════
   CATEGORIES
═══════════════════════════════════════ */
.rosemary-category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.rosemary-category-card {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-color: var(--color-cream);
  border: none;
  cursor: pointer;
  padding: 0;
  isolation: isolate;
}
.rosemary-category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: inherit;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transform: scale(1);
  transition: transform 0.45s ease;
  will-change: transform;
}
.rosemary-category-card:hover::before {
  transform: scale(1.08);
}

.rosemary-cat-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.10) 0%, rgba(0,0,0,0.60) 100%);
  transition: background 0.3s ease;
  z-index: 1;
}
.rosemary-category-card:hover .rosemary-cat-overlay {
  background: linear-gradient(180deg, rgba(27,94,32,0.30) 0%, rgba(0,0,0,0.55) 100%);
}

.rosemary-cat-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--color-white);
  z-index: 2;
}
.rosemary-cat-content i {
  font-size: 28px;
  color: var(--color-accent-gold);
}
.rosemary-cat-content span {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-white);
}

/* ═══════════════════════════════════════
   HOW IT WORKS — STEPS
═══════════════════════════════════════ */
.rosemary-steps-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 0;
  max-width: 1040px;
  margin-inline: auto;
}

.rosemary-step-card {
  background: var(--color-white);
  border-radius: 16px;
  padding: 32px 28px;
  text-align: center;
  position: relative;
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rosemary-step-num {
  position: absolute;
  inset-block-start: 16px;
  inset-inline-end: 20px;
  font-size: 52px;
  font-weight: 700;
  color: var(--color-primary-light);
  line-height: 1;
  pointer-events: none;
}

.rosemary-step-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-inline: auto;
  margin-bottom: 20px;
}
.rosemary-step-icon i {
  font-size: 28px;
  color: var(--color-primary);
}

.rosemary-step-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 10px;
}
.rosemary-step-card p {
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.6;
}

.rosemary-step-connector {
  width: 40px;
  align-self: center;
  border-block-start: 2px dashed var(--color-border);
}

/* ═══════════════════════════════════════
   TRUST / WHY ROSEMARY
═══════════════════════════════════════ */
.rosemary-trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 800px;
  margin-inline: auto;
}

.rosemary-trust-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
}
.rosemary-trust-card i {
  font-size: 24px;
  color: var(--color-accent-gold);
  margin-bottom: 14px;
  margin-inline: auto;
  display: block;
}
.rosemary-trust-card h3,
.rosemary-trust-card p { text-align: center; }
.rosemary-trust-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: 10px;
}
.rosemary-trust-card p {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
}

/* ═══════════════════════════════════════
   TESTIMONIALS
═══════════════════════════════════════ */
.rosemary-testimonials-track {
  overflow: visible;
}

.rosemary-testimonials-slider {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-block-end: 8px;
}
.rosemary-testimonials-slider::-webkit-scrollbar {
  display: none;
}

.rosemary-testimonial-card {
  flex: 0 0 340px;
  min-width: 300px;
  scroll-snap-align: center;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 8 testimonials auto-scroll horizontally at all widths */

.rosemary-stars {
  display: flex;
  gap: 3px;
}
.rosemary-stars i {
  color: var(--color-accent-gold);
  font-size: 14px;
}

.rosemary-testimonial-card p {
  font-size: 16px;
  font-weight: 400;
  color: var(--color-body);
  line-height: 1.7;
  flex: 1;
}

.rosemary-reviewer strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-dark);
  display: block;
}

.rosemary-testimonials-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-block-start: 24px;
}
.rosemary-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: var(--color-border);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease;
}
.rosemary-dot.is-active { background: var(--color-primary); }

/* ═══════════════════════════════════════
   LEAD FORM
═══════════════════════════════════════ */
.rosemary-lead-card {
  max-width: 800px;
  margin-inline: auto;
  background: var(--color-white);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.06);
  padding: 48px;
}

.rosemary-lead-header {
  text-align: center;
  margin-bottom: 32px;
}
.rosemary-lead-header .rosemary-title { font-size: clamp(24px, 3vw, 32px); }
.rosemary-lead-header .rosemary-subtitle { margin-top: 10px; }

/* Tabs */
.rosemary-form-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  margin-block-start: 24px;
  background: var(--color-primary-light);
  border-radius: 12px;
}

.rosemary-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 20px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--color-primary);
  font: 500 14px var(--font-main);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.rosemary-tab.is-active {
  background: var(--color-primary);
  color: var(--color-white);
}
.rosemary-tab:not(.is-active):hover {
  background: rgba(27,94,32,0.08);
}

.rosemary-form-panel { display: none; }
.rosemary-form-panel.is-active { display: block; }

/* Form grid */
.rosemary-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.rosemary-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rosemary-form-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-muted);
}
.rosemary-form-field input,
.rosemary-form-field select,
.rosemary-form input,
.rosemary-form select,
.rosemary-form textarea {
  height: 48px;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  padding: 0 14px;
  font: 400 15px var(--font-main);
  color: var(--color-body);
  background: var(--color-white);
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.rosemary-form-field input:focus,
.rosemary-form-field select:focus,
.rosemary-form input:focus,
.rosemary-form select:focus,
.rosemary-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.rosemary-form textarea { height: auto; min-height: 100px; padding: 12px 14px; resize: vertical; }

.rosemary-form-field--full { grid-column: 1 / -1; }

.rosemary-form-submit {
  grid-column: 1 / -1;
  height: 52px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  width: 100%;
  border: none;
}

/* Force lead/business submit buttons to brand green (guards against theme defaults) */
.rosemary-form .rosemary-form-submit,
.rosemary-form-panel form button[type="submit"] {
  background: var(--color-primary) !important;
  color: var(--color-white) !important;
  border: none !important;
}
.rosemary-form .rosemary-form-submit:hover,
.rosemary-form-panel form button[type="submit"]:hover {
  background: var(--color-primary-hover) !important;
}

.rosemary-form-trust {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 13px;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.rosemary-form-message {
  grid-column: 1 / -1;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.rosemary-form-message.is-error {
  background: rgba(220,38,38,0.08);
  color: var(--color-error);
}

/* ═══════════════════════════════════════
   SUPPLIER / PARTNER CTA
═══════════════════════════════════════ */
.rosemary-partner-content {
  max-width: 600px;
  margin-inline: auto;
  text-align: center;
}
.rosemary-partner-content .rosemary-subtitle--white {
  margin-bottom: 32px;
}

.rosemary-partner-form {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  grid-template-columns: none; /* override .rosemary-form grid */
}
/* All three controls share the same height in one flex row */
.rosemary-partner-form input,
.rosemary-partner-form button,
.rosemary-partner-form [type="submit"] {
  height: 52px !important;
  min-height: 52px !important;
  padding-block: 0 !important;
  font-size: 15px;
  border-radius: 10px;
  box-sizing: border-box;
}
.rosemary-partner-form button,
.rosemary-partner-form [type="submit"] {
  flex: 0 0 auto;
  white-space: nowrap;
  padding-inline: 28px;
}
.rosemary-partner-form input {
  flex: 1;
  min-width: 200px;
  max-width: 260px;
  height: 48px;
  border: 2px solid rgba(255,255,255,0.30) !important;
  border-radius: 10px;
  background: var(--color-white) !important;
  padding: 0 14px;
  font: 400 15px var(--font-main);
  color: var(--color-dark) !important;
}
.rosemary-partner-form input::placeholder {
  color: var(--color-light-text) !important; /* visible grey #9CA3AF */
  opacity: 1 !important;
}
.rosemary-partner-form input:focus {
  outline: none;
  border-color: var(--color-accent-gold) !important; /* gold for contrast on green */
  box-shadow: 0 0 0 3px rgba(201,168,76,0.20);
}
.rosemary-partner-form .rosemary-btn--white {
  background: var(--color-white) !important;
  color: var(--color-primary) !important;
  border: none !important;
}
.rosemary-partner-form .rosemary-btn--white:hover {
  background: var(--color-primary-subtle) !important;
  color: var(--color-primary) !important;
}
.rosemary-partner-form .rosemary-btn--white {
  height: 48px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
}
/* Override the global .rosemary-form grid for partner form */
.rosemary-partner-form.rosemary-form {
  display: flex;
}

/* ═══════════════════════════════════════
   FAQ
═══════════════════════════════════════ */
.rosemary-faq {
  max-width: 720px;
  margin-inline: auto;
}

.rosemary-faq-item {
  border-bottom: 1px solid var(--color-border);
}

.rosemary-faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border: none;
  background: transparent;
  color: var(--color-dark);
  font: 600 16px var(--font-main);
  text-align: start;
  cursor: pointer;
  transition: color 0.15s ease;
}
.rosemary-faq-question:hover { color: var(--color-primary); }
.rosemary-faq-question span { flex: 1; }

.rosemary-faq-icon {
  font-size: 14px;
  color: var(--color-primary);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.rosemary-faq-item.is-open .rosemary-faq-icon {
  transform: rotate(180deg);
}

.rosemary-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.rosemary-faq-answer p {
  font-size: 15px;
  color: var(--color-body);
  line-height: 1.7;
  padding-bottom: 20px;
}

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
.rosemary-footer {
  background: var(--color-dark);
  padding-block-start: 64px;
  color: var(--color-white);
}

.rosemary-footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-block-end: 32px;
}

.rosemary-footer-col img {
  height: 60px;
  width: auto;
  margin-bottom: 16px;
}
.rosemary-footer-tagline {
  font-size: 14px;
  color: rgba(255,255,255,0.50);
  line-height: 1.6;
  margin-bottom: 20px;
}

.rosemary-social {
  display: flex;
  gap: 10px;
}
.rosemary-social a {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.50);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background 0.2s ease, color 0.2s ease;
}
.rosemary-social a:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.rosemary-footer-col h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: 16px;
}
/* Keep links aligned with their column heading (same inline-start, zero indent) */
.rosemary-footer-col h3,
.rosemary-footer-col ul {
  text-align: start;
}
.rosemary-footer-col ul,
.rosemary-footer-col li,
.rosemary-footer-col a {
  padding-inline-start: 0;
  margin-inline-start: 0;
  text-indent: 0;
}
.rosemary-footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rosemary-footer-col li {
  font-size: 14px;
  color: rgba(255,255,255,0.60);
  display: flex;
  align-items: center;
  gap: 8px;
}
.rosemary-footer-col a {
  font-size: 14px;
  color: rgba(255,255,255,0.60);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.15s ease;
}
.rosemary-footer-col a:hover { color: var(--color-white); }
.rosemary-footer-col i { color: var(--color-accent-gold); }

.rosemary-footer-bottom {
  border-block-start: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0 12px;
  margin-block-start: 0;
}
.rosemary-footer-bottom p {
  font-size: 15px;
  color: rgba(255,255,255,0.46);
  text-align: center;
}

.rosemary-developer-credit {
  color: rgba(255,255,255,0.90);
  font-size: inherit;
  font-weight: 700;
  text-decoration: none;
}

.rosemary-developer-credit:hover {
  color: var(--color-white);
}

/* ═══════════════════════════════════════
   FLOATING WHATSAPP
═══════════════════════════════════════ */
.whatsapp-float {
  display: none;
}

/* ═══════════════════════════════════════
   MEDIA QUERIES — TABLET (≤1080px)
═══════════════════════════════════════ */
@media (max-width: 1080px) {
  .rosemary-offers-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .rosemary-category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .rosemary-steps-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .rosemary-step-connector {
    display: none;
  }
  .rosemary-trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .rosemary-footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .rosemary-footer-col:first-child {
    grid-column: 1 / -1;
  }
  .rosemary-filter-form {
    grid-template-columns: repeat(2, 1fr);
  }
  .rosemary-filter-btn-col {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
  }
}

/* ═══════════════════════════════════════
   MEDIA QUERIES — MOBILE (≤809px)
═══════════════════════════════════════ */
@media (max-width: 809px) {
  .rosemary-section { padding: 56px 0; }
  .rosemary-section-header { margin-bottom: 32px; }
  .rosemary-wrap { width: min(100% - 32px, 1200px); }

  /* Header */
  .rosemary-topbar { height: 70px; }
  .rosemary-brand img { height: 56px; }
  .rosemary-nav { display: none !important; }
  .rosemary-hamburger { display: flex !important; }
  .rosemary-header-cta { display: none; }

  /* Hero */
  .rosemary-hero { min-height: 70vh; }
  .rosemary-hero h1 { font-size: 28px; }
  .rosemary-hero p { font-size: 15px; }
  .rosemary-hero-actions {
    flex-direction: column;
    align-items: center;
  }
  .rosemary-btn--hero-primary,
  .rosemary-btn--hero-outline {
    width: 100%;
    height: 50px;
    justify-content: center;
  }
  .rosemary-statsbar-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }
  .rosemary-stat-item { padding: 12px 16px; }
  .rosemary-stat-divider { display: none; }

  /* Filter */
  .rosemary-filter-section { margin-block-start: -24px; }
  .rosemary-filter-card { padding: 20px; }
  .rosemary-filter-form {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .rosemary-filter-btn-col { grid-column: 1; }
  .rosemary-btn--search { width: 100%; border-radius: 10px; }

  /* Offers */
  .rosemary-offers-grid { grid-template-columns: 1fr; }

  /* Categories */
  .rosemary-category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-block-end: 8px;
  }
  .rosemary-category-card { scroll-snap-align: start; }

  /* Steps */
  .rosemary-steps-grid { grid-template-columns: 1fr; gap: 16px; }
  .rosemary-step-connector { display: none; }

  /* Trust */
  .rosemary-trust-grid { grid-template-columns: 1fr; }

  /* Testimonials */
  .rosemary-testimonials-slider { gap: 16px; }
  .rosemary-testimonial-card {
    flex: 0 0 280px;
  }

  /* Lead form */
  .rosemary-lead-card { padding: 28px 20px; }
  .rosemary-form { grid-template-columns: 1fr; }
  .rosemary-form-field--full { grid-column: 1; }

  /* Partner */
  .rosemary-partner-form { flex-direction: column; align-items: stretch; }
  .rosemary-partner-form input {
    max-width: 100%;
    width: 100%;
    text-align: center;
  }
  .rosemary-partner-form input::placeholder { text-align: center; }
  .rosemary-partner-form button,
  .rosemary-partner-form [type="submit"] { width: 100%; }

  /* Lead form: hide labels, rely on centered placeholders */
  .rosemary-lead-card .rosemary-form-field label { display: none !important; }
  .rosemary-lead-card .rosemary-form input,
  .rosemary-lead-card .rosemary-form select,
  .rosemary-lead-card .rosemary-form textarea { text-align: center; }
  .rosemary-lead-card .rosemary-form input::placeholder { text-align: center; }
  .rosemary-lead-card .rosemary-form select {
    text-align-last: center;
    -webkit-appearance: none;
  }

  /* Footer */
  .rosemary-footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .rosemary-footer-col:first-child { grid-column: 1; }
  .rosemary-footer-col {
    text-align: center;
    align-items: center;
  }
  /* Override pass-4 start-alignment so everything centers on mobile */
  .rosemary-footer-col h3,
  .rosemary-footer-col ul,
  .rosemary-footer-col li {
    text-align: center;
  }
  .rosemary-footer-col img { margin-inline: auto; }
  .rosemary-social { justify-content: center; }
  .rosemary-footer-col ul { align-items: center; }
  .rosemary-footer-col a,
  .rosemary-footer-col li { justify-content: center; }

  /* Floating WA */
  .whatsapp-float {
    display: flex;
    position: fixed;
    inset-block-end: 20px;
    inset-inline-start: 20px;
    z-index: 999;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    color: var(--color-white);
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 16px rgba(37,211,102,0.40);
    text-decoration: none;
    transition: transform 0.2s ease;
  }
  .whatsapp-float:hover { transform: scale(1.08); color: var(--color-white); }
}

/* ═══════════════════════════════════════
   PASS 8 — FEATURE ADDITIONS
═══════════════════════════════════════ */

/* Hide Blocksy chrome on offer detail pages too. */
.single-rosemary_offer #header,
.single-rosemary_offer .ct-footer,
.single-rosemary_offer footer.ct-footer,
.single-rosemary_offer [data-footer],
.single-rosemary_offer #footer.ct-footer {
  display: none !important;
}

.single-rosemary_offer .site-main,
.single-rosemary_offer .ct-container-full,
.single-rosemary_offer .entry-content {
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: none !important;
}

.rosemary-btn--hero-ghost {
  height: 56px;
  padding: 0 32px;
  border-radius: 12px;
  border-color: rgba(255,255,255,0.32);
  background: rgba(255,255,255,0.13);
  color: var(--color-white);
  backdrop-filter: blur(8px);
}
.rosemary-btn--hero-ghost:hover {
  background: rgba(255,255,255,0.22);
  color: var(--color-white);
}

/* Ad banners */
.rosemary-banners {
  background: var(--color-white);
  padding: 28px max(16px, calc((100% - 1200px) / 2));
}
.banners-track {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: auto;
  overflow: hidden;
  border-radius: 16px;
  background: var(--color-cream);
  box-shadow: var(--shadow-md);
}
.banner-slide {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}
.rosemary-banners:not(.is-ready) .banner-slide:first-child,
.banner-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}
.banner-slide picture,
.banner-slide img {
  width: 100%;
  height: 100%;
}
.banner-slide img {
  object-fit: cover;
}
.banner-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-block-start: 14px;
}
.banner-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--color-border);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}
.banner-dots button.is-active {
  width: 24px;
  background: var(--color-primary);
}

/* Search shortcut */
.rosemary-search-pill-section {
  padding: 34px 0 0;
  background: var(--color-white);
}
.rosemary-search-pill {
  width: min(320px, 100%);
  height: 52px;
  margin-inline: auto;
  margin-block-end: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 12px;
  background: var(--color-primary);
  color: var(--color-white);
  font: 700 16px/1 var(--font-main);
  box-shadow: 0 8px 24px rgba(27,94,32,0.24);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.rosemary-search-pill:hover {
  background: var(--color-primary-hover);
  color: var(--color-white);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.rosemary-search-pill-section:not(.is-filter-open) #offers-filters {
  display: none;
}
.rosemary-search-pill-section.is-filter-open .rosemary-search-pill {
  display: none;
}

.rosemary-filter-card--compact {
  max-width: 860px;
  margin: 0 auto;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.rosemary-filter-form--compact {
  grid-template-columns: 1fr 1fr 1fr auto;
  align-items: end;
}
.rosemary-filter-reset--compact {
  height: 48px;
  margin: 0;
  padding: 0 18px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-white);
  white-space: nowrap;
}
#offers.rosemary-section {
  padding-top: 48px;
}

/* Offer cards */
.rosemary-price-old {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-error);
}
.installment-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}
.installment-badges img {
  width: auto;
  height: 22px;
  border-radius: 5px;
  background: var(--color-white);
  object-fit: contain;
}
.installment-badges span {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-primary);
}
.rosemary-card-installments {
  margin: -4px 0 12px;
}
.rosemary-selection-count {
  display: block;
  margin: -2px 0 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-muted);
}
.rosemary-offer-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(108px, 0.42fr);
  gap: 10px;
}
.rosemary-offer-actions .rosemary-btn {
  padding-inline: 14px;
  min-width: 0;
}
.rosemary-offer-details {
  width: 100%;
  height: 48px;
  border: 1.5px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-primary);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
}
.rosemary-offer-details:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
  transform: none;
  box-shadow: none;
}
.rosemary-card-share,
.rosemary-gallery-share {
  position: absolute;
  z-index: 4;
  inset-block-start: 14px;
  inset-inline-end: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.72);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255,255,255,0.92), rgba(255,255,255,0.68));
  color: var(--color-primary);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.85);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.rosemary-card-share:hover,
.rosemary-gallery-share:hover {
  background: linear-gradient(145deg, #ffffff, #FDF6E3);
  color: var(--color-accent-gold);
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.95);
}
.rosemary-card-share i,
.rosemary-gallery-share i {
  font-size: 14px;
  line-height: 1;
}

/* Single offer detail */
.rosemary-single-offer {
  min-height: 100vh;
  background: var(--color-off-white);
}
.rosemary-offer-detail-hero {
  padding: 116px 0 50px;
  background-image:
    linear-gradient(135deg, rgba(27,94,32,0.56), rgba(15,15,16,0.44)),
    url("assets/images/photos/hero-catering.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  color: var(--color-white);
}
.rosemary-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.72);
  text-align: center;
}
.rosemary-breadcrumb a {
  color: rgba(255,255,255,0.86);
}
.rosemary-breadcrumb strong {
  color: var(--color-white);
  font-weight: 700;
}
.rosemary-breadcrumb-separator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  color: var(--color-accent-gold);
  font-size: 11px;
}
.rosemary-offer-detail-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  text-align: center;
}
.rosemary-offer-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  margin-bottom: 12px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  color: var(--color-accent-gold);
  font-size: 14px;
  font-weight: 700;
}
.rosemary-offer-detail-heading h1 {
  max-width: 880px;
  margin-inline: auto;
  color: var(--color-white);
  font-family: var(--font-heading-special);
  font-size: clamp(30px, 3.5vw, 46px);
  line-height: 1.25;
  font-weight: 700;
}
.rosemary-offer-supplier-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  color: rgba(255,255,255,0.84);
  font-size: 15px;
}
.rosemary-offer-supplier-line strong,
.rosemary-offer-supplier-line span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.rosemary-offer-supplier-line i {
  color: var(--color-accent-gold);
}
.rosemary-offer-detail-body {
  padding: 56px 0 76px;
}
.rosemary-offer-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 28px;
  align-items: start;
}
.rosemary-offer-detail-main {
  display: grid;
  gap: 22px;
}
.rosemary-offer-gallery,
.rosemary-detail-panel,
.rosemary-price-card {
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-white);
  box-shadow: var(--shadow-md);
}
.rosemary-offer-gallery {
  padding: 14px;
}
.rosemary-offer-gallery-main {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 12px;
  background: var(--color-cream);
}
.rosemary-offer-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rosemary-gallery-arrow {
  position: absolute;
  z-index: 4;
  inset-block-start: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.72);
  border-radius: 50%;
  background: rgba(255,255,255,0.88);
  color: var(--color-primary);
  box-shadow: 0 10px 28px rgba(0,0,0,0.18);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.rosemary-gallery-arrow:hover {
  background: var(--color-primary);
  color: var(--color-white);
}
.rosemary-gallery-arrow--right {
  inset-inline-start: 16px;
}
.rosemary-gallery-arrow--left {
  inset-inline-end: 16px;
}
.rosemary-offer-thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 10px;
}
.rosemary-offer-thumbs button {
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: var(--color-cream);
  cursor: pointer;
}
.rosemary-offer-thumbs button.is-active {
  border-color: var(--color-primary);
}
.rosemary-offer-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rosemary-detail-panel {
  padding: 28px;
}
.rosemary-detail-panel h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--color-dark);
  font-family: var(--font-heading-special);
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 700;
  line-height: 1.3;
}
.rosemary-detail-panel h2 i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 16px;
}
.rosemary-detail-panel p {
  color: var(--color-body);
  font-size: 15px;
  line-height: 1.8;
}
.rosemary-component-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.rosemary-component-item,
.rosemary-component-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px;
  border-radius: 10px;
  background: var(--color-primary-light);
}
.rosemary-component-item i,
.rosemary-component-list i {
  margin-top: 4px;
  color: var(--color-primary);
}
.rosemary-component-item strong,
.rosemary-component-item span {
  display: block;
}
.rosemary-component-item span,
.rosemary-component-list li {
  color: var(--color-body);
  font-size: 15px;
  line-height: 1.55;
}
.rosemary-component-list {
  display: grid;
  gap: 10px;
}
.rosemary-fixed-component-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.rosemary-fixed-component {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-white);
}
.rosemary-fixed-component img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--color-cream);
}
.rosemary-fixed-component div {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 13px;
  color: var(--color-dark);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.55;
}
.rosemary-fixed-component i {
  margin-top: 4px;
  color: var(--color-primary);
}
.rosemary-detail-panel--split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.rosemary-offer-reviews {
  display: grid;
  gap: 12px;
}
.rosemary-offer-review {
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-off-white);
}
.rosemary-offer-review p {
  margin: 8px 0 10px;
  font-size: 15px;
  line-height: 1.75;
}
.rosemary-offer-review strong {
  color: var(--color-dark);
  font-size: 14px;
}
.rosemary-star-muted {
  color: var(--color-border) !important;
}
.rosemary-share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.rosemary-share-actions button,
.rosemary-share-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 15px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-white);
  color: var(--color-dark);
  font: 700 14px/1 var(--font-main);
  cursor: pointer;
}
.rosemary-share-actions button:hover,
.rosemary-share-actions a:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.rosemary-price-card {
  position: sticky;
  top: 98px;
  padding: 28px;
  display: grid;
  gap: 14px;
}
.rosemary-price-card-label {
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 700;
}
.rosemary-price-card strong {
  color: var(--color-primary);
  font-size: 34px;
  line-height: 1.1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.rosemary-price-card .rosemary-price-old {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
}
.rosemary-saving {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--color-accent-gold-light);
  color: var(--color-accent-gold);
  font-weight: 800;
  font-size: 13px;
}
.rosemary-price-card .rosemary-riyal-symbol,
.rosemary-saving .rosemary-riyal-symbol,
.rosemary-price-old .rosemary-riyal-symbol {
  width: 0.76em;
  height: 0.76em;
}
.rosemary-offer-detail-whatsapp {
  width: 100%;
}
.rosemary-price-card .rosemary-selection-count {
  margin: 0;
  text-align: center;
}

@media (max-width: 1080px) {
  .rosemary-filter-form--compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .rosemary-filter-reset--compact {
    grid-column: 1 / -1;
    justify-content: center;
  }
  .rosemary-offer-detail-layout {
    grid-template-columns: 1fr;
  }
  .rosemary-price-card {
    position: static;
  }
}

@media (max-width: 809px) {
  .rosemary-btn--hero-primary,
  .rosemary-btn--hero-outline,
  .rosemary-btn--hero-ghost {
    width: 100%;
    height: 50px;
  }
  .rosemary-banners {
    padding: 18px 16px;
  }
  .banners-track {
    aspect-ratio: 1 / 1;
    min-height: auto;
    border-radius: 14px;
  }
  .rosemary-search-pill-section {
    padding: 26px 0 0;
  }
  .rosemary-search-pill {
    height: 54px;
    font-size: 16px;
  }
  .rosemary-filter-card--compact {
    margin-bottom: 24px;
    padding: 14px;
    border-radius: 12px;
  }
  #offers.rosemary-section {
    padding-top: 34px;
  }
  .rosemary-filter-form--compact {
    grid-template-columns: 1fr;
  }
  .rosemary-filter-reset--compact {
    grid-column: 1;
    justify-content: center;
  }
  .rosemary-mobile-carousel-controls {
    position: absolute;
    inset-block-start: 50%;
    inset-inline: -4px;
    z-index: 8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0;
    margin: 0;
    pointer-events: none;
    transform: translateY(-50%);
  }
  .rosemary-mobile-carousel-controls button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-white);
    color: var(--color-primary);
    box-shadow: 0 10px 28px rgba(0,0,0,0.18);
    cursor: pointer;
    pointer-events: auto;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
  }
  .rosemary-mobile-carousel-controls button:active {
    transform: scale(0.96);
  }
  .rosemary-offers-grid {
    display: flex !important;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 2px 0 12px;
    scrollbar-width: none;
  }
  .rosemary-offers-grid::-webkit-scrollbar {
    display: none;
  }
  .rosemary-offer-card {
    flex: 0 0 min(85vw, 360px);
    scroll-snap-align: start;
  }
  .rosemary-offer-actions {
    grid-template-columns: 1fr;
  }
  .rosemary-category-grid {
    display: flex !important;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-block-end: 10px;
    scrollbar-width: none;
  }
  .rosemary-category-grid::-webkit-scrollbar {
    display: none;
  }
  .rosemary-category-card {
    flex: 0 0 calc(50% - 7px);
    min-width: calc(50% - 7px);
    aspect-ratio: 1 / 1.05;
  }
  .rosemary-offer-detail-hero {
    padding: 98px 0 34px;
  }
  .rosemary-offer-detail-body {
    padding: 28px 0 48px;
  }
  .rosemary-offer-detail-layout,
  .rosemary-offer-detail-main {
    gap: 16px;
  }
  .rosemary-offer-gallery,
  .rosemary-detail-panel,
  .rosemary-price-card {
    border-radius: 12px;
  }
  .rosemary-detail-panel,
  .rosemary-price-card {
    padding: 18px;
  }
  .rosemary-offer-thumbs {
    grid-template-columns: repeat(4, 1fr);
  }
  .rosemary-gallery-arrow {
    width: 38px;
    height: 38px;
  }
  .rosemary-gallery-arrow--right {
    inset-inline-start: 10px;
  }
  .rosemary-gallery-arrow--left {
    inset-inline-end: 10px;
  }
  .rosemary-component-grid,
  .rosemary-fixed-component-grid,
  .rosemary-detail-panel--split {
    grid-template-columns: 1fr;
  }
  .rosemary-share-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .rosemary-price-card strong {
    font-size: 30px;
  }
}
