/**
 * Dravixx Peptides - Base Styles
 * Dark theme with silver/blue accent (matches logo)
 */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #1a1a2e;
    --bg-card: rgba(255, 255, 255, 0.03);

    --text-primary: #e5e5e5;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent: #2563eb;
    --accent-blue: #3b82f6;
    --accent-purple: #7c3aed;

    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;

    --border: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.1);

    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-blue) 100%);
    color: var(--bg-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 212, 170, 0.3);
}

.btn-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--accent);
}

/* Form Elements */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: var(--accent);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.card:hover {
    border-color: rgba(0, 212, 170, 0.3);
}

/* Grid Background Effect */
.grid-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        linear-gradient(rgba(0, 212, 170, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 170, 0.015) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: -1;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading Spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cart-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--text-primary);
    text-decoration: none;
}

.cart-btn svg {
    width: 24px;
    height: 24px;
}

.cart-count {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 11px;
    font-weight: 600;
    color: var(--bg-primary);
    background: var(--accent);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Content */
.main {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    padding-bottom: 100px;
}

/* Page Header */
.page-header {
    margin-bottom: 24px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
    text-decoration: none;
}

.back-link:hover {
    color: var(--accent);
    text-decoration: none;
}

/* Cart Items */
.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.cart-empty svg {
    opacity: 0.4;
    margin-bottom: 16px;
}

.cart-empty p {
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.cart-item-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-weight: 600;
    color: var(--text-muted);
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 2px;
}

.cart-item-variant {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.cart-item-price {
    color: var(--accent);
    font-weight: 600;
    margin-top: 4px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 4px;
}

.cart-item-qty button {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
}

.cart-item-qty button:hover {
    color: var(--accent);
}

.cart-item-qty span {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
}

.cart-item-remove {
    font-size: 0.85rem;
    color: var(--error);
    cursor: pointer;
}

.cart-item-remove:hover {
    text-decoration: underline;
}

/* Cart Summary */
.cart-summary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-top: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: var(--text-secondary);
}

.summary-row.total {
    border-top: 1px solid var(--border);
    margin-top: 8px;
    padding-top: 16px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
}

.summary-row.total .value {
    color: var(--accent);
}

/* Checkout Section */
.checkout-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

.checkout-section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Button Sizes */
.btn-lg {
    padding: 16px 32px;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-weight: 500;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    border-color: var(--success);
}

.toast.error {
    border-color: var(--error);
}

/* FDA Disclaimer Footer */
.fda-disclaimer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 40px 20px;
    margin-top: 40px;
}

.fda-disclaimer-content {
    max-width: 800px;
    margin: 0 auto;
}

.fda-disclaimer h4 {
    color: var(--warning);
    margin-bottom: 16px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fda-disclaimer p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.6;
}

.fda-disclaimer .highlight {
    color: var(--error);
    font-weight: 600;
}

.fda-disclaimer .copyright {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Local Delivery Option */
.local-delivery-box {
    background: rgba(0, 212, 170, 0.1);
    border: 1px solid rgba(0, 212, 170, 0.3);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-top: 16px;
}

.local-delivery-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
}

.local-delivery-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent);
}

.local-delivery-note {
    margin: 8px 0 0 30px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Payment Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--warning);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.modal-body {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.modal-body p {
    margin-bottom: 12px;
}

.modal-body strong {
    color: var(--text-primary);
}

.modal-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 20px 0;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.modal-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--accent);
    flex-shrink: 0;
}

.modal-checkbox span {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.modal-actions .btn {
    flex: 1;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Payment Section */
.payment-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}

.payment-amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    margin: 16px 0;
}

.payment-order-number {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.payment-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.payment-btn.cashapp {
    background: #00d632;
    color: #000;
}

.payment-btn.venmo {
    background: #3d95ce;
    color: #fff;
}

.payment-btn.creditcard {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.payment-note {
    margin-top: 20px;
    padding: 16px;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: left;
}

.payment-note strong {
    color: var(--warning);
}
