/* PambaKali - content pages: story blocks, pricing plans and callouts */

/* ============================================ */
/* STORY (text beside a photo) */
/* ============================================ */
.story {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: clamp(24px, 5vw, 64px);
}

.story-media {
    position: relative;
    aspect-ratio: 5 / 4;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface-alt);
}

.story-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-media .floating-note {
    position: absolute;
    left: 1.25rem;
    bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-md);
    font-size: 0.88rem;
    font-weight: 600;
}

.story-media .floating-note i {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--brand-light);
    color: var(--brand);
    display: grid;
    place-items: center;
}

.story-text h2 {
    margin-bottom: 1rem;
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.2vw, 2.5rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.025em;
}

.story-text h2 em {
    font-style: italic;
    color: var(--brand);
}

.story-text p {
    margin-bottom: 1rem;
    color: var(--ink-soft);
    line-height: 1.75;
}

.check-list {
    display: grid;
    gap: 0.6rem;
    margin: 1.25rem 0 0;
    list-style: none;
}

.check-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    color: var(--ink-soft);
    font-size: 0.95rem;
}

.check-list li::before {
    content: '\f00c';
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    border-radius: 50%;
    background: var(--brand-light);
    color: var(--brand);
    display: grid;
    place-items: center;
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.65rem;
}

/* ============================================ */
/* PRICING PLANS */
/* ============================================ */
.plans {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    align-items: stretch;
}

.plan {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.plan.featured {
    border: 2px solid var(--brand);
    box-shadow: var(--shadow-md);
}

.plan .plan-tag {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.25rem 0.9rem;
    border-radius: 999px;
    background: var(--brand-gradient);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.plan h3 {
    font-size: 1.15rem;
    font-weight: 700;
}

.plan > p {
    margin: 0.35rem 0 1.25rem;
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.plan-price {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
}

.plan-price strong {
    font-family: var(--font-display);
    font-size: 2.3rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.plan-price span {
    color: var(--muted);
    font-size: 0.88rem;
}

.plan .check-list {
    flex: 1;
    margin: 0 0 1.75rem;
}

.plan .btn {
    width: 100%;
}

.fine-print {
    margin-top: 1.25rem;
    color: var(--muted);
    font-size: 0.85rem;
    text-align: center;
}

/* ============================================ */
/* CALLOUT */
/* ============================================ */
.callout {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: clamp(22px, 4vw, 36px);
    border-radius: var(--radius-lg);
    background: var(--brand-light);
}

.callout h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.callout p {
    margin-top: 0.3rem;
    color: var(--ink-soft);
}

.callout-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Section heading used above blocks on content pages */
.block-head {
    max-width: 640px;
    margin-bottom: 1.75rem;
}

.block-head.center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.block-head p {
    margin-top: 0.6rem;
    color: var(--ink-soft);
}

/* Help topics */
.topic-card {
    display: block;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.2s, transform 0.25s var(--ease), box-shadow 0.25s;
}

.topic-card:hover {
    border-color: var(--brand);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

.topic-card .more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 0.85rem;
    color: var(--brand);
    font-size: 0.88rem;
    font-weight: 700;
}

.help-section {
    scroll-margin-top: 100px;
}

.help-section + .help-section {
    margin-top: clamp(40px, 6vw, 72px);
}

@media (max-width: 991px) {
    .story, .plans { grid-template-columns: 1fr; }
    .plan.featured { order: -1; }
}

/* Contact page aside */
.aside-title {
    margin-bottom: 1.1rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.contact-social {
    margin-top: 1.5rem;
}

.contact-social a {
    border-color: var(--line);
    color: var(--ink);
}

.contact-social a:hover {
    color: white;
}

.callout.compact {
    margin-top: 1.5rem;
    padding: 1.25rem;
}

.callout.compact p {
    margin: 0.2rem 0 0.75rem;
}

/* "What happens next" steps in a narrow aside: one compact row each */
.steps.next-steps {
    grid-template-columns: 1fr;
    gap: 0.6rem;
}

.next-steps .step {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 0.9rem;
    padding: 0.9rem 1rem;
}

.next-steps .step::before {
    grid-row: span 2;
    margin: 0;
    font-size: 1.6rem;
}

.next-steps .step h3 {
    margin: 0;
    font-size: 0.95rem;
}

.next-steps .step p {
    font-size: 0.85rem;
}

/* ============================================ */
/* MY ORDERS */
/* ============================================ */
.order-list {
    display: grid;
    gap: 1.25rem;
}

.order-card {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.order-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--line);
}

.order-shop {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.order-shop .shop-avatar {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--brand-gradient);
    color: white;
    display: grid;
    place-items: center;
    font-weight: 800;
}

.order-shop a {
    display: block;
    color: var(--ink);
    font-weight: 700;
}

.order-shop span {
    color: var(--muted);
    font-size: 0.82rem;
}

.order-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

/* Status pills: icon + label (same tones as the dashboards) */
:is(.order-card, .account-orders) .status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

:is(.order-card, .account-orders) .status.good { background: rgba(31, 157, 85, 0.12); color: #1f8a4c; }
:is(.order-card, .account-orders) .status.warning { background: rgba(237, 161, 0, 0.16); color: #a65f00; }
:is(.order-card, .account-orders) .status.critical { background: rgba(229, 72, 77, 0.12); color: #c4262b; }
:is(.order-card, .account-orders) .status.info { background: rgba(42, 120, 214, 0.12); color: #1f62b8; }
:is(.order-card, .account-orders) .status.brand { background: var(--brand-light); color: var(--brand); }
:is(.order-card, .account-orders) .status.neutral { background: var(--surface-alt); color: var(--ink-soft); }

:root[data-theme="dark"] :is(.order-card, .account-orders) .status.good { color: #4ade80; }
:root[data-theme="dark"] :is(.order-card, .account-orders) .status.warning { color: #fbbf24; }
:root[data-theme="dark"] :is(.order-card, .account-orders) .status.critical { color: #f87171; }
:root[data-theme="dark"] :is(.order-card, .account-orders) .status.info { color: #60a5fa; }

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) :is(.order-card, .account-orders) .status.good { color: #4ade80; }
    :root:not([data-theme="light"]) :is(.order-card, .account-orders) .status.warning { color: #fbbf24; }
    :root:not([data-theme="light"]) :is(.order-card, .account-orders) .status.critical { color: #f87171; }
    :root:not([data-theme="light"]) :is(.order-card, .account-orders) .status.info { color: #60a5fa; }
}

.order-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin: 0;
    padding: 1rem 1.25rem 0;
    list-style: none;
    counter-reset: step;
}

.order-steps li {
    position: relative;
    padding-top: 22px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    text-align: center;
}

.order-steps li::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 50%;
    width: 12px;
    height: 12px;
    margin-left: -6px;
    border: 2px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    z-index: 1;
}

.order-steps li + li::after {
    content: "";
    position: absolute;
    top: 9px;
    right: 50%;
    width: 100%;
    height: 2px;
    background: var(--line);
}

.order-steps li.done {
    color: var(--ink);
}

.order-steps li.done::before {
    border-color: var(--brand);
    background: var(--brand);
}

.order-steps li.done::after {
    background: var(--brand);
}

.order-items {
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 1rem 1.25rem;
    list-style: none;
}

.order-items li {
    display: grid;
    grid-template-columns: 52px 1fr auto;
    align-items: center;
    gap: 0.85rem;
}

.order-items img,
.order-item-ph {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    background: var(--surface-alt);
    object-fit: cover;
}

.order-item-ph {
    display: grid;
    place-items: center;
    color: var(--muted);
}

.order-items div {
    min-width: 0;
}

.order-items a,
.order-items div strong {
    display: block;
    color: var(--ink);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.order-items span {
    color: var(--muted);
    font-size: 0.82rem;
}

.order-card-foot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 1.25rem;
    align-items: start;
    padding: 1rem 1.25rem 1.25rem;
    border-top: 1px dashed var(--line);
}

.order-totals {
    display: grid;
    gap: 0.3rem;
    margin: 0;
    font-size: 0.88rem;
}

.order-totals div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--ink-soft);
}

.order-totals dd {
    margin: 0;
}

.order-totals .total {
    padding-top: 0.35rem;
    border-top: 1px solid var(--line);
    color: var(--ink);
    font-size: 1rem;
    font-weight: 800;
}

.order-pay,
.order-contact {
    padding: 0.9rem 1rem;
    border-radius: 12px;
    background: var(--surface-alt);
    font-size: 0.86rem;
}

.order-pay p {
    margin: 0 0 0.6rem;
    color: var(--ink-soft);
}

.order-pay p i {
    color: #a65f00;
}

.order-pay-row {
    display: flex;
    gap: 0.5rem;
}

.order-pay-row input {
    flex: 1 1 auto;
    min-width: 0;
    height: 40px;
    padding: 0 0.85rem;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink);
    font-family: inherit;
}

.order-pay-row input:focus {
    outline: none;
    border-color: var(--brand);
}

.order-contact {
    display: grid;
    gap: 0.35rem;
}

.order-contact a {
    color: var(--brand);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.order-contact a i {
    width: 16px;
}

.order-note {
    margin: 0.25rem 0 0;
    color: var(--ink-soft);
    font-size: 0.84rem;
}

.order-note i {
    color: var(--success);
}

/* Tracking page (track/<link> from the SMS) */
.track-wrap {
    max-width: 760px;
}

.order-steps .step-time {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 500;
}

.track-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    align-content: start;
}

.track-actions p {
    flex-basis: 100%;
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.86rem;
}

.track-actions .track-signin {
    color: var(--muted);
    font-size: 0.78rem;
}

.track-help {
    margin: 1rem 0 0;
    color: var(--ink-soft);
    font-size: 0.88rem;
    text-align: center;
}

@media (max-width: 767px) {
    .order-card-foot { grid-template-columns: 1fr; }
    .order-steps li { font-size: 0.7rem; }
    .order-pay-row { flex-direction: column; }
}

/* ============================================ */
/* MY ACCOUNT */
/* ============================================ */
.account-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.account-avatar {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 22px;
    background: var(--brand-gradient);
    color: white;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(107, 70, 193, 0.3);
}

.account-who {
    flex: 1;
    min-width: 0;
}

.account-who h1 {
    margin: 0.15rem 0 0.2rem;
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    font-weight: 600;
    line-height: 1.1;
}

.account-who h1 em {
    color: var(--brand);
}

.account-who p {
    color: var(--muted);
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.account-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.account-stats a {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
    padding: 1rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    text-decoration: none;
    transition: border-color 0.2s, transform 0.2s;
}

.account-stats a:hover {
    border-color: var(--brand);
    transform: translateY(-2px);
}

.account-stats i {
    width: 36px;
    height: 36px;
    margin-bottom: 0.35rem;
    border-radius: 10px;
    background: var(--brand-light);
    color: var(--brand);
    display: grid;
    place-items: center;
}

.account-stats strong {
    font-size: 1.25rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.account-stats span {
    color: var(--muted);
    font-size: 0.8rem;
}

.account-topay {
    align-items: center;
    color: var(--ink);
    text-decoration: none;
}

.account-topay div {
    flex: 1;
}

.account-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.account-grid > div {
    display: grid;
    gap: 1.25rem;
    min-width: 0;
}

.account-card {
    padding: 1.25rem;
}

.account-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.account-card-head h2 {
    font-size: 1.05rem;
    font-weight: 700;
}

.account-card-head a {
    color: var(--brand);
    font-size: 0.86rem;
    font-weight: 600;
}

.account-orders {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
}

.account-orders li + li {
    border-top: 1px solid var(--line);
}

.account-orders a {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 0;
    color: var(--ink);
    text-decoration: none;
}

.account-orders img,
.account-orders .order-item-ph {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
}

.account-orders div {
    min-width: 0;
}

.account-orders div strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-orders div span {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
}

.account-order-end {
    display: grid;
    justify-items: end;
    gap: 0.3rem;
}

.account-links {
    display: grid;
}

.account-links a {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.8rem 0.25rem;
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
}

.account-links a + a {
    border-top: 1px solid var(--line);
}

.account-links a i:first-child {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--brand-light);
    color: var(--brand);
    display: grid;
    place-items: center;
}

.account-links a span {
    flex: 1;
}

.account-links a i:last-child {
    color: var(--muted);
    font-size: 0.8rem;
}

.account-links a:hover span {
    color: var(--brand);
}

.account-signout .btn {
    width: 100%;
    justify-content: center;
}

@media (max-width: 991px) {
    .account-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
    .account-stats { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
    .account-avatar { width: 58px; height: 58px; border-radius: 18px; font-size: 1.2rem; }
    .account-card { padding: 1rem; }
    .account-orders a { grid-template-columns: 44px minmax(0, 1fr); }
    .account-order-end { grid-column: 2; justify-items: start; grid-auto-flow: column; align-items: center; justify-content: start; gap: 0.6rem; }
}

.account-card .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 1rem;
}

@media (max-width: 575px) {
    .account-card .form-grid { grid-template-columns: 1fr; }
}

/* ============================================ */
/* CATEGORY PAGE (category/<slug>) */
/* ============================================ */
.filter-toggle {
    display: inline-flex;
    cursor: pointer;
}

.filter-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.filter-toggle span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    height: 42px;
    padding: 0 1rem;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    background: var(--surface-alt);
    color: var(--ink-soft);
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.filter-toggle input:checked + span {
    border-color: var(--brand);
    background: var(--brand-light);
    color: var(--brand);
}

.filter-toggle input:focus-visible + span {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.browse-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin: 1.25rem 0 1rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.browse-summary strong {
    color: var(--ink);
}

.browse-summary a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--brand);
    font-weight: 600;
}

.browse-pages {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 2rem;
}

.browse-pages a,
.browse-pages span {
    min-width: 42px;
    height: 42px;
    padding: 0 0.6rem;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 700;
}

.browse-pages a {
    border: 1.5px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}

.browse-pages a:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.browse-pages a.active {
    border-color: transparent;
    background: var(--brand-gradient);
    color: white;
}

.browse-pages span {
    color: var(--muted);
}

/* Phones: search and "On sale" on one row, sort and price side by side below */
@media (max-width: 767px) {
    .browse-filters { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 0.5rem; }
    .browse-filters > * { min-width: 0; }
    .browse-filters .filter-search { grid-area: 1 / 1 / 2 / 4; }
    .browse-filters .filter-toggle { grid-area: 1 / 4 / 2 / 5; }
    .browse-filters .filter-sort:nth-child(2) { grid-area: 2 / 1 / 3 / 3; }
    .browse-filters .filter-sort:nth-child(3) { grid-area: 2 / 3 / 3 / 5; }
    .browse-filters .filter-sort select { width: 100%; text-overflow: ellipsis; }
    .browse-filters .filter-toggle span { padding: 0 0.8rem; }
}

/* My orders: delivery confirmation and rating */
.order-receive {
    display: grid;
    gap: 0.5rem;
    grid-column: 1 / -1;
    padding: 1rem;
    border: 1.5px dashed var(--brand);
    border-radius: 12px;
    background: var(--brand-light);
    font-size: 0.88rem;
}

.order-receive p {
    margin: 0;
    color: var(--ink-soft);
}

.order-receive-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.order-problem {
    display: grid;
    gap: 0.5rem;
}

.order-problem label {
    font-weight: 600;
}

.order-problem textarea {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink);
    font-family: inherit;
    resize: vertical;
}

.order-problem button {
    justify-self: start;
}

.order-rate,
.order-rated {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.2rem;
    font-size: 0.8rem;
    font-weight: 700;
}

.order-items .order-rate {
    color: #c27400;
}

.order-items .order-rated {
    color: var(--muted);
}

.order-rated i {
    color: #f5a524;
}

.order-card-foot > .order-note {
    grid-column: 1 / -1;
}

.order-problem[hidden] {
    display: none;
}

.order-card {
    scroll-margin-top: 96px;
}
