/* ==========================================================================
   DenverNerd Engine — Store, 3D WebGL Viewer & Payment Terminal
   File: store.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   Creator Marketplace Grid & Responsive Scaling
   -------------------------------------------------------------------------- */
.store-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 3.5rem;
}

/* Tablet / Laptop: 2 Columns */
@media (min-width: 640px) {
    .store-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop 1080p: 3 Columns */
@media (min-width: 1024px) {
    .store-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Ultra-wide / 1440p+: 4 Responsive Columns */
@media (min-width: 1440px) {
    .store-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* --------------------------------------------------------------------------
   Store Hero Carousel
   -------------------------------------------------------------------------- */
.store-hero-carousel {
    background: linear-gradient(135deg, rgba(20, 28, 46, 0.85) 0%, rgba(11, 15, 23, 0.98) 100%);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 16px;
    padding: 2.25rem;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.6);
}
.carousel-track {
    position: relative;
    min-height: 200px;
}
.carousel-slide {
    display: none;
    animation: fadeInSlide 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.carousel-slide.active {
    display: block;
}
@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.slide-badge-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
.slide-title {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    margin-bottom: 0.65rem;
}
.slide-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 780px;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}
.slide-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.slide-price-tag {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--accent-emerald);
}
.slide-price-tag .currency {
    font-size: 0.85rem;
    color: var(--text-dim);
    font-weight: 600;
}
.carousel-nav-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.carousel-btn {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--border);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.carousel-btn:hover {
    background: var(--accent-cyan);
    color: #080c14;
    border-color: var(--accent-cyan);
}
.carousel-dots {
    display: flex;
    gap: 0.4rem;
    margin-top: 1rem;
    justify-content: center;
}
.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.25s ease;
}
.carousel-dot.active {
    width: 24px;
    background: var(--accent-cyan);
}

/* --------------------------------------------------------------------------
   Category Filter Bar
   -------------------------------------------------------------------------- */
.category-filter-bar {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: center;
}
.filter-pill {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.55rem 1.2rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.filter-pill:hover {
    border-color: var(--accent-cyan);
    color: var(--text);
}
.filter-pill.active {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
    color: #080c14;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.35);
}

/* --------------------------------------------------------------------------
   Marketplace Product Cards
   -------------------------------------------------------------------------- */
.marketplace-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    box-shadow: var(--card-shadow, 0 4px 15px rgba(0, 0, 0, 0.25));
}
.marketplace-card:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-3px);
    box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(6, 182, 212, 0.2);
}
.badge-3d {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: var(--accent-cyan);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    letter-spacing: 0.02em;
}
.format-badge-wrap {
    display: flex;
    gap: 0.3rem;
    align-items: center;
}
.badge-format {
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
    font-size: 0.7rem;
    font-family: var(--font-mono);
    font-weight: 600;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
}
.status-stock {
    font-size: 0.75rem;
    color: var(--accent-emerald);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.gear-price {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent-amber);
    margin-bottom: 0.75rem;
}

/* --------------------------------------------------------------------------
   3D WebGL CAD / STL Inspection Showcase
   -------------------------------------------------------------------------- */
.product-showcase-layout {
    display: grid;
    grid-template-columns: 1.25fr 0.85fr;
    gap: 2.5rem;
    align-items: start;
    margin-top: 2rem;
}
@media (max-width: 960px) {
    .product-showcase-layout {
        grid-template-columns: 1fr;
    }
}
.viewer-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.viewer-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(15, 21, 35, 0.95);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 0.5rem;
}
.viewer-toolbar-group {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}
.btn-viewer-ctrl {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-viewer-ctrl:hover {
    color: var(--text);
    border-color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.1);
}
.btn-viewer-ctrl.active {
    background: var(--accent-cyan);
    color: #070a11;
    border-color: var(--accent-cyan);
    font-weight: 700;
}
#stl-viewer-container {
    width: 100%;
    height: 480px;
    background: radial-gradient(circle at 50% 50%, #151d30 0%, #0a0e17 100%);
    position: relative;
    outline: none;
    cursor: grab;
}
#stl-viewer-container:active {
    cursor: grabbing;
}
#stl-viewer-container canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}
.viewer-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(11, 15, 23, 0.9);
    z-index: 10;
    gap: 1rem;
    color: var(--accent-cyan);
    font-size: 0.95rem;
    font-weight: 600;
}
.viewer-specs {
    padding: 1rem 1.25rem;
    background: rgba(15, 21, 35, 0.7);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-dim);
    flex-wrap: wrap;
    gap: 0.5rem;
}
.spec-item strong {
    color: var(--text-muted);
}
.checkout-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.checkout-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease;
}
.checkout-input:focus {
    border-color: var(--accent-cyan);
}
.btn-checkout {
    width: 100%;
    padding: 0.85rem 1.25rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   In-Engine Payment Simulator (/store/checkout/simulate)
   -------------------------------------------------------------------------- */
.terminal-container {
    max-width: 1040px;
    margin: 2rem auto 4rem;
    padding: 0 1rem;
}
.terminal-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 2rem;
    align-items: start;
}
@media (max-width: 860px) {
    .terminal-grid {
        grid-template-columns: 1fr;
    }
}
.sandbox-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fbbf24;
    font-family: var(--font-mono);
    margin-bottom: 1rem;
}
.terminal-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 2rem;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
    position: relative;
}
.cyber-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #090d16 100%);
    border: 1px solid rgba(6, 182, 212, 0.4);
    border-radius: 14px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.75rem;
    box-shadow: 0 10px 25px rgba(6, 182, 212, 0.15);
    position: relative;
}
.card-chip {
    width: 42px;
    height: 32px;
    background: linear-gradient(135deg, #fbbf24, #d97706);
    border-radius: 6px;
    margin-bottom: 1.25rem;
}
.preset-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.btn-preset {
    font-size: 0.78rem;
    font-family: var(--font-mono);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-preset:hover {
    background: rgba(6, 182, 212, 0.15);
    border-color: var(--accent-cyan);
    color: var(--text);
}

/* --------------------------------------------------------------------------
   Customer Self-Service Orders Portal (/store/orders)
   -------------------------------------------------------------------------- */
.orders-portal-container {
    max-width: 960px;
    margin: 2rem auto 4rem;
    padding: 0 1rem;
}
.order-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.order-item-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}
.digital-library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}
.library-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* --------------------------------------------------------------------------
   Order Confirmation & Fulfillment Success Screen (/store/success)
   -------------------------------------------------------------------------- */
.success-container {
    max-width: 780px;
    margin: 3rem auto 5rem;
    padding: 0 1rem;
}
.success-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 3rem 2.5rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    text-align: center;
}
.check-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.15);
    border: 2px solid var(--accent-emerald);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-emerald);
    margin-bottom: 1.5rem;
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.25);
}
.fulfillment-box {
    background: rgba(11, 15, 23, 0.7);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 12px;
    padding: 1.75rem;
    margin: 2rem 0;
    text-align: left;
}
.meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: rgba(11, 15, 23, 0.5);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.85rem;
    text-align: left;
}
@media (max-width: 600px) {
    .meta-grid {
        grid-template-columns: 1fr;
    }
}
.btn-download-stl {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent-emerald), #059669);
    color: #070a11 !important;
    box-shadow: 0 4px 18px rgba(16, 185, 129, 0.4);
    transition: all 0.2s ease;
}
.btn-download-stl:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.55);
}

/* --------------------------------------------------------------------------
   Orders Lookup Form & Self-Service Portal Tables
   -------------------------------------------------------------------------- */
.lookup-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2.5rem;
    max-width: 560px;
    margin: 3rem auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.lookup-input {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(11, 15, 23, 0.8);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
    margin-bottom: 1.25rem;
    outline: none;
    transition: border-color 0.15s ease;
}
.lookup-input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}
.orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
}
.orders-table th {
    padding: 0.75rem 1rem;
    color: var(--text-dim);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}
.orders-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(51, 65, 85, 0.4);
}
