/* ─────────────────────────────────────────────────────────────────────────
   FakeShop Frontend CSS
   Pius X Catholic High School — Web Design
   ───────────────────────────────────────────────────────────────────────── */

/* CSS Custom Properties (store colors — overridden per-store) */
:root {
    --fs-primary:   #1a3a5c;
    --fs-secondary: #2e6da4;
    --fs-accent:    #f5a623;
    --fs-text:      #1a1a2e;
    --fs-muted:     #666;
    --fs-light:     #f5f7fa;
    --fs-border:    #e0e6ed;
    --fs-radius:    8px;
    --fs-radius-lg: 16px;
    --fs-shadow:    0 2px 12px rgba(0,0,0,0.08);
    --fs-shadow-md: 0 6px 24px rgba(0,0,0,0.12);
    --fs-font:      -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Reset & Base ─────────────────────────────────────────────────────────── */

.fs-checkout-wrap,
.fs-product-grid,
.fs-directory,
.fs-featured-product,
.fs-store-hero {
    font-family: var(--fs-font);
    color: var(--fs-text);
    box-sizing: border-box;
}

.fs-checkout-wrap *,
.fs-product-grid *,
.fs-directory *,
.fs-featured-product * {
    box-sizing: border-box;
}

/* ── Shared Buttons ───────────────────────────────────────────────────────── */

.fs-btn,
.fs-atc-btn,
.fs-cart-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--fs-radius);
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    line-height: 1;
}

.fs-btn--primary,
.fs-atc-btn {
    background: var(--fs-primary);
    color: #fff;
}
.fs-btn--primary:hover,
.fs-atc-btn:hover {
    background: var(--fs-secondary);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--fs-shadow-md);
    text-decoration: none;
}

.fs-btn--secondary {
    background: transparent;
    color: var(--fs-primary);
    border: 2px solid var(--fs-primary);
}
.fs-btn--secondary:hover {
    background: var(--fs-primary);
    color: #fff;
    text-decoration: none;
}

.fs-btn--ghost {
    background: transparent;
    color: var(--fs-muted);
    border: 1px solid var(--fs-border);
}
.fs-btn--large {
    padding: 16px 32px;
    font-size: 17px;
}

/* Add to cart animation */
.fs-atc-btn.fs-added {
    background: #1a8a1a;
    animation: fs-pulse 0.3s ease;
}
@keyframes fs-pulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ── Checkout Wrap ────────────────────────────────────────────────────────── */

.fs-checkout-wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 16px 40px;
}

/* Checkout Header */
.fs-checkout-header {
    padding: 24px 0 20px;
    border-bottom: 2px solid var(--fs-border);
    margin-bottom: 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
}
.fs-checkout-logo {
    font-size: 22px;
    font-weight: 800;
    color: var(--fs-primary);
    letter-spacing: -0.5px;
}
.fs-checkout-steps {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--fs-muted);
}
.fs-step { padding: 4px 10px; border-radius: 20px; }
.fs-step--active {
    background: var(--fs-primary);
    color: #fff;
    font-weight: 700;
}
.fs-step--done {
    color: #1a8a1a;
    font-weight: 600;
}
.fs-step-divider { color: var(--fs-border); }

/* Checkout Footer */
.fs-checkout-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--fs-border);
    text-align: center;
    font-size: 13px;
    color: var(--fs-muted);
}
.fs-checkout-footer p { margin: 4px 0; }
.fs-student-footer {
    font-style: italic;
    color: var(--fs-muted);
}

/* ── Cart Table ───────────────────────────────────────────────────────────── */

.fs-cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}
.fs-cart-table th,
.fs-cart-table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid var(--fs-border);
    font-size: 14px;
}
.fs-cart-table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--fs-muted);
    font-weight: 600;
}
.fs-col-remove { width: 40px; text-align: center; }
.fs-col-qty,
.fs-col-price,
.fs-col-total { text-align: right; }

.fs-cart-remove-btn {
    background: none;
    border: none;
    color: #cc0000;
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    opacity: 0.5;
    transition: opacity 0.2s;
}
.fs-cart-remove-btn:hover { opacity: 1; }

/* Cart Summary */
.fs-cart-summary {
    margin-left: auto;
    max-width: 300px;
    border: 1px solid var(--fs-border);
    border-radius: var(--fs-radius);
    overflow: hidden;
}
.fs-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--fs-border);
}
.fs-summary-row:last-child { border-bottom: none; }
.fs-summary-row--muted { color: var(--fs-muted); font-style: italic; }
.fs-summary-row--total {
    background: var(--fs-light);
    font-weight: 700;
    font-size: 16px;
}

/* Cart Actions */
.fs-cart-actions {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    flex-wrap: wrap;
}

/* Empty Cart */
.fs-cart-empty {
    text-align: center;
    padding: 60px 20px;
}
.fs-empty-icon { font-size: 56px; margin-bottom: 16px; }

/* ── Placeholder Pages (Shipping / Payment) ──────────────────────────────── */

.fs-placeholder-body {
    text-align: center;
}
.fs-placeholder-icon {
    font-size: 64px;
    margin-bottom: 16px;
}
.fs-placeholder-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--fs-primary);
    margin: 0 0 12px;
}
.fs-placeholder-desc {
    max-width: 500px;
    margin: 0 auto 32px;
    font-size: 15px;
    color: var(--fs-muted);
    line-height: 1.7;
}
.fs-placeholder-note {
    display: inline-block;
    background: #fffbe6;
    border: 1px solid #f5c842;
    border-radius: var(--fs-radius);
    padding: 10px 20px;
    font-size: 13px;
    color: #7a6000;
    margin: 24px 0;
}
.fs-placeholder-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* Fake Form */
.fs-fake-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto 24px;
    text-align: left;
}
.fs-fake-field { flex: 1; }
.fs-fake-field--full { flex: 0 0 100%; }
.fs-fake-field--half { flex: 0 0 calc(50% - 6px); }
.fs-fake-field--third { flex: 0 0 calc(33.33% - 8px); }
.fs-fake-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--fs-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}
.fs-fake-input {
    background: var(--fs-light);
    border: 1px solid var(--fs-border);
    border-radius: var(--fs-radius);
    padding: 10px 12px;
    min-height: 36px;
    font-size: 14px;
    color: var(--fs-muted);
}
.fs-fake-card-number {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    letter-spacing: 0.1em;
}
.fs-fake-mono { font-family: 'Courier New', monospace; color: var(--fs-muted); }

/* ── Upsell Modal ────────────────────────────────────────────────────────── */

.fs-upsell-container {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.fs-upsell-inner {
    background: #fff;
    border-radius: var(--fs-radius-lg);
    padding: 40px 32px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: var(--fs-shadow-md);
    position: relative;
}
.fs-upsell-badge {
    display: inline-block;
    background: var(--fs-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 16px;
}
.fs-upsell-title { font-size: 20px; font-weight: 700; color: var(--fs-primary); margin-bottom: 20px; }
.fs-upsell-product { display: flex; gap: 16px; text-align: left; margin-bottom: 24px; }
.fs-upsell-img { width: 90px; height: 90px; object-fit: cover; border-radius: var(--fs-radius); }
.fs-upsell-info { flex: 1; }
.fs-upsell-name { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.fs-upsell-short-desc { font-size: 13px; color: var(--fs-muted); margin-bottom: 6px; }
.fs-upsell-price { font-size: 18px; font-weight: 800; color: var(--fs-primary); }
.fs-upsell-buttons { display: flex; flex-direction: column; gap: 10px; }

/* ── Order Confirmation ──────────────────────────────────────────────────── */

.fs-confirmation-body { max-width: 640px; margin: 0 auto; }
.fs-confirmation-hero { text-align: center; margin-bottom: 40px; }
.fs-confirmation-checkmark {
    width: 72px; height: 72px;
    background: #1a8a1a;
    color: #fff;
    font-size: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    animation: fs-pop-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes fs-pop-in {
    0%   { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
.fs-confirmation-title {
    font-size: 32px;
    font-weight: 900;
    color: var(--fs-primary);
    margin: 0 0 8px;
}
.fs-confirmation-subtitle { font-size: 16px; color: var(--fs-muted); margin: 0; }

.fs-confirmation-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    background: var(--fs-light);
    border-radius: var(--fs-radius);
    padding: 20px;
    margin-bottom: 24px;
}
.fs-meta-item { flex: 1; min-width: 150px; }
.fs-meta-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fs-muted); font-weight: 600; display: block; margin-bottom: 4px; }
.fs-meta-value { font-weight: 700; font-size: 15px; }
#fs-order-number { color: var(--fs-primary); }

.fs-confirmation-section-title { font-size: 16px; font-weight: 700; margin: 0 0 12px; }
.fs-confirmation-item-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--fs-border);
    font-size: 14px;
}
.fs-confirmation-total {
    display: flex;
    justify-content: space-between;
    padding: 16px 0 0;
    font-weight: 700;
    font-size: 17px;
}
.fs-confirmation-note {
    background: #fffbe6;
    border: 1px solid #f5c842;
    border-radius: var(--fs-radius);
    padding: 14px 18px;
    font-size: 13px;
    color: #7a6000;
    margin-top: 24px;
    text-align: center;
}
.fs-confirmation-actions { text-align: center; margin: 32px 0 16px; }

/* ── Product Grid ────────────────────────────────────────────────────────── */

.fs-product-grid {
    display: grid;
    gap: 24px;
}
.fs-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.fs-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.fs-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
    .fs-grid-cols-3,
    .fs-grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .fs-grid-cols-2,
    .fs-grid-cols-3,
    .fs-grid-cols-4 { grid-template-columns: 1fr; }
}

.fs-product-card {
    background: #fff;
    border-radius: var(--fs-radius-lg);
    overflow: hidden;
    box-shadow: var(--fs-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}
.fs-product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--fs-shadow-md);
}
.fs-product-img-wrap {
    aspect-ratio: 1/1;
    overflow: hidden;
    background: var(--fs-light);
}
.fs-product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.fs-product-card:hover .fs-product-img { transform: scale(1.04); }
.fs-product-img-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 48px; background: var(--fs-light);
}

.fs-product-body { padding: 16px; }
.fs-product-name {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.3;
}
.fs-product-short {
    font-size: 13px;
    color: var(--fs-muted);
    margin: 0 0 10px;
    line-height: 1.4;
}
.fs-product-price { margin-bottom: 12px; }
.fs-price { font-weight: 700; font-size: 16px; color: var(--fs-primary); }
.fs-price-original { text-decoration: line-through; color: var(--fs-muted); font-size: 14px; margin-right: 6px; }
.fs-price-sale { font-weight: 800; font-size: 16px; color: #cc0000; }

.fs-sale-badge {
    position: absolute;
    top: 10px; left: 10px;
    background: var(--fs-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 10px;
    border-radius: 20px;
    z-index: 2;
}

/* ── Featured Product ────────────────────────────────────────────────────── */

.fs-featured-product {
    display: flex;
    gap: 32px;
    align-items: center;
    border-radius: var(--fs-radius-lg);
    overflow: hidden;
    background: var(--fs-light);
    padding: 32px;
}
.fs-featured-image-right { flex-direction: row-reverse; }
.fs-featured-image-background {
    position: relative;
    background-size: cover;
    background-position: center;
    padding: 60px 40px;
    flex-direction: column;
    color: #fff;
    text-align: center;
}
.fs-featured-image-background::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}
.fs-featured-image-background .fs-featured-body { position: relative; z-index: 1; }
.fs-featured-img-col { flex: 0 0 45%; }
.fs-featured-img-col img { width: 100%; border-radius: var(--fs-radius); object-fit: cover; aspect-ratio: 4/3; }
.fs-featured-body { flex: 1; }
.fs-featured-badge {
    display: inline-block;
    background: var(--fs-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}
.fs-featured-name { font-size: 28px; font-weight: 900; color: var(--fs-primary); margin: 0 0 10px; }
.fs-featured-desc { color: var(--fs-muted); margin-bottom: 16px; line-height: 1.7; }
.fs-featured-price { margin-bottom: 20px; }

/* ── Category Filter ─────────────────────────────────────────────────────── */

.fs-category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}
.fs-filter-btn {
    padding: 8px 18px;
    border: 2px solid var(--fs-border);
    border-radius: 20px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
}
.fs-filter-btn--active,
.fs-filter-btn:hover {
    background: var(--fs-primary);
    border-color: var(--fs-primary);
    color: #fff;
}
.fs-filter-tabs .fs-filter-btn {
    border-radius: 0;
    border-bottom: 3px solid transparent;
    border-top: none; border-left: none; border-right: none;
    padding-bottom: 10px;
}
.fs-filter-tabs .fs-filter-btn--active { border-bottom-color: var(--fs-primary); background: transparent; color: var(--fs-primary); }
.fs-filter-underline .fs-filter-btn { border: none; border-bottom: 2px solid transparent; border-radius: 0; }
.fs-filter-underline .fs-filter-btn--active { border-bottom-color: var(--fs-primary); background: transparent; color: var(--fs-primary); }

/* ── Cart Button ─────────────────────────────────────────────────────────── */

.fs-cart-btn-wrap { display: inline-block; }
.fs-cart-btn { position: relative; }
.fs-cart-count {
    position: absolute;
    top: -8px; right: -8px;
    background: var(--fs-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Floating cart (global) */
.fs-floating-cart {
    position: fixed;
    bottom: 24px; right: 24px;
    z-index: 9999;
}

/* ── Store Hero ───────────────────────────────────────────────────────────── */

.fs-store-hero {
    background: var(--fs-primary);
    background-size: cover;
    background-position: center;
    border-radius: var(--fs-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
}
.fs-store-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
}
.fs-hero-inner { position: relative; z-index: 1; }
.fs-hero-headline {
    font-size: clamp(28px, 5vw, 52px);
    font-weight: 900;
    color: #fff;
    margin: 0 0 12px;
    line-height: 1.1;
}
.fs-hero-sub {
    font-size: 18px;
    color: rgba(255,255,255,0.85);
    margin: 0 0 28px;
    max-width: 500px;
}
.fs-hero-btn { font-size: 16px; padding: 14px 32px; }

/* ── Directory ───────────────────────────────────────────────────────────── */

.fs-directory-header {
    text-align: center;
    margin-bottom: 40px;
}
.fs-directory-title { font-size: 32px; font-weight: 900; color: var(--fs-text); margin: 0 0 8px; }
.fs-directory-subtitle { color: var(--fs-muted); margin: 0 0 12px; }
.fs-directory-count {
    display: inline-block;
    background: var(--fs-light);
    border: 1px solid var(--fs-border);
    border-radius: 20px;
    padding: 6px 18px;
    font-size: 14px;
    font-weight: 600;
}

.fs-directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.fs-directory-card {
    background: #fff;
    border-radius: var(--fs-radius-lg);
    overflow: hidden;
    box-shadow: var(--fs-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.fs-directory-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--fs-shadow-md);
}
.fs-dir-card-bar { height: 6px; background: var(--fs-primary); }
.fs-dir-card-images { height: 160px; overflow: hidden; }

.fs-dir-mosaic { width: 100%; height: 100%; display: flex; gap: 2px; }
.fs-dir-mosaic img { object-fit: cover; flex: 1; }
.fs-dir-mosaic--1 img { width: 100%; }
.fs-dir-mosaic--empty {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 48px;
    background: var(--fs-light);
}

.fs-dir-card-body { padding: 16px; flex: 1; }
.fs-dir-industry-badge {
    display: inline-block;
    background: var(--fs-light);
    border: 1px solid var(--fs-border);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    margin-bottom: 8px;
}
.fs-dir-store-name { font-size: 18px; font-weight: 800; color: var(--fs-primary); margin: 0 0 4px; }
.fs-dir-product-count { font-size: 13px; color: var(--fs-muted); margin: 0; }

.fs-dir-card-footer { padding: 12px 16px; border-top: 1px solid var(--fs-border); }
.fs-dir-browse-btn {
    display: block;
    text-align: center;
    padding: 10px;
    background: var(--fs-primary);
    color: #fff;
    border-radius: var(--fs-radius);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.2s;
}
.fs-dir-browse-btn:hover {
    background: var(--fs-secondary);
    color: #fff;
    text-decoration: none;
}

.fs-directory-empty {
    text-align: center;
    padding: 60px;
    color: var(--fs-muted);
}

/* ── Upsell Block Widget ─────────────────────────────────────────────────── */

.fs-upsell-block {
    background: var(--fs-light);
    border: 2px solid var(--fs-accent);
    border-radius: var(--fs-radius-lg);
    padding: 28px;
    text-align: center;
}
.fs-upsell-headline { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.fs-upsell-widget-img { width: 120px; height: 120px; object-fit: cover; border-radius: var(--fs-radius); margin: 0 auto 12px; display: block; }
.fs-upsell-price { font-size: 22px; font-weight: 800; color: var(--fs-primary); margin: 8px 0 16px; }

/* ── Misc ─────────────────────────────────────────────────────────────────── */

.fs-widget-notice {
    background: #fff8e1;
    border: 1px solid #ffc107;
    border-radius: var(--fs-radius);
    padding: 12px 16px;
    font-size: 14px;
    color: #7a5500;
}
.fs-no-products { color: var(--fs-muted); font-style: italic; grid-column: 1/-1; }
