/* Base & Variables */
:root {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --primary-dark: #0f172a;
    --accent-blue: #2563eb;
    --accent-blue-hover: #1d4ed8;
    --secondary-teal: #0d9488;
    
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --border-light: #e2e8f0;
    --border-focus: #93c5fd;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    --radius-md: 8px;
    --radius-lg: 12px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-dark);
    font-weight: 600;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 14px;
}

.btn-primary {
    background-color: var(--accent-blue);
    color: white;
}

.btn-primary:hover {
    background-color: var(--accent-blue-hover);
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
}

/* Navigation */
.navbar {
    background-color: var(--primary-dark);
    color: white;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    flex-direction: column;
}

.logo-text {
    color: white;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-subtext {
    font-size: 12px;
    color: #cbd5e1;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.phone-link {
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.phone-link:hover {
    color: #bfdbfe;
}

.phone-link i {
    width: 18px;
    height: 18px;
}

/* Hero */
.hero-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1e293b 100%);
    color: white;
    padding: 60px 24px;
    text-align: center;
}

.hero-content h2 {
    color: white;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
}

.hero-content p {
    font-size: 18px;
    color: #cbd5e1;
    max-width: 600px;
    margin: 0 auto;
}

/* Main Layout */
.main-container {
    max-width: 1200px;
    margin: -30px auto 60px;
    padding: 0 24px;
    position: relative;
    z-index: 10;
}

/* Category Cards */
.product-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.category-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 2px solid transparent;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    opacity: 0.7;
}

.category-card.active {
    border-color: var(--accent-blue);
    opacity: 1;
}

.category-card:hover {
    transform: translateY(-2px);
    opacity: 1;
}

.category-icon {
    width: 48px;
    height: 48px;
    background: #eff6ff;
    color: var(--accent-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.category-card h3 {
    margin-bottom: 8px;
    font-size: 18px;
}

.category-card p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Config Layout */
.config-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
}

@media (max-width: 900px) {
    .config-layout {
        grid-template-columns: 1fr;
    }
}

.config-panel {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.panel-title {
    font-size: 20px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

/* Forms */
.form-group {
    margin-bottom: 28px;
}

.form-group > label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

/* Radio Buttons Group (Bay Size) */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.radio-btn {
    cursor: pointer;
}

.radio-btn input {
    display: none;
}

.radio-btn span {
    display: inline-block;
    padding: 10px 20px;
    background: var(--bg-main);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.radio-btn input:checked + span {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

/* Select */
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 15px;
    color: var(--text-primary);
    background-color: white;
    outline: none;
    transition: border-color 0.2s;
}

.form-select:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Tier Cards */
.tier-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.tier-card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.tier-card.active {
    border-color: var(--accent-blue);
    background-color: #f0fdfa; /* Slight teal tint */
}

.tier-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.badge {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    background: #e2e8f0;
    color: var(--text-secondary);
}

.smart-badge {
    background: #ccfbf1;
    color: var(--secondary-teal);
}

.tier-card p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Colors */
.color-options {
    display: flex;
    gap: 24px;
}

.color-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border-light);
    display: inline-block;
}

.black-swatch { background-color: #111; }
.white-swatch { background-color: #fff; }

.color-option input:checked + .color-swatch {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.feature-checkbox {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.feature-checkbox:hover {
    border-color: var(--border-focus);
}

.feature-checkbox input {
    margin-top: 3px;
    margin-right: 10px;
}

.feature-info {
    display: flex;
    flex-direction: column;
}

.feature-name {
    font-size: 14px;
    font-weight: 500;
}

.feature-price {
    font-size: 13px;
    color: var(--secondary-teal);
    font-weight: 600;
}

/* Toggle Switches */
.toggle-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-main);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    cursor: pointer;
}

.toggle-text strong {
    display: block;
    margin-bottom: 4px;
}

.toggle-text span {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: normal;
}

.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--accent-blue);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Quantity */
.qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.qty-btn {
    background: var(--bg-main);
    border: none;
    padding: 12px;
    cursor: pointer;
    color: var(--text-primary);
}

.qty-btn:hover {
    background: #e2e8f0;
}

.qty-btn i {
    width: 16px;
    height: 16px;
}

.qty-control input {
    width: 60px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
    padding: 12px 0;
    font-size: 16px;
    font-weight: 600;
    -moz-appearance: textfield;
}

.qty-control input::-webkit-outer-spin-button,
.qty-control input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Summary Panel */
.summary-panel {
    position: sticky;
    top: 90px;
}

.summary-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    border-top: 4px solid var(--accent-blue);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.summary-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid var(--border-light);
}

.summary-header h3 {
    font-size: 18px;
}

.summary-body {
    padding: 24px;
}

.product-info {
    margin-bottom: 24px;
}

.product-info h4 {
    font-size: 18px;
    margin-bottom: 4px;
}

.sku {
    font-family: monospace;
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 12px;
}

.product-info .desc {
    font-size: 13px;
    color: var(--text-secondary);
}

.line-items {
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    padding: 16px 0;
    margin-bottom: 16px;
}

.line-item {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 8px;
}

.line-item:last-child {
    margin-bottom: 0;
}

.subtotal-row, .quantity-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px dashed var(--border-light);
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-dark);
}

.summary-footer {
    padding: 24px;
    background: var(--bg-main);
    text-align: center;
}

.quote-help {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 12px;
}

/* Footer */
.footer {
    background: var(--primary-dark);
    color: #cbd5e1;
    padding: 48px 24px 24px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 32px;
    margin-bottom: 48px;
}

.footer-brand h2 {
    color: white;
    margin-bottom: 8px;
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.footer-contact i {
    width: 16px;
    height: 16px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    text-align: center;
    font-size: 14px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-modal {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
}

.close-modal:hover {
    color: var(--primary-dark);
}

.modal-body {
    padding: 24px;
}

#quote-textarea {
    width: 100%;
    height: 250px;
    padding: 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-family: monospace;
    font-size: 13px;
    resize: none;
    margin-bottom: 20px;
    background: var(--bg-main);
    color: var(--text-primary);
}

.modal-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.contact-prompt {
    background: #eff6ff;
    padding: 16px;
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 14px;
    color: var(--accent-blue-hover);
}
