/*
 * free-ai.css — Gets Hint Theme
 * Auto-split from style.css
 * DO NOT manually edit style.css for free-ai styles — edit this file.
 */

/* =========================================================================
   FREE AI RESOURCES — Page Template (page-free-ai.php)
   ========================================================================= */

/* Hero */
.free-ai-header-wrapper {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 1.5rem 1.5rem;
}

/* Breadcrumb */
.free-ai-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1rem;
    font-size: 0.82rem;
}

.free-ai-breadcrumb__link {
    color: var(--on-surface-variant);
    text-decoration: none;
    opacity: 0.75;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.free-ai-breadcrumb__link:hover {
    opacity: 1;
    color: var(--primary);
}

.free-ai-breadcrumb__sep {
    color: var(--on-surface-variant);
    opacity: 0.5;
    font-size: 1rem;
    line-height: 1;
}

.free-ai-breadcrumb__current {
    color: var(--on-background);
    font-weight: 600;
}

/* Tab switcher */
.free-ai-tabs {
    display: flex;
    gap: 0.25rem;
    margin-top: 1.25rem;
    border-bottom: 1.5px solid var(--outline-variant);
    padding-bottom: 0;
}

.free-ai-tab {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--on-surface-variant);
    padding: 0.55rem 1.1rem 0.65rem;
    border-bottom: 2.5px solid transparent;
    margin-bottom: -1.5px;
    border-radius: 0;
    transition: color 0.2s ease, border-color 0.2s ease;
    letter-spacing: -0.01em;
}

.free-ai-tab:hover {
    color: var(--on-background);
}

.free-ai-tab.active {
    color: var(--primary, #666000);
    border-bottom-color: var(--primary, #666000);
    font-weight: 600;
}

[data-theme="dark"] .free-ai-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.free-ai-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.free-ai-header__left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.free-ai-header__right {
    display: flex;
    align-items: center;
}

.free-ai-view-all {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary, #666000);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s ease;
}

.free-ai-view-all:hover {
    color: var(--on-background, #1d1c13);
}

.free-ai-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.9rem;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(250, 204, 21, 0.12);
    color: #ca8a04;
    border: 1px solid rgba(250, 204, 21, 0.3);
    margin-bottom: 0.6rem;
}

.free-ai-hero__badge .material-symbols-outlined {
    font-size: 1rem;
}

.free-ai-hero__updated {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    color: var(--on-surface-variant, #494736);
    opacity: 0.7;
}

.free-ai-hero__updated .material-symbols-outlined {
    font-size: 1rem;
}

/* Section Container */
.free-ai-section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
}

/* Resource Cards Grid */
.free-ai-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

/* Individual Resource Card */
.free-ai-item {
    background: var(--surface, #ffffff);
    border: 1.5px solid var(--outline-variant, #cbc7b0);
    border-radius: var(--radius-xl, 16px);
    padding: 1rem 1.15rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.free-ai-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-container, #e9e400);
}

/* Card layout containers */
.free-ai-item__header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.7rem;
}

.free-ai-item__body {
    flex-grow: 1;
    margin-bottom: 0.9rem;
}

.free-ai-item__body p {
    font-size: 0.85rem;
}

.free-ai-item__footer {
    margin-top: auto;
}

.free-ai-item__title {
    font-family: var(--font-headline, 'Public Sans', sans-serif);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--on-background, #1d1c13);
    margin: 0;
    line-height: 1.35;
}

.free-ai-item__meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin: 0;
}

.free-ai-item__date {
    font-size: 0.78rem;
    color: var(--on-surface-variant, #494736);
    opacity: 0.7;
}

/* Status Badges */
.free-ai-item__status {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.55rem;
    border-radius: 100px;
}

.free-ai-item__status--active {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.free-ai-item__status--expired {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.free-ai-item__status--unknown {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.25);
}

.free-ai-item__desc {
    font-size: 0.88rem;
    color: var(--on-surface-variant, #494736);
    line-height: 1.55;
    margin: 0;
}

.free-ai-item__link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary, #666000);
    text-decoration: none;
    padding-top: 0.25rem;
    transition: color 0.2s ease;
}

.free-ai-item__link:hover {
    color: var(--on-background, #1d1c13);
}

/* Empty State */
.free-ai-empty {
    text-align: center;
    padding: 4rem 1.5rem;
    color: var(--on-surface-variant, #494736);
}

.free-ai-empty h2 {
    font-size: 1.3rem;
    margin: 1rem 0 0.5rem;
}

.free-ai-empty p {
    font-size: 0.95rem;
    opacity: 0.7;
}

/* Source Attribution */
.free-ai-source {
    margin-top: 2rem;
    padding: 1rem 1.25rem;
    background: rgba(250, 204, 21, 0.06);
    border: 1px solid rgba(250, 204, 21, 0.2);
    border-radius: var(--radius-lg, 12px);
    text-align: center;
}

.free-ai-source p {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--on-surface-variant, #494736);
    margin: 0;
}

.free-ai-source .material-symbols-outlined {
    font-size: 1.1rem;
    color: #ca8a04;
}

.free-ai-source a {
    color: var(--primary, #666000);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(102, 96, 0, 0.3);
    text-underline-offset: 2px;
}

/* Dark Mode */
[data-theme="dark"] .free-ai-hero__badge {
    background: rgba(250, 204, 21, 0.08);
    color: #fbbf24;
    border-color: rgba(250, 204, 21, 0.2);
}

[data-theme="dark"] .free-ai-item {
    background: var(--surface-container, #282720);
    border-color: var(--outline-variant, #494736);
}

[data-theme="dark"] .free-ai-item:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
    border-color: var(--primary, #d8d24a);
}

[data-theme="dark"] .free-ai-item__status--active {
    background: rgba(34, 197, 94, 0.08);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.2);
}

[data-theme="dark"] .free-ai-item__status--expired {
    background: rgba(239, 68, 68, 0.08);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.15);
}

[data-theme="dark"] .free-ai-source {
    background: rgba(250, 204, 21, 0.04);
    border-color: rgba(250, 204, 21, 0.12);
}

[data-theme="dark"] .free-ai-source .material-symbols-outlined {
    color: #fbbf24;
}

/* Responsive */
@media (max-width: 768px) {
    .free-ai-hero h1 {
        font-size: 2rem;
    }

    .free-ai-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .free-ai-hero {
        padding: 2rem 1rem 1.5rem;
    }

    .free-ai-hero h1 {
        font-size: 1.6rem;
    }

    .free-ai-section {
        padding: 0 1rem 2rem;
    }

    .free-ai-item {
        padding: 1rem 1.15rem;
    }
}

/* =========================================================================
   NEWS GRID — Bansos AI Cards
   Fetched real-time from appverse.id/bansos-ai via /wp-json/tdc/v1/bansos-news
   ========================================================================= */

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    padding: 0.25rem 0 2rem;
}

@media (max-width: 900px) {
    .news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .news-grid { grid-template-columns: 1fr; }
}

/* ── Card ───────────────────────────────────────────────────── */
.news-card {
    display: flex;
    flex-direction: column;
    background: var(--surface, #fff);
    border: 1px solid var(--outline, #e2e0d8);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.10);
    border-color: var(--primary, #4a7c59);
}

/* ── Thumbnail ──────────────────────────────────────────────── */
.news-card__img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--surface-variant, #f3f1e9);
    flex-shrink: 0;
}

.news-card__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.news-card:hover .news-card__img-wrap img {
    transform: scale(1.04);
}

/* Fallback icon when image fails */
.news-card__img-wrap--fallback img { display: none; }
.news-card__img-wrap--fallback {
    display: flex;
    align-items: center;
    justify-content: center;
}
.news-card__img-icon {
    font-size: 3rem !important;
    opacity: 0.2;
    color: var(--on-surface-variant, #6b6a5f);
}

/* ── NEW badge ──────────────────────────────────────────────── */
.news-badge-new {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e53e3e;
    color: #ffffff !important;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 2px 7px;
    border-radius: 4px;
    line-height: 1.6;
    pointer-events: none;
    z-index: 10;
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
}

.news-card:hover .news-badge-new {
    color: #ffffff !important;
}

/* ── Card body ──────────────────────────────────────────────── */
.news-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.85rem 1rem 0.9rem;
    flex: 1;
}

.news-card__title {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--on-surface, #1c1b16);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card__desc {
    font-size: 0.78rem;
    color: var(--on-surface-variant, #6b6a5f);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.news-card__meta {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    color: var(--on-surface-variant, #6b6a5f);
    opacity: 0.7;
    margin-top: auto;
    padding-top: 0.4rem;
}

/* ── Skeleton Loading ───────────────────────────────────────── */
@keyframes news-shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

.news-skeleton-box,
.news-skeleton-line {
    background: linear-gradient(
        90deg,
        var(--surface-variant, #eeecea) 25%,
        var(--outline, #e2e0d8) 50%,
        var(--surface-variant, #eeecea) 75%
    );
    background-size: 800px 100%;
    animation: news-shimmer 1.4s infinite linear;
    border-radius: 4px;
}

.news-card--skeleton .news-card__img-wrap.news-skeleton-box {
    border-radius: 0;
    aspect-ratio: 16 / 9;
}

/* ── Dark mode ──────────────────────────────────────────────── */
[data-theme="dark"] .news-card {
    background: var(--surface, #1e1e1e);
    border-color: var(--outline, #333);
}
[data-theme="dark"] .news-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,0.35);
}
[data-theme="dark"] .news-card__img-wrap {
    background: var(--surface-variant, #2a2a2a);
}
[data-theme="dark"] .news-card__title {
    color: var(--on-surface, #e8e6de);
}
[data-theme="dark"] .news-skeleton-box,
[data-theme="dark"] .news-skeleton-line {
    background: linear-gradient(
        90deg,
        #2a2a2a 25%,
        #333 50%,
        #2a2a2a 75%
    );
    background-size: 800px 100%;
}

/* =========================================================================
   MARKETPLACE GRID
   ========================================================================= */
.free-ai-marketplace-header {
    margin-bottom: 2rem;
}
.free-ai-marketplace-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.free-ai-marketplace-header p {
    font-size: 0.95rem;
    color: var(--on-surface-variant);
}

.marketplace-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    padding-bottom: 2rem;
}

@media (max-width: 900px) {
    .marketplace-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .marketplace-grid { grid-template-columns: 1fr; }
}

/* Enhancements over news-card */
.marketplace-card-custom {
    cursor: default; /* Remove pointer if we use button for checkout */
}

.marketplace-badge-hot {
    background: #e53e3e;
}

.marketplace-badge-soldout {
    background: #718096;
}

.marketplace-cat {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.2rem;
    letter-spacing: 0.05em;
}

.marketplace-body-custom {
    padding-bottom: 1.2rem;
}

.marketplace-footer-custom {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    border-top: 1px solid var(--outline-variant, #eaeaea);
    padding-top: 1rem;
}

.marketplace-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.marketplace-sold-text {
    font-size: 0.75rem;
    color: var(--on-surface-variant);
}

.marketplace-price-text {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--on-surface);
}

.marketplace-btn-checkout {
    display: block;
    text-align: center;
    background: #233e24;
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.marketplace-btn-checkout:hover {
    background: #182b19;
}

/* Dark mode overrides for marketplace */
[data-theme="dark"] .marketplace-footer-custom {
    border-color: var(--outline, #333);
}
[data-theme="dark"] .marketplace-btn-checkout {
    background: #3e6d3f;
}
[data-theme="dark"] .marketplace-btn-checkout:hover {
    background: #4f8b50;
}

/* =========================================================================
   MARKETPLACE PRE-CHECKOUT MODAL — Two-Column Layout
   ========================================================================= */

/* ── Buy Now Button ── */
.marketplace-btn-checkout {
    display: block;
    width: 100%;
    text-align: center;
    background: #233e24;
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}
.marketplace-btn-checkout:hover:not(:disabled) { background: #182b19; }
.marketplace-btn-checkout--disabled,
.marketplace-btn-checkout:disabled { background: #555; cursor: not-allowed; opacity: 0.6; }

/* ── Overlay ── */
.mkt-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 2rem 1rem;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: mkt-overlay-in 0.18s ease;
}
@keyframes mkt-overlay-in { from { opacity: 0; } to { opacity: 1; } }

/* ── Modal Card ── */
.mkt-modal {
    position: relative;
    background: var(--surface, #fff);
    border: 1px solid var(--outline-variant, #e0ddd5);
    border-radius: 16px;
    width: 100%;
    max-width: 860px;
    padding: 2rem;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
    animation: mkt-modal-in 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin: auto;
}
@keyframes mkt-modal-in {
    from { transform: scale(0.94) translateY(12px); opacity: 0; }
    to   { transform: scale(1) translateY(0);       opacity: 1; }
}

/* ── Back Link ── */
.mkt-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: none;
    border: none;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary, #666000);
    cursor: pointer;
    padding: 0;
    margin-bottom: 1.5rem;
    transition: color 0.2s ease;
}
.mkt-back-link:hover { color: var(--on-background); }

/* ── Two-column body ── */
.mkt-modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}
@media (max-width: 640px) {
    .mkt-modal-body { grid-template-columns: 1fr; gap: 1.5rem; }
    .mkt-modal { padding: 1.25rem; }
}

/* ══════════════════════════════
   LEFT COLUMN
   ══════════════════════════════ */
.mkt-product-hero {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    margin-bottom: 1rem;
}
.mkt-product-thumb {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--surface-variant, #eeecea);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mkt-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.mkt-product-thumb .material-symbols-outlined { font-size: 2rem; opacity: 0.35; }
.mkt-product-cat {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--primary, #666000);
    margin-bottom: 0.2rem;
}
.mkt-product-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}
.mkt-product-desc {
    font-size: 0.88rem;
    color: var(--on-surface-variant);
    line-height: 1.55;
    margin: 0 0 1.25rem;
}

/* Info grid: Status + Stock */
.mkt-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.mkt-info-box {
    border: 1.5px solid var(--outline-variant, #e0ddd5);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.mkt-info-label {
    font-size: 0.75rem;
    color: var(--on-surface-variant);
}
.mkt-info-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--on-surface);
}

/* Email field in left column */
.mkt-field { display: flex; flex-direction: column; gap: 0.4rem; }
.mkt-field-label { font-size: 0.85rem; font-weight: 600; color: var(--on-surface); }
.mkt-required { color: #e53e3e; }
.mkt-input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--outline-variant, #cbc7b0);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: var(--surface, #fff);
    color: var(--on-surface);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    outline: none;
}
.mkt-input:focus {
    border-color: var(--primary, #666000);
    box-shadow: 0 0 0 3px rgba(102, 96, 0, 0.1);
}
.mkt-input.mkt-input--error {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}
.mkt-error-msg { display: none; font-size: 0.78rem; color: #e53e3e; }

/* ══════════════════════════════
   RIGHT COLUMN
   ══════════════════════════════ */
.mkt-col-right {
    border: 1.5px solid var(--outline-variant, #e0ddd5);
    border-radius: 14px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.mkt-summary-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--on-surface-variant);
    margin: 0;
}
.mkt-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}
.mkt-summary-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.2rem;
    line-height: 1.3;
}
.mkt-summary-cat { font-size: 0.78rem; color: var(--on-surface-variant); }
.mkt-stock-pill {
    display: inline-block;
    background: var(--surface-variant, #eeecea);
    color: var(--on-surface-variant);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 100px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Coupon */
.mkt-coupon-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--on-surface);
    margin-bottom: 0.4rem;
}
.mkt-coupon-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.mkt-coupon-input { flex: 1; font-size: 0.88rem; }
.mkt-coupon-btn {
    padding: 0.65rem 1rem;
    background: var(--surface-variant, #eeecea);
    color: var(--on-surface);
    border: 1.5px solid var(--outline-variant, #cbc7b0);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease;
}
.mkt-coupon-btn:hover { background: var(--outline-variant, #cbc7b0); }
.mkt-coupon-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.mkt-coupon-msg {
    font-size: 0.78rem;
    margin-top: 0.2rem;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
}
.mkt-coupon-msg--success { background: rgba(34, 197, 94, 0.1); color: #15803d; }
.mkt-coupon-msg--error   { background: rgba(239, 68, 68, 0.1);  color: #b91c1c; }

/* Price Table */
.mkt-price-table {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--outline-variant, #e0ddd5);
}
.mkt-price-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    color: var(--on-surface-variant);
}
.mkt-price-row--total {
    font-size: 1rem;
    font-weight: 700;
    color: var(--on-surface);
    padding-top: 0.5rem;
    border-top: 1px solid var(--outline-variant, #e0ddd5);
}

/* Submit */
.mkt-submit-btn {
    width: 100%;
    padding: 0.8rem 1.2rem;
    background: #233e24;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}
.mkt-submit-btn:hover { background: #182b19; transform: translateY(-1px); }
.mkt-submit-btn:active { transform: translateY(0); }

/* Disclaimer */
.mkt-disclaimer {
    font-size: 0.72rem;
    color: var(--on-surface-variant);
    text-align: center;
    opacity: 0.65;
    margin: 0;
    line-height: 1.5;
}

/* ── Dark Mode ── */
[data-theme="dark"] .mkt-modal {
    background: var(--surface, #1e1e1e);
    border-color: var(--outline, #333);
}
[data-theme="dark"] .mkt-product-thumb { background: var(--surface-container, #2a2a2a); }
[data-theme="dark"] .mkt-info-box {
    background: var(--surface-container, #252525);
    border-color: var(--outline, #3a3a3a);
}
[data-theme="dark"] .mkt-col-right { border-color: var(--outline, #333); }
[data-theme="dark"] .mkt-stock-pill { background: rgba(255,255,255,0.08); }
[data-theme="dark"] .mkt-price-table,
[data-theme="dark"] .mkt-price-row--total { border-color: var(--outline, #333); }
[data-theme="dark"] .mkt-input {
    background: var(--surface-container, #2a2a2a);
    border-color: var(--outline, #444);
    color: var(--on-surface, #e8e6de);
}
[data-theme="dark"] .mkt-input:focus {
    border-color: var(--primary, #d8d24a);
    box-shadow: 0 0 0 3px rgba(216, 210, 74, 0.12);
}
[data-theme="dark"] .mkt-coupon-btn {
    background: rgba(255,255,255,0.06);
    border-color: var(--outline, #444);
    color: var(--on-surface, #e8e6de);
}
[data-theme="dark"] .mkt-coupon-btn:hover { background: rgba(255,255,255,0.12); }
[data-theme="dark"] .mkt-submit-btn { background: #3e6d3f; }
[data-theme="dark"] .mkt-submit-btn:hover { background: #4f8b50; }
[data-theme="dark"] .mkt-product-cat { color: var(--primary, #d8d24a); }
[data-theme="dark"] .mkt-coupon-msg--success { background: rgba(34,197,94,0.07); color: #4ade80; }


/* Make checkout button a proper full-width button element */
.marketplace-btn-checkout {
    display: block;
    width: 100%;
    text-align: center;
    background: #233e24;
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}
.marketplace-btn-checkout:hover:not(:disabled) {
    background: #182b19;
}
.marketplace-btn-checkout--disabled,
.marketplace-btn-checkout:disabled {
    background: #555;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ── Modal Overlay ── */
.mkt-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    animation: mkt-overlay-in 0.18s ease;
}

@keyframes mkt-overlay-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Modal Box ── */
.mkt-modal {
    position: relative;
    background: var(--surface, #fff);
    border: 1px solid var(--outline-variant, #e0ddd5);
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: mkt-modal-in 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes mkt-modal-in {
    from { transform: scale(0.92) translateY(10px); opacity: 0; }
    to   { transform: scale(1) translateY(0); opacity: 1; }
}

/* ── Close Button ── */
.mkt-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    border: none;
    background: var(--surface-variant, #f0ede5);
    color: var(--on-surface-variant);
    border-radius: 50%;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}
.mkt-modal__close:hover {
    background: var(--outline-variant, #cbc7b0);
}

/* ── Modal Header ── */
.mkt-modal__header {
    margin-bottom: 1.5rem;
}
.mkt-modal__title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 0.3rem;
}
.mkt-modal__product-name {
    font-size: 0.9rem;
    color: var(--on-surface-variant);
    margin: 0 0 0.15rem;
    font-weight: 500;
}
.mkt-modal__product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary, #666000);
    margin: 0;
}

/* ── Form Fields ── */
.mkt-modal__form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}
.mkt-modal__field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.mkt-modal__label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--on-surface);
}
.mkt-required {
    color: #e53e3e;
}
.mkt-optional {
    font-weight: 400;
    color: var(--on-surface-variant);
    font-size: 0.8rem;
}
.mkt-modal__input {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1.5px solid var(--outline-variant, #cbc7b0);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: var(--surface, #fff);
    color: var(--on-surface);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    outline: none;
}
.mkt-modal__input:focus {
    border-color: var(--primary, #666000);
    box-shadow: 0 0 0 3px rgba(102, 96, 0, 0.12);
}
.mkt-modal__input.mkt-input--error {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.12);
}
.mkt-modal__error {
    display: none;
    font-size: 0.78rem;
    color: #e53e3e;
}

/* ── Submit Button ── */
.mkt-modal__submit {
    width: 100%;
    padding: 0.75rem 1.2rem;
    background: #233e24;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
    margin-top: 0.25rem;
}
.mkt-modal__submit:hover {
    background: #182b19;
    transform: translateY(-1px);
}
.mkt-modal__submit:active {
    transform: translateY(0);
}

/* ── Disclaimer ── */
.mkt-modal__disclaimer {
    font-size: 0.72rem;
    color: var(--on-surface-variant);
    text-align: center;
    opacity: 0.65;
    margin: 0;
    line-height: 1.5;
}

/* ── Dark Mode ── */
[data-theme="dark"] .mkt-modal {
    background: var(--surface, #1e1e1e);
    border-color: var(--outline, #333);
}
[data-theme="dark"] .mkt-modal__close {
    background: rgba(255,255,255,0.08);
    color: var(--on-surface-variant);
}
[data-theme="dark"] .mkt-modal__close:hover {
    background: rgba(255,255,255,0.15);
}
[data-theme="dark"] .mkt-modal__input {
    background: var(--surface-container, #2a2a2a);
    border-color: var(--outline, #444);
    color: var(--on-surface, #e8e6de);
}
[data-theme="dark"] .mkt-modal__input:focus {
    border-color: var(--primary, #d8d24a);
    box-shadow: 0 0 0 3px rgba(216, 210, 74, 0.15);
}
[data-theme="dark"] .mkt-modal__submit {
    background: #3e6d3f;
}
[data-theme="dark"] .mkt-modal__submit:hover {
    background: #4f8b50;
}
[data-theme="dark"] .mkt-modal__product-price {
    color: var(--primary, #d8d24a);
}
