:root {
  --salama-navy: #0c2556;
  --salama-blue: #133ea5;
  --salama-sky: #eaf2ff;
  --salama-green: #169b62;
  --salama-mint: #e9f8f1;
  --salama-orange: #f15a29;
  --salama-ink: #15233b;
  --salama-muted: #607089;
  --salama-line: #dce4ee;
  --salama-white: #ffffff;
  --salama-radius: 22px;
  --salama-shadow: 0 22px 60px rgba(20, 44, 84, .10);
}

.salama-storefront,
.salama-storefront * { box-sizing: border-box; }

.salama-storefront {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr);
  gap: clamp(24px, 4vw, 52px);
  align-items: start;
}

.salama-storefront__catalogue,
.salama-storefront__prescription {
  min-width: 0;
}

.salama-section-kicker {
  margin: 0 0 10px;
  color: var(--salama-blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.salama-section-heading {
  display: flex;
  gap: 20px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 24px;
}

.salama-catalogue h2,
.salama-prescription h2 {
  margin: 0;
  color: var(--salama-navy);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.salama-section-heading p,
.salama-prescription > p {
  margin: 10px 0 0;
  color: var(--salama-muted);
  font-size: 15px;
  line-height: 1.7;
}

.salama-result-count {
  flex: 0 0 auto;
  color: var(--salama-muted);
  font-size: 13px;
  font-weight: 700;
}

.salama-catalogue-tools {
  margin-bottom: 24px;
}

.salama-search {
  position: relative;
  display: block;
  margin-bottom: 16px;
}

.salama-search input {
  width: 100%;
  min-height: 52px;
  padding: 0 48px 0 18px;
  border: 1px solid var(--salama-line);
  border-radius: 14px;
  background: var(--salama-white);
  color: var(--salama-ink);
  font: inherit;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.salama-search input:focus {
  border-color: var(--salama-blue);
  box-shadow: 0 0 0 4px rgba(19, 62, 165, .11);
}

.salama-search > span:last-child {
  position: absolute;
  top: 50%;
  right: 18px;
  color: var(--salama-blue);
  font-size: 25px;
  transform: translateY(-50%);
  pointer-events: none;
}

.salama-category-list {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: thin;
}

.salama-category-list button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--salama-line);
  border-radius: 999px;
  background: var(--salama-white);
  color: var(--salama-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s ease;
}

.salama-category-list button:hover,
.salama-category-list button:focus-visible,
.salama-category-list button.is-active {
  border-color: var(--salama-navy);
  background: var(--salama-navy);
  color: var(--salama-white);
}

.salama-product-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.salama-product-card {
  position: relative;
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--salama-line);
  border-radius: 14px;
  background: var(--salama-white);
  box-shadow: 0 8px 24px rgba(20, 44, 84, .07);
  cursor: pointer;
  outline: none;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.salama-product-card:hover,
.salama-product-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(19, 62, 165, .35);
  box-shadow: 0 16px 34px rgba(20, 44, 84, .13);
}

.salama-product-card[hidden] { display: none !important; }

.salama-product-card__image {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 1 / 1;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--salama-line);
  background: #f7f9fc;
}

.salama-product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 12px;
}

.salama-product-placeholder {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border-radius: 26px;
  background: linear-gradient(135deg, var(--salama-blue), var(--salama-navy));
  color: var(--salama-white);
  font-size: 42px;
  font-weight: 800;
  box-shadow: 0 15px 35px rgba(19, 62, 165, .25);
}

.salama-stock {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--salama-mint);
  color: #0c774a;
  box-shadow: 0 4px 12px rgba(17, 71, 48, .09);
  font-size: 9px;
  font-weight: 800;
}

.salama-stock--out_of_stock { background: #fff0ef; color: #b53b32; }
.salama-stock--on_request { background: #fff5e8; color: #9b5a00; }

.salama-product-card__details {
  position: absolute;
  z-index: 2;
  right: 9px;
  bottom: 9px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #2468ea;
  color: #fff !important;
  box-shadow: 0 5px 13px rgba(20, 76, 190, .26);
  font-size: 23px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none !important;
  transition: transform .2s ease, background .2s ease;
}

.salama-product-card__details:hover,
.salama-product-card__details:focus-visible { transform: scale(1.07); background: var(--salama-navy); }

.salama-product-card__body {
  display: flex;
  min-height: 132px;
  flex: 1;
  flex-direction: column;
  padding: 10px 11px 11px;
}

.salama-product-card__category {
  display: block;
  overflow: hidden;
  margin-bottom: 4px;
  color: #6f7f98;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .025em;
  line-height: 1.15;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.salama-product-card h3 {
  display: -webkit-box;
  overflow: hidden;
  min-height: 32px;
  margin: 0;
  color: var(--salama-ink);
  font-size: 13px;
  line-height: 1.22;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.salama-product-card p.salama-product-card__pack {
  overflow: hidden;
  min-height: auto;
  margin: 5px 0 8px;
  color: var(--salama-muted);
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.salama-product-card__footer {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.salama-product-card__footer strong {
  min-width: 0;
  color: var(--salama-navy);
  font-size: 14px;
  line-height: 1.05;
  white-space: nowrap;
}

.salama-whatsapp-button,
.salama-submit-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 10px 15px;
  border: 0;
  border-radius: 11px;
  background: var(--salama-green);
  color: #fff !important;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none !important;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}

.salama-product-card .salama-whatsapp-button {
  position: relative;
  isolation: isolate;
  min-width: 100px;
  min-height: 35px;
  overflow: hidden;
  gap: 5px;
  padding: 7px 10px 7px 16px;
  border: 1px solid #08a84f;
  border-radius: 9px;
  background: linear-gradient(180deg, #30ea7d 0%, #16c963 46%, #08a84f 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), inset 0 -2px 0 rgba(0,94,42,.22), 0 5px 12px rgba(6,145,67,.2);
  clip-path: polygon(9px 0, 100% 0, 100% 100%, 9px 100%, 0 50%);
  text-transform: uppercase;
}

.salama-product-card .salama-whatsapp-button:before {
  position: absolute;
  z-index: -1;
  top: 1px;
  right: 3px;
  left: 10px;
  height: 45%;
  border-radius: 7px 7px 50% 50%;
  background: linear-gradient(180deg, rgba(255,255,255,.34), rgba(255,255,255,0));
  content: "";
  pointer-events: none;
}

.salama-product-card .salama-whatsapp-button svg { width: 16px; height: 16px; flex: 0 0 auto; fill: #fff; }
.salama-product-card .salama-whatsapp-button span { font-size: 9px; font-weight: 900; line-height: 1; white-space: nowrap; }
.salama-product-card .salama-whatsapp-button:hover,
.salama-product-card .salama-whatsapp-button:focus-visible { background: linear-gradient(180deg, #39ed84 0%, #12ba59 50%, #078c42 100%); transform: translateY(-1px); }

.salama-whatsapp-button:hover,
.salama-submit-button:hover { background: #0d8450; transform: translateY(-1px); }
.salama-whatsapp-button.is-disabled { opacity: .55; pointer-events: none; }

.salama-pagination {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
}

.salama-pagination[hidden] { display: none !important; }
.salama-pagination > button,
.salama-pagination__pages button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--salama-line);
  border-radius: 50%;
  background: #fff;
  color: var(--salama-navy);
  font: inherit;
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
}

.salama-pagination__pages { display: flex; gap: 7px; }
.salama-pagination__pages button { width: 10px; height: 10px; padding: 0; border: 0; background: #b7c4d8; font-size: 0; }
.salama-pagination__pages button.is-active { width: 28px; border-radius: 999px; background: var(--salama-blue); }
.salama-pagination > button:hover,
.salama-pagination > button:focus-visible { border-color: var(--salama-blue); background: var(--salama-blue); color: #fff; }
.salama-pagination > button:disabled { opacity: .35; cursor: not-allowed; }

.salama-product-grid.is-slide-forward .salama-product-card:not([hidden]) { animation: salama-slide-forward .34s ease both; }
.salama-product-grid.is-slide-backward .salama-product-card:not([hidden]) { animation: salama-slide-backward .34s ease both; }
@keyframes salama-slide-forward { from { opacity: .15; transform: translateX(28px); } to { opacity: 1; transform: translateX(0); } }
@keyframes salama-slide-backward { from { opacity: .15; transform: translateX(-28px); } to { opacity: 1; transform: translateX(0); } }

.salama-empty {
  grid-column: 1 / -1;
  padding: 44px 28px;
  border: 1px dashed #b9c8dc;
  border-radius: 18px;
  background: #f8fbff;
  text-align: center;
}

.salama-empty > div { color: var(--salama-blue); font-size: 34px; }
.salama-empty h3 { margin: 8px 0 5px; color: var(--salama-navy); }
.salama-empty p { max-width: 520px; margin: 0 auto 18px; color: var(--salama-muted); }
.salama-no-results {
  max-width: 680px;
  margin: 34px auto 0;
  padding: clamp(32px, 5vw, 52px) clamp(22px, 5vw, 46px);
  border: 1px solid var(--salama-line);
  border-radius: 20px;
  background: linear-gradient(145deg, #fff 0%, #f4f8ff 100%);
  box-shadow: 0 16px 40px rgba(20, 44, 84, .08);
  color: var(--salama-muted);
  text-align: center;
}

.salama-no-results[hidden] { display: none !important; }
.salama-no-results h3 { margin: 0; color: var(--salama-navy); font-size: clamp(24px, 3.2vw, 34px); line-height: 1.16; letter-spacing: -.025em; }
.salama-no-results p { max-width: 520px; margin: 13px auto 24px; font-size: 15px; line-height: 1.65; }
.salama-empty-whatsapp {
  display: inline-flex;
  min-height: 48px;
  gap: 9px;
  align-items: center;
  justify-content: center;
  padding: 12px 19px;
  border: 1px solid #118852;
  border-radius: 12px;
  background: #169b62;
  color: #fff !important;
  box-shadow: 0 9px 22px rgba(22, 155, 98, .2);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none !important;
  transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.salama-empty-whatsapp svg { width: 20px; height: 20px; flex: 0 0 auto; fill: currentColor; }
.salama-empty-whatsapp:hover,
.salama-empty-whatsapp:focus-visible { background: #0d8450; box-shadow: 0 12px 26px rgba(13, 132, 80, .26); transform: translateY(-2px); }
.salama-empty-whatsapp:focus-visible { outline: 3px solid rgba(19, 62, 165, .28); outline-offset: 3px; }

.salama-prescription {
  position: sticky;
  top: 105px;
  padding: clamp(24px, 3.5vw, 38px);
  border: 1px solid rgba(19, 62, 165, .12);
  border-radius: var(--salama-radius);
  background: linear-gradient(155deg, #fff 0%, #f3f7ff 100%);
  box-shadow: var(--salama-shadow);
}

.salama-prescription h2 { font-size: clamp(28px, 3vw, 38px); }
.salama-prescription-form { display: grid; gap: 15px; margin-top: 24px; }
.salama-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.salama-prescription-form label {
  display: grid;
  gap: 7px;
  color: var(--salama-ink);
  font-size: 13px;
  font-weight: 750;
}

.salama-prescription-form label > span { color: var(--salama-muted); font-weight: 500; }

.salama-prescription-form input:not([type="checkbox"]),
.salama-prescription-form select,
.salama-prescription-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid #cdd8e7;
  border-radius: 11px;
  background: #fff;
  color: var(--salama-ink);
  font: inherit;
  outline: none;
}

.salama-prescription-form textarea { resize: vertical; }
.salama-prescription-form input:focus,
.salama-prescription-form select:focus,
.salama-prescription-form textarea:focus { border-color: var(--salama-blue); box-shadow: 0 0 0 4px rgba(19, 62, 165, .10); }

.salama-file-field {
  padding: 16px;
  border: 1px dashed #9eb2ce;
  border-radius: 13px;
  background: rgba(255,255,255,.74);
}

.salama-file-field input { padding: 8px !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
.salama-file-field small { color: var(--salama-muted); font-weight: 500; }

.salama-consent {
  display: flex !important;
  gap: 10px !important;
  align-items: flex-start;
  color: var(--salama-muted) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.5;
}

.salama-consent input { flex: 0 0 auto; margin-top: 2px; }
.salama-submit-button { width: 100%; min-height: 52px; font-size: 14px; }

.salama-privacy-note {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  padding: 13px;
  border-radius: 12px;
  background: #edf4ff;
  color: #465a76;
}

.salama-privacy-note > span { color: var(--salama-blue); font-size: 18px; }
.salama-privacy-note p { margin: 0; font-size: 11px; line-height: 1.55; }
.salama-whatsapp-link { display: block; margin-top: 16px; color: var(--salama-green) !important; font-size: 13px; font-weight: 800; text-align: center; text-decoration: none !important; }

.salama-form-notice { margin-top: 18px; padding: 13px 15px; border-radius: 11px; font-size: 13px; }
.salama-form-notice.is-success { background: var(--salama-mint); color: #0c774a; }
.salama-form-notice.is-error { background: #fff0ef; color: #a4322a; }
.salama-honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }

.screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 1080px) {
  .salama-storefront { grid-template-columns: 1fr; }
  .salama-prescription { position: static; }
  .salama-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .salama-section-heading { display: block; }
  .salama-result-count { display: block; margin-top: 8px; }
  .salama-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .salama-form-row { grid-template-columns: 1fr; }
  .salama-prescription { border-radius: 18px; }
  .salama-product-card { border-radius: 11px; }
  .salama-product-card__image img { padding: 7px; }
  .salama-product-card__body { min-height: 128px; padding: 8px 8px 9px; }
  .salama-product-card__category { margin-bottom: 3px; font-size: 7px; }
  .salama-product-card h3 { min-height: 30px; font-size: 12px; }
  .salama-product-card p.salama-product-card__pack { margin: 4px 0 7px; font-size: 9px; }
  .salama-product-card__footer { gap: 4px; }
  .salama-product-card__footer strong { font-size: 12px; }
  .salama-product-card .salama-whatsapp-button { min-width: 84px; min-height: 34px; padding: 6px 7px 6px 13px; }
  .salama-product-card .salama-whatsapp-button svg { width: 14px; height: 14px; }
  .salama-product-card .salama-whatsapp-button span { max-width: 48px; font-size: 8px; white-space: normal; text-align: center; }
  .salama-product-card__details { right: 6px; bottom: 6px; width: 31px; height: 31px; font-size: 20px; }
  .salama-stock { top: 6px; left: 6px; padding: 4px 6px; font-size: 8px; }
  .salama-no-results { margin-top: 24px; padding: 30px 18px; border-radius: 16px; }
  .salama-no-results p { margin-bottom: 20px; font-size: 14px; }
  .salama-empty-whatsapp { width: 100%; min-height: 50px; padding: 12px 14px; }
}

@media (max-width: 390px) {
  .salama-product-card__footer { display: grid; grid-template-columns: 1fr; }
  .salama-product-card .salama-whatsapp-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .salama-product-card,
  .salama-product-card__details,
  .salama-whatsapp-button { transition: none !important; }
  .salama-product-grid.is-slide-forward .salama-product-card:not([hidden]),
  .salama-product-grid.is-slide-backward .salama-product-card:not([hidden]) { animation: none; }
}
