@import url('base.css');

/* --- HOME PAGE --- */
.hero-section {
    padding: var(--spacing-lg) var(--spacing-sm);
    text-align: center;
    margin-bottom: var(--spacing-lg);
    background: linear-gradient(180deg, rgba(31, 40, 51, 0.3) 0%, rgba(11, 12, 16, 0) 100%);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: ''; position: absolute; top: -50%; left: 50%; transform: translateX(-50%); width: 60%; height: 200%; background: radial-gradient(circle, rgba(102, 252, 241, 0.05) 0%, transparent 70%); z-index: -1; pointer-events: none;
}
.hero-title {
    font-size: 3rem;
    margin-bottom: var(--spacing-xs);
    background: linear-gradient(to right, #fff, var(--text-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}
@media (max-width: 768px) { .hero-title { font-size: 2rem; } }
.hero-subtitle { color: var(--text-bright); font-size: 1.25rem; font-weight: 300; margin-bottom: var(--spacing-sm); letter-spacing: 0.05em; text-transform: uppercase; }
.hero-text { max-width: 700px; margin: 0 auto var(--spacing-md); color: var(--text-muted); font-size: 1.1rem; }

.section-title {
    text-align: center; font-size: 2rem; margin-bottom: var(--spacing-md); position: relative; display: inline-block; left: 50%; transform: translateX(-50%);
}
.section-title::after {
    content: ''; display: block; width: 60px; height: 3px; background: var(--action-color); margin: 8px auto 0; box-shadow: 0 0 10px var(--action-color);
}

.service-banner {
    margin-top: var(--spacing-lg); padding: var(--spacing-lg); background: var(--bg-surface); border-radius: var(--radius-lg); position: relative; overflow: hidden; text-align: center; border: 1px solid rgba(188, 19, 254, 0.3);
}
.service-banner::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--brand-gradient); box-shadow: 0 0 20px rgba(188, 19, 254, 0.5);
}
.service-banner h3 { color: #fff; font-size: 2.5rem; }
.service-banner p { max-width: 600px; margin: 0 auto var(--spacing-md); color: var(--text-primary); }

/* --- PRODUCT CATALOG (List View) --- */
.catalog-header { margin-bottom: var(--spacing-md); text-align: center; }
.filter-bar { display: flex; justify-content: center; flex-wrap: wrap; gap: var(--spacing-xs); margin-bottom: var(--spacing-md); }
.search-container { max-width: 600px; margin: 0 auto var(--spacing-lg); }
.search-form { display: flex; gap: var(--spacing-xs); }

.grid-responsive {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--spacing-md); width: 100%;
}
.grid-dense { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.empty-state-text { font-size: 1.2rem; margin-bottom: 1rem; }

.product-card {
    background: rgba(21, 25, 34, 0.7); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: var(--radius-md); overflow: hidden; position: relative; transition: all 0.3s var(--ease-smooth); display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-8px); box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.5); border-color: rgba(102, 252, 241, 0.2); }
.product-image-frame { width: 100%; aspect-ratio: 4/3; overflow: hidden; position: relative; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.product-image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-elastic); }
.product-card:hover .product-image { transform: scale(1.1); }
.product-info { padding: var(--spacing-sm); flex-grow: 1; display: flex; flex-direction: column; }
.product-title { font-size: 1.25rem; color: #fff; margin-bottom: var(--spacing-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-desc { color: var(--text-muted); font-size: 0.9rem; margin-bottom: var(--spacing-sm); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex-grow: 1; }
.product-link { color: var(--text-bright); font-size: 0.9rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; align-self: flex-start; display: flex; align-items: center; gap: 8px; }
.product-link:hover { color: #fff; text-shadow: 0 0 8px var(--text-bright); }

/* --- PRODUCT DETAIL / 3D CONFIGURATOR --- */
.container-fluid {
    max-width: 1800px;
    width: 95%;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}
.product-detail-container { 
    display: grid; 
    grid-template-columns: 1fr 350px; 
    gap: var(--spacing-lg); 
    align-items: start; 
}
@media (max-width: 900px) { .product-detail-container { grid-template-columns: 1fr; } }

.viewer-container {
    background: radial-gradient(circle at center, #1f2833 0%, #0b0c10 100%); 
    border: 1px solid rgba(255, 255, 255, 0.05); 
    border-radius: var(--radius-lg); 
    position: relative; 
    overflow: hidden; 
    width: 100%; 
    aspect-ratio: 16 / 9;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5);
}
#3d-viewer { width: 100%; height: 100%; display: block; outline: none; }
.viewer-hint { margin-top: 10px; color: var(--text-muted); font-size: 0.8rem; text-align: center; }
.hint-key { color: var(--text-bright); font-weight: 600; }

.config-panel {
    background: rgba(21, 25, 34, 0.8); backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: var(--radius-lg); padding: var(--spacing-md); display: flex; flex-direction: column; gap: var(--spacing-sm); height: fit-content; position: sticky; top: 100px;
}
.product-header h1 { font-size: 2rem; line-height: 1.1; margin-bottom: var(--spacing-xs); text-shadow: none; }
.detail-description { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1rem; line-height: 1.5; }
.price-tag { font-size: 2rem; font-weight: 700; color: var(--action-color); text-shadow: 0 0 15px rgba(255, 102, 0, 0.4); margin-bottom: var(--spacing-sm); display: block; }
.config-action-group { display: flex; gap: 10px; }
.config-qty-col { width: 80px; }
.config-add-col { flex-grow: 1; }

.palette-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.color-swatch { width: 32px; height: 32px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; transition: transform 0.2s var(--ease-elastic); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); }
.color-swatch:hover { transform: scale(1.2); z-index: 2; }
.color-swatch.active { border-color: #fff; box-shadow: 0 0 0 2px var(--action-color); transform: scale(1.1); }

/* --- PARTS LIST UPDATED --- */
.parts-list-container { 
    /* Removed max-height and overflow-y to ensure all parts are visible without scrolling */
    background: rgba(0, 0, 0, 0.2); 
    border-radius: var(--radius-sm); 
    padding: var(--spacing-xs); 
    border: 1px solid rgba(255, 255, 255, 0.05); 
}
.part-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-radius: 4px; cursor: pointer; transition: background 0.2s; border-bottom: 1px solid rgba(255, 255, 255, 0.02); }
.part-item:hover { background: rgba(102, 252, 241, 0.1); }
.part-name { font-size: 0.9rem; color: var(--text-primary); }
.part-color-indicator { width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.2); box-shadow: 0 0 5px rgba(0, 0, 0, 0.5); }

/* --- CART PAGE --- */
.cart-container { display: grid; grid-template-columns: 1fr 350px; gap: var(--spacing-md); margin-top: var(--spacing-md); align-items: start; }
@media (max-width: 900px) { .cart-container { grid-template-columns: 1fr; } }
.cart-header { margin-bottom: var(--spacing-md); border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding-bottom: var(--spacing-sm); display: flex; justify-content: space-between; align-items: flex-end; }
.cart-title { font-size: 2rem; margin: 0; color: #fff; }
.cart-count { color: var(--brand-accent); font-family: monospace; font-size: 1.2rem; }
.cart-items-list { display: flex; flex-direction: column; gap: var(--spacing-sm); }
.cart-item-card { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: var(--radius-sm); padding: 15px; display: flex; gap: 20px; transition: background 0.2s; }
.cart-item-card:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.1); }
.item-thumb { width: 100px; height: 100px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid rgba(255, 255, 255, 0.1); background: #000; }
.item-details { flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; }
.item-name { font-size: 1.1rem; font-weight: 700; color: #fff; text-decoration: none; }
.item-name:hover { color: var(--text-bright); }
.item-config { margin-top: 8px; background: rgba(0, 0, 0, 0.3); padding: 8px 12px; border-radius: var(--radius-sm); border-left: 2px solid var(--brand-accent); font-family: 'Courier New', monospace; }
.config-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; display: block; }
.config-data { font-size: 0.85rem; color: var(--text-bright); line-height: 1.4; }
.item-controls { display: flex; align-items: center; justify-content: space-between; margin-top: 15px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.item-price { font-size: 1.1rem; font-weight: 600; color: var(--text-bright); text-align: right; }

.config-material { font-weight: 600; color: #fff; margin-bottom: 4px; }
.config-part { padding-left: 10px; color: var(--text-muted); font-size: 0.8rem; }
.qty-wrapper { display: flex; align-items: center; gap: 10px; }
.qty-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; }
.qty-input { width: 60px; text-align: center; padding: 6px; }
.item-remove-wrapper { text-align: right; margin-top: 5px; }
.inline-form { display: inline; }

.summary-title { margin-bottom: 20px; color: #fff; text-transform: uppercase; letter-spacing: 0.05em; font-size: 1.1rem; }
.text-success { color: var(--status-success) !important; }
.summary-actions { margin-top: 25px; }
.btn-block { display: block; text-align: center; width: 100%; }
.secure-badge { margin-top: 20px; text-align: center; font-size: 0.75rem; color: var(--text-muted); display: flex; align-items: center; justify-content: center; gap: 8px; }

/* --- CHECKOUT PAGE --- */
.checkout-title { margin-bottom: var(--spacing-md); color: #fff; }
.checkout-container { display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--spacing-lg); margin-top: var(--spacing-md); }
@media (max-width: 900px) { .checkout-container { grid-template-columns: 1fr; } }
.form-section { background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: var(--radius-md); padding: var(--spacing-md); margin-bottom: var(--spacing-md); }
.section-title-sm { font-size: 1.2rem; color: #fff; margin-bottom: var(--spacing-md); padding-bottom: 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); text-transform: uppercase; letter-spacing: 0.05em; }
.checkbox-label { margin: 0; color: #fff; cursor: pointer; font-size: 0.95rem; }
.btn-checkout-submit { width: 100%; font-size: 1.1rem; padding: 15px; }

.summary-items-scroll { max-height: 300px; overflow-y: auto; margin-bottom: 20px; padding-right: 5px; }
.summary-item { display: flex; justify-content: space-between; margin-bottom: 15px; font-size: 0.9rem; border-bottom: 1px solid rgba(255, 255, 255, 0.05); padding-bottom: 15px; }
.summary-item-info { display: flex; gap: 10px; }
.summary-item-thumb { width: 50px; height: 50px; border-radius: 4px; border: 1px solid rgba(255,255,255,0.1); object-fit: cover; }
.summary-item-name { font-weight: 600; color: #fff; }
.summary-item-qty { color: var(--text-muted); font-size: 0.8rem; }
.summary-item-price { font-weight: 600; color: var(--text-bright); }
.total-value { color: var(--action-color); }
.discount-group { display: flex; gap: 5px; margin-top: 20px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.05); }
.btn-apply { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.1); color: #fff; border-radius: var(--radius-sm); cursor: pointer; padding: 0 15px; transition: all 0.2s; font-weight: bold; }
.btn-apply:hover { background: rgba(255,255,255,0.2); }
.discount-input { padding: 8px; flex-grow: 1; }

/* --- ORDER CONFIRMATION --- */
.confirmation-container { max-width: 600px; margin: 6rem auto; text-align: center; }
.confirmation-card { padding: 50px 40px; }
.success-icon {
    color: var(--status-success); width: 80px; height: 80px; margin-bottom: var(--spacing-md); filter: drop-shadow(0 0 15px rgba(16, 185, 129, 0.4)); animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes scaleIn { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.confirmation-title { color: #fff; margin-bottom: 10px; font-size: 2.5rem; }
.order-id-wrapper { margin: 30px 0; }
.order-id-label { color: var(--text-muted); text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.1em; margin-bottom: 5px; display: block; }
.order-id-box { 
    background: rgba(0,0,0,0.4); border: 1px solid rgba(102, 252, 241, 0.3); padding: 15px; margin: 20px auto; border-radius: var(--radius-sm); font-family: 'Courier New', monospace; font-size: 1.4rem; color: var(--text-bright); letter-spacing: 0.05em; display: inline-block; min-width: 200px; box-shadow: 0 0 20px rgba(102, 252, 241, 0.1); 
}
.message-text { color: var(--text-primary); font-size: 1.1rem; margin-bottom: 30px; line-height: 1.6; }
.action-row { margin-top: 40px; display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }

/* --- PAYMENT PAGE --- */
.payment-instruction { color: var(--text-muted); margin-bottom: 25px; font-size: 0.95rem; line-height: 1.5; }
#payment-element { min-height: 200px; margin-bottom: 20px; }
.stripe-message { margin-top: 20px; text-align: center; justify-content: center; }
.mt-md { margin-top: 30px; }
.qty-badge { color: var(--text-muted); font-size: 0.85em; margin-left: 5px; }
.price-bold { color: var(--text-bright); font-weight: 600; }

/* --- LEGAL & TEXT DOCUMENTS --- */
.legal-container { max-width: 900px; margin: 4rem auto; padding: var(--spacing-lg); }
.legal-header { border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding-bottom: var(--spacing-md); margin-bottom: var(--spacing-md); }
.legal-title { font-size: 2.5rem; color: #fff; margin-bottom: 0.5rem; }
.last-updated { color: var(--brand-accent); font-family: 'Courier New', monospace; font-size: 0.9rem; text-transform: uppercase; }
.legal-content { color: var(--text-primary); line-height: 1.8; font-size: 1rem; }
.legal-content h3 { color: #fff; font-size: 1.5rem; margin-top: 2.5rem; margin-bottom: 1rem; padding-left: 1rem; border-left: 3px solid var(--action-color); }
.legal-content p { margin-bottom: 1.5rem; }
.legal-content ul { list-style: none; padding-left: 1.5rem; margin-bottom: 1.5rem; }
.legal-content li { margin-bottom: 0.8rem; position: relative; }
.legal-content li::before { content: '>'; color: var(--text-bright); position: absolute; left: -1.2rem; font-weight: bold; }
.legal-content strong { color: #fff; }

/* --- ORDER LOOKUP --- */
.lookup-header-icon { color: var(--brand-accent); width: 48px; height: 48px; margin: 0 auto 15px auto; filter: drop-shadow(0 0 10px rgba(102, 252, 241, 0.4)); }
.instruction-text { text-align: center; color: var(--text-muted); font-size: 0.9rem; margin-top: 2rem; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 1.5rem; }

/* --- ORDER DETAIL / RECEIPT --- */
.receipt-wrapper { max-width: 800px; margin: 4rem auto; }
.receipt-glass { padding: 40px; }
.receipt-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
@media (max-width: 600px) {
    .receipt-header { flex-direction: column; gap: 1rem; }
    .header-right { text-align: left !important; }
}
.order-label { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 4px; display: block; }
.order-id { font-family: 'Courier New', monospace; color: var(--text-bright); font-size: 1.8rem; text-shadow: 0 0 15px rgba(102, 252, 241, 0.3); margin-bottom: 0.5rem; }
.order-date { color: var(--text-muted); font-size: 0.9rem; }
.header-right { text-align: right; }
.order-total { font-size: 2rem; font-weight: 700; color: #fff; margin-bottom: 0.5rem; line-height: 1; }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing-md); margin-bottom: 3rem; }
@media (max-width: 600px) { .info-grid { grid-template-columns: 1fr; } }
.info-panel { background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.05); padding: 20px; border-radius: var(--radius-sm); }
.info-title { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; font-weight: 600; border-bottom: 1px solid rgba(255, 255, 255, 0.05); padding-bottom: 8px; }
.info-data { color: var(--text-primary); font-size: 0.95rem; line-height: 1.6; }
.info-data strong { color: #fff; }

.items-section-title { font-size: 1.2rem; color: #fff; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.05em; }
.items-list-container { display: flex; flex-direction: column; gap: 15px; }
.item-card { background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: var(--radius-sm); padding: 20px; margin-bottom: 15px; }
.item-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.item-name { font-weight: 700; color: #fff; font-size: 1.2rem; margin-bottom: 4px; }
.item-meta { color: var(--text-muted); font-size: 0.9rem; }
.item-price { font-weight: 600; color: #fff; font-size: 1.1rem; }
.item-parts { margin-top: 15px; padding-top: 15px; border-top: 1px dashed rgba(255, 255, 255, 0.1); background: rgba(0, 0, 0, 0.2); padding: 15px; border-radius: var(--radius-sm); border-left: 2px solid var(--brand-accent); }
.part-title { font-size: 0.75rem; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.05em; margin-bottom: 8px; font-weight: 700; }
.part-line { display: flex; margin-bottom: 6px; font-size: 0.9rem; font-family: 'Courier New', monospace; }
.part-label { color: var(--text-muted); width: 150px; }
.part-val { color: var(--text-bright); }