/* MClaude - AI Hardware Store Styles */

:root {
    --primary-orange: #F4A261;
    --dark-orange: #E76F51;
    --brown: #3D2314;
    --dark-brown: #2A1810;
    --cream: #FFF8F0;
    --light-orange: #FFE8D6;
    --accent-gold: #FFD700;
    --terminal-green: #00FF41;
    --terminal-bg: #0D1117;
    --success: #2ECC71;
    --error: #E74C3C;
    --shadow: 0 8px 32px rgba(61, 35, 20, 0.15);
    --shadow-hover: 0 12px 48px rgba(61, 35, 20, 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Fredoka', sans-serif;
    background: var(--cream);
    color: var(--brown);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated Background */
.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        radial-gradient(circle at 20% 80%, rgba(244, 162, 97, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(231, 111, 81, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 232, 214, 0.5) 0%, transparent 70%),
        linear-gradient(135deg, var(--cream) 0%, var(--light-orange) 100%);
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--brown) 0%, var(--dark-brown) 100%);
    padding: 1.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-content {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-section {
    flex-shrink: 0;
}

.logo {
    height: 100px;
    width: auto;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.03);
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.token-display {
    background: rgba(255,255,255,0.1);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    color: var(--accent-gold);
    font-weight: 600;
    font-size: 1.1rem;
}

.wallet-btn {
    background: linear-gradient(135deg, #AB9FF2 0%, #9945FF 100%);
    border: none;
    color: white;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-family: 'Fredoka', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(153, 69, 255, 0.3);
}

.wallet-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(153, 69, 255, 0.4);
}

.wallet-btn.connected {
    background: linear-gradient(135deg, var(--success) 0%, #27AE60 100%);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

/* Main Content - Two Columns */
.main-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 500px;
    gap: 2rem;
    min-height: calc(100vh - 140px);
}

/* Products Section */
.products-section {
    display: flex;
    flex-direction: column;
}

.section-header {
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--brown);
    margin-bottom: 0.25rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--dark-orange);
    font-weight: 500;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.category-tab {
    background: white;
    border: 2px solid var(--primary-orange);
    color: var(--brown);
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    font-family: 'Fredoka', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-tab:hover {
    background: var(--light-orange);
}

.category-tab.active {
    background: var(--primary-orange);
    color: white;
    border-color: var(--dark-orange);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    overflow-y: auto;
    flex: 1;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-orange);
}

.product-image {
    height: 100px;
    background: linear-gradient(135deg, var(--light-orange) 0%, var(--cream) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-icon {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--brown);
}

.product-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--dark-orange);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.product-info {
    padding: 1rem;
}

.product-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--brown);
    margin-bottom: 0.35rem;
}

.product-specs {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-price {
    display: flex;
    flex-direction: column;
}

.price-token {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark-orange);
}

.price-usd {
    font-size: 0.75rem;
    color: #999;
}

.buy-btn {
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--dark-orange) 100%);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-family: 'Fredoka', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.buy-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(231, 111, 81, 0.4);
}

/* Terminal Section */
.terminal-section {
    position: sticky;
    top: 140px;
    height: calc(100vh - 180px);
}

.terminal-container {
    background: var(--terminal-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-hover);
    border: 2px solid var(--brown);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.terminal-header {
    background: linear-gradient(135deg, var(--brown) 0%, var(--dark-brown) 100%);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.terminal-dots {
    display: flex;
    gap: 0.4rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red { background: #FF5F57; }
.dot.yellow { background: #FFBD2E; }
.dot.green { background: #28C840; }

.terminal-title {
    color: var(--primary-orange);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
}

.terminal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--terminal-green);
}

.terminal-body::-webkit-scrollbar {
    width: 6px;
}

.terminal-body::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
}

.terminal-body::-webkit-scrollbar-thumb {
    background: var(--primary-orange);
    border-radius: 3px;
}

.ascii-art {
    color: var(--primary-orange);
    font-size: 0.55rem;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.welcome-text {
    color: #888;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
}

.terminal-line {
    margin-bottom: 0.4rem;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}

.terminal-line.command {
    color: var(--primary-orange);
}

.terminal-line.output {
    color: #ccc;
}

.terminal-line.error {
    color: var(--error);
}

.terminal-line.success {
    color: var(--success);
}

.terminal-line.ai {
    color: #87CEEB;
    padding-left: 1rem;
    border-left: 2px solid #87CEEB;
    margin-left: 0.5rem;
}

.terminal-input-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.05);
    border-top: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}

.prompt {
    color: var(--primary-orange);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 0.85rem;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--terminal-green);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    outline: none;
}

.terminal-input::placeholder {
    color: #555;
}

.send-btn {
    background: var(--primary-orange);
    border: none;
    color: var(--brown);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.send-btn:hover {
    background: var(--dark-orange);
    color: white;
}

/* Typing indicator */
.typing-indicator {
    display: inline-flex;
    gap: 3px;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: #87CEEB;
    border-radius: 50%;
    animation: typing 1.4s ease-in-out infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50% { transform: translateY(-4px); opacity: 1; }
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(42, 24, 16, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 450px;
    width: 90%;
    position: relative;
    animation: modalIn 0.3s ease;
    box-shadow: var(--shadow-hover);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--light-orange);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--brown);
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--primary-orange);
    color: white;
}

.modal-title {
    font-size: 1.35rem;
    color: var(--brown);
    margin-bottom: 1.25rem;
}

.modal-product {
    background: var(--light-orange);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.modal-product-icon {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brown);
    background: white;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.modal-product-info h3 {
    font-size: 1rem;
    color: var(--brown);
    margin-bottom: 0.2rem;
}

.modal-product-info .price {
    font-size: 1.1rem;
    color: var(--dark-orange);
    font-weight: 700;
}

.payment-info {
    margin-bottom: 1.25rem;
}

.payment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.token-badge {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #FFA500 100%);
    color: var(--brown);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.9rem;
}

.wallet-status {
    background: var(--light-orange);
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--brown);
}

.wallet-status.connected {
    background: rgba(46, 204, 113, 0.1);
    color: var(--success);
}

.token-notice {
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
    border: 2px solid var(--primary-orange);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.notice-text strong {
    color: var(--dark-orange);
    font-size: 1rem;
    display: block;
    margin-bottom: 0.25rem;
}

.notice-text p {
    color: var(--brown);
    font-size: 0.85rem;
    margin: 0;
}

.purchase-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--dark-orange) 100%);
    border: none;
    color: white;
    padding: 0.875rem;
    border-radius: 8px;
    font-family: 'Fredoka', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.purchase-btn.disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--brown);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-hover);
    transition: transform 0.3s ease;
    z-index: 1100;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* Responsive */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .terminal-section {
        position: relative;
        top: 0;
        height: 500px;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }
    
    .logo {
        height: 70px;
    }
    
    .header-right {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .category-tabs {
        flex-wrap: wrap;
    }
    
    .main-content {
        padding: 1rem;
    }
}
