/* ISBN Store - Main Stylesheet */

:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #e74c3c;
    --success: #27ae60;
    --warning: #f39c12;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --text: #333;
    --border: #ddd;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: #f8f9fa;
}

.navbar {
    background: var(--primary);
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.5rem;
    text-decoration: none;
}

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.8);
    margin-left: 1rem;
    transition: color 0.3s;
}

.navbar-nav .nav-link:hover {
    color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff;
    padding: 4rem 2rem;
    text-align: center;
    border-radius: 0 0 20px 20px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Product Card */
.product-card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.product-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 1rem 0;
}

.price small {
    font-size: 1rem;
    color: #666;
}

/* Cart */
.cart-section {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-total {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: right;
    padding: 1rem 0;
    border-top: 2px solid var(--primary);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--secondary);
    color: #fff;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    background: #219a52;
}

.btn-danger {
    background: var(--accent);
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary);
}

.form-control.is-invalid {
    border-color: var(--accent);
}

.invalid-feedback {
    color: var(--accent);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Dashboard */
.dashboard-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dashboard-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary);
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    background: var(--light);
    font-weight: 600;
    color: var(--primary);
}

.table tr:hover {
    background: #f8f9fa;
}

/* Checkout */
.checkout-section {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.order-summary {
    background: var(--light);
    border-radius: 8px;
    padding: 1.5rem;
}

/* Terms Page */
.legal-content {
    background: #fff;
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 2rem auto;
}

.legal-content h1 {
    color: var(--primary);
    margin-bottom: 2rem;
    font-size: 2rem;
}

.legal-content h2 {
    color: var(--primary);
    margin: 1.5rem 0 1rem;
    font-size: 1.3rem;
}

.legal-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Footer */
.footer {
    background: var(--dark);
    color: #fff;
    padding: 2rem;
    margin-top: 4rem;
    text-align: center;
}

.footer a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

.footer a:hover {
    color: #fff;
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border);
    background: #fff;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
}

.quantity-btn:hover {
    background: var(--light);
}

.quantity-input {
    width: 80px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Social Login Buttons */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-social:hover {
    background: var(--light);
}

.btn-social.google { border-color: #4285f4; color: #4285f4; }
.btn-social.apple { border-color: #000; color: #000; }
.btn-social.microsoft { border-color: #00a4ef; color: #00a4ef; }

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success { background: var(--success); color: #fff; }
.badge-warning { background: var(--warning); color: #fff; }
.badge-danger { background: var(--accent); color: #fff; }

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 1.8rem; }
    .price { font-size: 2rem; }
    .product-card { padding: 1.5rem; }
    .legal-content { padding: 1.5rem; }
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
