:root {
    --sf-accent: #5b2dd6;
    --sf-accent-2: #8a4df6;
    --sf-ink: #241b3a;
    --sf-muted: #7c7c96;
    --sf-bg: #faf8ff;
    --sf-card: #ffffff;
    --sf-border: #ece7f8;
    --sf-radius: 16px;
    --sf-shadow: 0 10px 30px rgba(91, 45, 214, 0.08);
}

* { box-sizing: border-box; }

body.sf-body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    background: linear-gradient(180deg, #f6f2ff 0%, var(--sf-bg) 340px);
    color: var(--sf-ink);
    min-height: 100vh;
}

.sf-container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.sf-nav {
    display: flex; align-items: center; gap: 28px;
    padding: 18px 0; flex-wrap: wrap;
}
.sf-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--sf-ink); text-decoration: none; }
.sf-brand-mark {
    width: 36px; height: 36px; border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--sf-accent-2), var(--sf-accent));
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 900; font-size: 17px; font-family: Georgia, serif;
    box-shadow: 0 4px 12px rgba(91, 45, 214, 0.35);
}
.sf-nav-links { display: flex; gap: 6px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.sf-nav-links a {
    color: var(--sf-ink); text-decoration: none; font-weight: 600; font-size: 14px;
    padding: 8px 14px; border-radius: 999px; transition: background .15s, color .15s;
}
.sf-nav-links a:hover { background: rgba(91, 45, 214, 0.08); color: var(--sf-accent); }
.sf-nav-links a.sf-cta {
    background: var(--sf-accent); color: #fff; box-shadow: 0 6px 16px rgba(91, 45, 214, 0.3);
}
.sf-nav-links a.sf-cta:hover { background: #4a22b8; color: #fff; }

/* ---------- hero ---------- */
.sf-hero { padding: 44px 0 38px; text-align: center; }
.sf-hero h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.15; margin: 6px 0 14px; font-weight: 800; letter-spacing: -0.5px; }
.sf-hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--sf-accent), #c084fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sf-hero p { color: var(--sf-muted); font-size: 17px; max-width: 640px; margin: 0 auto 24px; }
.sf-search {
    max-width: 560px; margin: 0 auto; display: flex; gap: 8px;
    background: #fff; border: 1px solid var(--sf-border); border-radius: 999px;
    padding: 7px 7px 7px 22px; box-shadow: var(--sf-shadow);
}
.sf-search input { flex: 1; border: 0; outline: 0; font-size: 15px; background: transparent; }
.sf-search button {
    border: 0; cursor: pointer; border-radius: 999px; padding: 11px 22px;
    background: var(--sf-accent); color: #fff; font-weight: 700; font-size: 14px;
}
.sf-search button:hover { background: #4a22b8; }

/* ---------- sections ---------- */
.sf-section { padding: 26px 0 8px; }
.sf-section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.sf-section-head h2 { font-size: 24px; margin: 0; font-weight: 800; }
.sf-section-head a { margin-left: auto; color: var(--sf-accent); font-weight: 700; font-size: 14px; text-decoration: none; }
.sf-section-head a:hover { text-decoration: underline; }

/* ---------- cards ---------- */
.sf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.sf-card {
    background: var(--sf-card); border: 1px solid var(--sf-border); border-radius: var(--sf-radius);
    overflow: hidden; text-decoration: none; color: inherit; display: block;
    transition: transform .18s, box-shadow .18s; box-shadow: 0 2px 10px rgba(91, 45, 214, 0.05);
}
.sf-card:hover { transform: translateY(-4px); box-shadow: var(--sf-shadow); }
.sf-card-media { position: relative; aspect-ratio: 4/3; background: linear-gradient(135deg, #c4b5fd, #f3e8ff); }
.sf-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sf-card-media .sf-initials {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 44px; font-weight: 800; color: rgba(91, 45, 214, 0.55);
    letter-spacing: 2px; font-family: Georgia, serif;
}
.sf-badge {
    position: absolute; top: 10px; left: 10px; background: rgba(91, 45, 214, 0.92);
    color: #fff; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
}
.sf-card-body { padding: 14px 16px 16px; }
.sf-card-body h3 { margin: 0 0 4px; font-size: 16px; font-weight: 700; }
.sf-card-meta { color: var(--sf-muted); font-size: 13px; margin-bottom: 10px; }
.sf-card-price { font-weight: 800; font-size: 17px; color: var(--sf-accent); }

/* ---------- types / tags ---------- */
.sf-type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.sf-type-card {
    background: #fff; border: 1px solid var(--sf-border); border-radius: var(--sf-radius);
    padding: 22px 20px; text-decoration: none; color: inherit; display: block;
    transition: transform .18s, box-shadow .18s;
}
.sf-type-card:hover { transform: translateY(-3px); box-shadow: var(--sf-shadow); }
.sf-type-card .sf-type-icon {
    width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--sf-accent), #c084fc); color: #fff; font-size: 20px; margin-bottom: 12px;
}
.sf-type-card h3 { margin: 0 0 4px; font-size: 16px; }
.sf-type-card p { margin: 0; color: var(--sf-muted); font-size: 13px; line-height: 1.5; }
.sf-tag-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.sf-tag-chips a {
    border: 1px solid var(--sf-border); background: #fff; color: var(--sf-ink);
    padding: 8px 16px; border-radius: 999px; text-decoration: none; font-size: 13px; font-weight: 600;
}
.sf-tag-chips a:hover { border-color: var(--sf-accent); color: var(--sf-accent); }

/* ---------- trust ---------- */
.sf-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 30px 0 10px; }
.sf-trust div { background: #fff; border: 1px solid var(--sf-border); border-radius: var(--sf-radius); padding: 18px; }
.sf-trust h4 { margin: 0 0 4px; font-size: 14px; }
.sf-trust p { margin: 0; color: var(--sf-muted); font-size: 13px; }

/* ---------- listing page ---------- */
.sf-layout { display: grid; grid-template-columns: 250px 1fr; gap: 28px; padding-top: 26px; align-items: start; }
.sf-filters { background: #fff; border: 1px solid var(--sf-border); border-radius: var(--sf-radius); padding: 18px; position: sticky; top: 16px; }
.sf-filters h4 { margin: 14px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--sf-muted); }
.sf-filters h4:first-child { margin-top: 0; }
.sf-filter-group { display: flex; flex-direction: column; gap: 4px; max-height: 300px; overflow: auto; }
.sf-filter-group a {
    color: var(--sf-ink); text-decoration: none; font-size: 14px; padding: 5px 8px; border-radius: 8px;
}
.sf-filter-group a:hover { background: rgba(91, 45, 214, 0.07); }
.sf-filter-group a.sf-active { background: var(--sf-accent); color: #fff; }
.sf-filter-group .sf-child { padding-left: 22px; font-size: 13px; }
.sf-price-row { display: flex; gap: 8px; }
.sf-price-row input {
    width: 100%; border: 1px solid var(--sf-border); border-radius: 9px; padding: 8px 10px; font-size: 13px; outline: 0;
}
.sf-price-row input:focus { border-color: var(--sf-accent); }
.sf-filters .sf-apply { width: 100%; margin-top: 12px; border: 0; cursor: pointer; border-radius: 9px; padding: 11px; background: var(--sf-accent); color: #fff; font-weight: 700; }
.sf-filters .sf-clear { display: block; text-align: center; margin-top: 10px; color: var(--sf-muted); font-size: 13px; text-decoration: none; }
.sf-filters .sf-clear:hover { color: var(--sf-accent); }
.sf-results-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.sf-results-head h2 { margin: 0; font-size: 20px; }
.sf-results-head span { color: var(--sf-muted); font-size: 13px; }
.sf-pagination { display: flex; gap: 8px; justify-content: center; margin: 30px 0; flex-wrap: wrap; }
.sf-pagination a, .sf-pagination span {
    min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--sf-border); border-radius: 10px; background: #fff; color: var(--sf-ink);
    text-decoration: none; font-size: 13px; font-weight: 600;
}
.sf-pagination .sf-active { background: var(--sf-accent); color: #fff; border-color: var(--sf-accent); }
.sf-empty { text-align: center; color: var(--sf-muted); padding: 60px 0; }
.sf-empty a { color: var(--sf-accent); font-weight: 600; }

/* ---------- item detail ---------- */
.sf-breadcrumb { padding: 22px 0 6px; color: var(--sf-muted); font-size: 13px; }
.sf-breadcrumb a { color: var(--sf-muted); text-decoration: none; }
.sf-breadcrumb a:hover { color: var(--sf-accent); }
.sf-item-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 34px; padding: 18px 0 50px; align-items: start; }
.sf-gallery { display: grid; gap: 12px; }
.sf-gallery-main { aspect-ratio: 4/3; border-radius: var(--sf-radius); overflow: hidden; background: linear-gradient(135deg, #c4b5fd, #f3e8ff); position: relative; box-shadow: var(--sf-shadow); }
.sf-gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sf-gallery-main .sf-initials { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 110px; font-weight: 800; color: rgba(91, 45, 214, 0.55); font-family: Georgia, serif; }
.sf-thumbs { display: flex; gap: 10px; }
.sf-thumbs button {
    width: 76px; height: 60px; border-radius: 10px; overflow: hidden; border: 2px solid transparent;
    cursor: pointer; padding: 0; background: #fff; position: relative;
}
.sf-thumbs button.sf-active { border-color: var(--sf-accent); }
.sf-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sf-thumbs .sf-initials { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; color: rgba(91, 45, 214, 0.5); font-family: Georgia, serif; }
.sf-item-info h1 { font-size: 30px; margin: 0 0 6px; font-weight: 800; letter-spacing: -0.3px; }
.sf-item-price { font-size: 24px; font-weight: 800; color: var(--sf-accent); margin: 8px 0 4px; }
.sf-item-desc { color: #4b4b63; line-height: 1.7; margin: 12px 0 18px; white-space: pre-line; }
.sf-attr-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; background: #fff; border: 1px solid var(--sf-border); border-radius: var(--sf-radius); padding: 16px 18px; }
.sf-attr-list div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; border-bottom: 1px dashed var(--sf-border); padding: 6px 0; }
.sf-attr-list div:nth-last-child(-n+2) { border-bottom: 0; }
.sf-attr-list dt { color: var(--sf-muted); }
.sf-attr-list dd { margin: 0; font-weight: 700; text-align: right; }
.sf-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.sf-tags a { background: #f1ecff; color: var(--sf-accent); font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; text-decoration: none; }
.sf-tags a:hover { background: var(--sf-accent); color: #fff; }
.sf-buybox { background: #fff; border: 1px solid var(--sf-border); border-radius: var(--sf-radius); padding: 20px; margin-top: 22px; box-shadow: var(--sf-shadow); }
.sf-buybox h3 { margin: 0 0 14px; font-size: 17px; }
.sf-field { margin-bottom: 12px; }
.sf-field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 5px; }
.sf-field input, .sf-field select {
    width: 100%; border: 1px solid var(--sf-border); border-radius: 10px; padding: 10px 12px; font-size: 14px; outline: 0; background: #fff;
}
.sf-field input:focus, .sf-field select:focus { border-color: var(--sf-accent); }
.sf-buybtn {
    width: 100%; border: 0; cursor: pointer; border-radius: 12px; padding: 13px;
    background: linear-gradient(90deg, var(--sf-accent), var(--sf-accent-2)); color: #fff;
    font-size: 15px; font-weight: 800; box-shadow: 0 8px 20px rgba(91, 45, 214, 0.35);
    transition: transform .15s, box-shadow .15s;
}
.sf-buybtn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(91, 45, 214, 0.4); }
.sf-buybtn:disabled { opacity: .6; cursor: wait; transform: none; }
.sf-hint { font-size: 12px; color: var(--sf-muted); margin-top: 10px; text-align: center; }
.sf-error { background: #fdecec; border: 1px solid #f5c2c2; color: #b42318; border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-top: 12px; }

/* ---------- order page ---------- */
.sf-order-wrap { max-width: 560px; margin: 40px auto; }
.sf-order-card { background: #fff; border: 1px solid var(--sf-border); border-radius: var(--sf-radius); padding: 26px; box-shadow: var(--sf-shadow); }
.sf-order-card h1 { font-size: 24px; margin: 0 0 4px; }
.sf-order-sub { color: var(--sf-muted); font-size: 14px; margin-bottom: 20px; }
.sf-order-line { display: flex; justify-content: space-between; font-size: 14px; padding: 9px 0; border-bottom: 1px dashed var(--sf-border); }
.sf-order-line span:first-child { color: var(--sf-muted); }
.sf-order-total { font-size: 18px; font-weight: 800; color: var(--sf-accent); padding-top: 12px; border-bottom: 0; }
.sf-paybtn { width: 100%; margin-top: 18px; border: 0; cursor: pointer; border-radius: 12px; padding: 14px; background: linear-gradient(90deg, var(--sf-accent), var(--sf-accent-2)); color: #fff; font-size: 15px; font-weight: 800; }
.sf-paybtn:disabled { opacity: .6; cursor: wait; }
.sf-success { text-align: center; padding: 30px 10px; }
.sf-success .sf-tick {
    width: 64px; height: 64px; border-radius: 50%; background: #e8f9ef; color: #12a150;
    display: inline-flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 900; margin-bottom: 14px;
}
.sf-success h2 { margin: 0 0 8px; }
.sf-success p { color: var(--sf-muted); }

/* ---------- magic box popup ---------- */
.sf-popup {
    position: fixed; bottom: 22px; right: 22px; max-width: 330px; z-index: 60;
    background: #fff; border: 1px solid var(--sf-border); border-radius: 18px; padding: 20px;
    box-shadow: 0 18px 50px rgba(30, 10, 60, 0.25);
}
.sf-popup .sf-popup-close {
    position: absolute; top: 10px; right: 12px; border: 0; background: none; cursor: pointer;
    color: var(--sf-muted); font-size: 17px;
}
.sf-popup .sf-popup-close:hover { color: var(--sf-ink); }
.sf-popup h4 { margin: 0 0 6px; font-size: 16px; }
.sf-popup p { margin: 0 0 14px; color: var(--sf-muted); font-size: 13px; line-height: 1.5; }
.sf-popup a {
    display: block; text-align: center; background: var(--sf-accent); color: #fff; text-decoration: none;
    border-radius: 12px; padding: 11px; font-weight: 700; font-size: 14px;
}
.sf-popup a:hover { background: #4a22b8; }

/* ---------- footer ---------- */
.sf-footer { margin-top: 60px; border-top: 1px solid var(--sf-border); background: #fff; }
.sf-footer-in { max-width: 1180px; margin: 0 auto; padding: 30px 20px; display: flex; gap: 40px; flex-wrap: wrap; align-items: center; }
.sf-footer .sf-brand { font-size: 17px; }
.sf-footer nav { display: flex; gap: 18px; margin-left: auto; flex-wrap: wrap; }
.sf-footer nav a { color: var(--sf-muted); text-decoration: none; font-size: 13px; }
.sf-footer nav a:hover { color: var(--sf-accent); }

@media (max-width: 860px) {
    .sf-layout { grid-template-columns: 1fr; }
    .sf-filters { position: static; }
    .sf-item-layout { grid-template-columns: 1fr; }
    .sf-nav-links { margin-left: 0; width: 100%; justify-content: flex-start; }
    .sf-trust { grid-template-columns: 1fr; }
}/* ---- Sprint 11.4: ratings, reviews, wishlist, bundles, cities ---- */
.sf-hero-small { padding: 36px 32px 26px; }
.sf-hero-small h1 { font-size: 30px; margin-bottom: 8px; }

.sf-card-rating { color: #b45309; font-size: 13px; line-height: 1.5; }
.sf-stars { color: #f59e0b; letter-spacing: 1px; }
.sf-rating-summary { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.sf-rating-avg { font-weight: 800; font-size: 18px; color: #111827; }
.sf-rating-count { color: #6b7280; font-size: 13px; }
.sf-item-price-row { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.sf-heart {
  border: 1px solid #e5e7eb; background: #fff; color: #6b7280; border-radius: 999px;
  padding: 6px 14px; font-size: 14px; cursor: pointer; transition: all .15s ease;
}
.sf-heart:hover { border-color: #5b2dd6; color: #5b2dd6; }
.sf-heart-on { border-color: #e31b6d; color: #e31b6d; background: #fdf2f8; }
.sf-item-city a { color: #5b2dd6; text-decoration: none; font-size: 14px; font-weight: 600; }
.sf-item-city { margin-bottom: 14px; }

.sf-dist { min-width: 220px; }
.sf-dist-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #6b7280; }
.sf-dist-row > span { width: 24px; }
.sf-dist-bar { flex: 1; height: 8px; background: #f3f4f6; border-radius: 999px; overflow: hidden; }
.sf-dist-bar i { display: block; height: 100%; background: linear-gradient(90deg, #f59e0b, #fbbf24); border-radius: 999px; }
.sf-reviews { background: #fff; border: 1px solid #eef0f4; border-radius: 16px; padding: 24px; margin-bottom: 22px; }
.sf-reviews-head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 18px; }
.sf-reviews-head h3 { margin: 0 0 6px; }
.sf-review { padding: 14px 0; border-top: 1px solid #f1f2f6; }
.sf-review:first-of-type { border-top: none; }
.sf-review-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sf-review-top strong { font-size: 14px; }
.sf-review h4 { margin: 6px 0 4px; font-size: 15px; }
.sf-review p { margin: 0; color: #4b5563; font-size: 14px; line-height: 1.6; }
.sf-verified { color: #067b3c; background: #e8f7ee; font-size: 12px; border-radius: 999px; padding: 2px 10px; }
.sf-review-form { background: #fff; border: 1px solid #eef0f4; border-radius: 16px; padding: 24px; }
.sf-review-form h3 { margin-top: 0; }
.sf-review-thanks { background: #f0f7ff; border: 1px solid #d4e6fb; border-radius: 16px; padding: 24px; text-align: center; }
.sf-review-thanks h3 { margin: 0 0 6px; color: #0b5394; }
.sf-review-thanks p { margin: 0; color: #4b5563; }

.sf-sort {
  border: 1px solid #e5e7eb; background: #fff; border-radius: 10px; padding: 8px 12px;
  font-size: 14px; color: #374151; cursor: pointer;
}
.sf-results-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.sf-results-head h2 { margin: 0; }

.sf-grid-bundles .sf-card { border-top: 3px solid transparent; }
.sf-bundle-card:hover { border-top-color: #5b2dd6; }
.sf-bundle-desc { color: #6b7280; font-size: 13px; margin: 4px 0 8px; }
.sf-savings { color: #067b3c; background: #f0fdf5; border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.sf-bundle-contents { background: #faf9fd; border: 1px dashed #ddd3f1; border-radius: 14px; padding: 16px; margin: 16px 0; }
.sf-bundle-contents h3 { font-size: 15px; margin: 0 0 8px; }
.sf-bundle-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 4px; font-size: 14px; color: #374151; text-decoration: none; border-top: 1px solid #f1f0f7; }
.sf-bundle-line:first-of-type { border-top: none; }
.sf-bundle-line span:last-child { white-space: nowrap; }
.sf-order-bundle { border-bottom: 1px dashed #e5e7eb; }

@media (max-width: 720px) {
  .sf-reviews-head { flex-direction: column; }
  .sf-dist { width: 100%; }
}

/* ---------- newsletter box ---------- */
.sf-newsletter {
  background: linear-gradient(120deg, #5b2dd6 0%, #8a4df6 60%, #c084fc 100%);
  border-radius: 22px; padding: 34px 36px; color: #fff;
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
  box-shadow: 0 14px 36px rgba(91, 45, 214, 0.28);
  position: relative; overflow: hidden;
}
.sf-newsletter::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.22), transparent 45%);
}
.sf-newsletter > div:first-child { position: relative; flex: 1 1 260px; }
.sf-newsletter h3 { margin: 0 0 6px; font-size: 22px; font-weight: 800; }
.sf-newsletter p { margin: 0; color: rgba(255, 255, 255, 0.85); font-size: 14px; line-height: 1.5; }
.sf-newsletter-form {
  position: relative; flex: 1 1 320px; display: flex; gap: 8px;
  background: #fff; border-radius: 999px; padding: 7px 7px 7px 20px;
  box-shadow: 0 10px 26px rgba(30, 10, 60, 0.25);
}
.sf-newsletter-form input {
  flex: 1; border: 0; outline: 0; font-size: 14px; background: transparent; color: var(--sf-ink, #241b3a);
}
.sf-newsletter-form button {
  border: 0; cursor: pointer; border-radius: 999px; padding: 11px 24px;
  background: var(--sf-ink, #241b3a); color: #fff; font-weight: 700; font-size: 14px;
  transition: background .15s;
}
.sf-newsletter-form button:hover { background: #3b2a5e; }
.sf-newsletter-form button:disabled { background: #8a7ab5; cursor: not-allowed; opacity: 1; }
.sf-form-msg { position: relative; flex-basis: 100%; margin: 2px 0 0; font-size: 13px; font-weight: 600; }
.sf-form-msg.ok { color: #d1fae5; }
.sf-form-msg.bad { color: #fde8e8; }

.sf-taxonomy-rules { margin-top: 16px; padding: 16px; background: #faf9ff; border: 1px solid #e8e6f4; border-radius: 12px; }
.sf-taxonomy-rules h4 { margin: 0 0 12px; font-size: 15px; font-weight: 700; color: #232742; }
.sf-taxonomy-rule { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px dashed #d9cdf5; }
.sf-taxonomy-rule:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.sf-tax-row { display: flex; gap: 12px; margin-bottom: 6px; align-items: baseline; }
.sf-tax-row dt { flex: 0 0 140px; font-weight: 600; color: #4b4f6b; font-size: 13px; }
.sf-tax-row dd { flex: 1; margin: 0; color: #232742; font-size: 13px; }
.sf-tax-row dd .muted { color: #6b7189; font-style: italic; }

/* Gallery navigation */
.sf-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s;
}
.sf-gallery-nav:hover { background: rgba(0,0,0,0.6); }
.sf-gallery-prev { left: 10px; }
.sf-gallery-next { right: 10px; }
.sf-gallery-nav svg { width: 20px; height: 20px; }
@media (max-width: 640px) {
  .sf-gallery-nav { width: 36px; height: 36px; }
  .sf-gallery-prev { left: 6px; }
  .sf-gallery-next { right: 6px; }
}

/* Markdown editor */
.sf-markdown-editor { position: relative; }
.sf-md-toolbar {
  display: flex;
  gap: 4px;
  padding: 6px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 6px 6px 0 0;
  flex-wrap: wrap;
}
.sf-md-btn {
  padding: 4px 10px;
  font-size: 12px;
  background: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}
.sf-md-btn:hover { background: #f0f0f0; border-color: #aaa; }
.sf-md-toggle { margin-left: auto; }
.sf-md-preview {
  padding: 12px;
  background: #fafafa;
  border: 1px solid #ddd;
  border-top: none;
  min-height: 100px;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.sf-md-preview p { margin: 0 0 8px; }
.sf-md-preview strong { font-weight: 700; }
.sf-md-preview em { font-style: italic; }
.sf-md-preview a { color: #5b2dd6; text-decoration: none; }
.sf-md-preview a:hover { text-decoration: underline; }
.sf-md-preview ul, .sf-md-preview ol { margin: 8px 0; padding-left: 24px; }
.sf-md-preview blockquote { margin: 8px 0; padding: 8px 12px; background: #f5f5f5; border-left: 3px solid #5b2dd6; font-style: italic; }
.sf-md-actions { padding: 6px 0 0; text-align: right; }
#rv-body {
  border: 1px solid #ddd;
  border-radius: 0 0 6px 6px;
  border-top: none;
  padding: 10px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  min-height: 120px;
}
#rv-body:focus { outline: none; border-color: #5b2dd6; box-shadow: 0 0 0 3px rgba(91,45,214,0.15); }

/* Floating action buttons (WhatsApp, Call, Share) */
.sf-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sf-fab-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #5b2dd6;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(91, 45, 214, 0.3);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.sf-fab-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(91, 45, 214, 0.4);
}
.sf-fab-whatsapp:hover { background: #25d366; }
.sf-fab-call:hover { background: #fd7e14; }
.sf-fab-share:hover { background: #1da1f2; }
.sf-fab-btn svg { pointer-events: none; }
#sf-share-toast.on { opacity: 1 !important; }

/* Global action toast */
#sf-toast {
  position: fixed;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  z-index: 2100;
  background: #232742;
  color: #fff;
  padding: 11px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: min(90vw, 440px);
  text-align: center;
}
#sf-toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
#sf-toast.ok { background: #0c7a4a; }
#sf-toast.bad { background: #c0392b; }
