/**
 * Custom Styles
 *
 * Add your custom styles here.
 * Bootstrap is loaded via CDN in the header.
 */

/* ================================
   CSS Variables (Easy Customization)
   ================================ */

:root {
    --brand-primary: #0d6efd;
    --brand-secondary: #6c757d;
    --brand-accent: #ffc107;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --bg-light: #f8f9fa;
}

/* ================================
   Typography
   ================================ */

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

main {
    flex: 1;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
}

/* ================================
   Navbar
   ================================ */

.navbar {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

/* ================================
   Hero Sections
   ================================ */

.hero-section {
    background: linear-gradient(135deg, var(--brand-primary) 0%, #0056b3 100%);
    padding: 5rem 0;
}

.hero-section h1 {
    font-weight: 700;
    letter-spacing: -1px;
}

/* ================================
   Product Cards
   ================================ */

.product-card {
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.product-image {
    aspect-ratio: 1;
    object-fit: cover;
    background: var(--bg-light);
}

.product-card .card-body {
    padding: 1.25rem;
}

.product-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

.product-card .card-title a:hover {
    color: var(--brand-primary) !important;
}

/* ================================
   Cart Sidebar
   ================================ */

#cartSidebar {
    width: 380px;
}

@media (max-width: 576px) {
    #cartSidebar {
        width: 100%;
    }
}

.cart-item {
    transition: background 0.15s ease;
}

.cart-item:hover {
    background: var(--bg-light);
}

/* ================================
   Buttons
   ================================ */

.btn {
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    border-radius: 0.375rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
}

.btn-primary {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
}

.btn-primary:hover {
    background: #0b5ed7;
    border-color: #0a58ca;
}

/* ================================
   Cards
   ================================ */

.card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.card-header {
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    font-weight: 600;
}

/* ================================
   Forms
   ================================ */

.form-control:focus,
.form-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* ================================
   Category Navigation
   ================================ */

.list-group-item.active {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.nav-pills .nav-link {
    border-radius: 2rem;
    padding: 0.5rem 1.25rem;
    color: var(--text-dark);
}

.nav-pills .nav-link.active {
    background-color: var(--brand-primary);
}

/* ================================
   Thumbnails
   ================================ */

.thumbnail-image {
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 0.375rem;
    opacity: 0.7;
    transition: opacity 0.2s ease, border-color 0.2s ease;
    border: 2px solid transparent;
}

.thumbnail-image:hover {
    opacity: 1;
    border-color: var(--brand-primary);
}

/* ================================
   Footer
   ================================ */

footer {
    background: #1a1a2e !important;
}

footer a:hover {
    color: white !important;
}

/* ================================
   Alerts
   ================================ */

.alert {
    border: none;
    border-radius: 0.5rem;
}

/* ================================
   Tables
   ================================ */

.table td {
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.04);
}

/* ================================
   Badges
   ================================ */

.badge {
    font-weight: 500;
    padding: 0.4em 0.65em;
}

/* ================================
   Utilities
   ================================ */

.cursor-pointer {
    cursor: pointer;
}

.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

/* ================================
   Page Sections (Marketing Style)
   ================================ */

section {
    position: relative;
}

.section-heading {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subheading {
    color: var(--text-muted);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* ================================
   Responsive Adjustments
   ================================ */

@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .product-card .card-title {
        font-size: 0.9rem;
    }
}

/* ================================
   Variant Selection Buttons
   ================================ */

.option-btn {
    min-width: 60px;
    transition: all 0.2s;
}

.option-btn:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.option-btn.active {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    color: white;
}

.option-btn.active:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    color: white;
}

/* ================================
   Quantity Input Group
   ================================ */

.input-group .qty-btn {
    border-color: #dee2e6;
}

.input-group .qty-btn:hover {
    background-color: var(--bg-light);
}

.input-group input[type="number"]::-webkit-inner-spin-button,
.input-group input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-group input[type="number"] {
    -moz-appearance: textfield;
}

/* ================================
   Toast Notifications
   ================================ */

#toast-container {
    z-index: 1100;
}

.toast {
    min-width: 280px;
}

/* ================================
   Checkout Styles
   ================================ */

.checkout-items {
    max-height: 300px;
    overflow-y: auto;
}

.checkout-item-image {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* ================================
   Search
   ================================ */

#search-form .form-control:focus {
    box-shadow: none;
    border-color: var(--brand-primary);
}

#search-form .form-control {
    border-right: none;
}

#search-form .btn {
    border-left: none;
    border-color: #dee2e6;
}

#search-form .form-control:focus + .btn,
#search-form .btn:focus {
    border-color: var(--brand-primary);
}

/* ================================
   Animations
   ================================ */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in {
    animation: slideInRight 0.3s ease-out;
}
