/**
 * Custom Styles for Banguyolo Services eCommerce
 * 
 * This file contains custom CSS to complement Bootstrap.
 */

/* ============================================
   Global Styles
   ============================================ */

:root {
    --primary-color: #212529; /* Dark grey/black */
    --accent-color: #007bff; /* Electric blue - Bootstrap primary */
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --light-bg: #f8f9fa;
    --dark-bg: #212529;
    --text-dark: #212529;
    --text-muted: #6c757d;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* ============================================
   Product Cards
   ============================================ */

.product-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.product-image {
    height: 250px;
    object-fit: cover;
    width: 100%;
}

.product-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
}

.product-stock {
    font-size: 0.9rem;
}

.stock-low {
    color: var(--warning-color);
}

.stock-out {
    color: var(--danger-color);
}

/* ============================================
   Cart Styles
   ============================================ */

.cart-item {
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 0;
    transition: background-color 0.2s ease;
}

.cart-item:hover {
    background-color: #f8f9fa;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-summary {
    background-color: var(--light-bg);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.quantity-input {
    width: 80px;
    text-align: center;
}

/* Checkout Form Styles */
.form-control.is-invalid {
    border-color: var(--danger-color);
}

.form-control.is-invalid:focus {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* ============================================
   Form Styles
   ============================================ */

.form-label.required::after {
    content: " *";
    color: var(--danger-color);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Hero Section */
.bg-primary {
    background: linear-gradient(135deg, var(--accent-color) 0%, #0056b3 100%) !important;
}

/* Navigation Enhancements */
.navbar-dark {
    background-color: var(--dark-bg) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

.nav-link.active {
    font-weight: 500;
}

/* Card Enhancements */
.card {
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--accent-color);
}

/* Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0;
}

.breadcrumb-item a {
    color: var(--accent-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* ============================================
   Button Styles
   ============================================ */

.btn-primary {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    font-weight: 500;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.btn-outline-primary {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.btn-outline-primary:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-1px);
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

/* ============================================
   Alert Styles
   ============================================ */

.alert {
    border-radius: 0.5rem;
}

.alert-dismissible .btn-close {
    padding: 0.75rem 1rem;
}

/* ============================================
   Loading Spinner
   ============================================ */

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (max-width: 768px) {
    .product-image {
        height: 200px;
    }
    
    .product-price {
        font-size: 1.25rem;
    }
    
    .cart-summary {
        margin-top: 1.5rem;
    }
}

/* ============================================
   Utility Classes
   ============================================ */

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shadow-sm-hover:hover {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

