/* Professional Restaurant Supply - Custom Styles */

:root {
    --primary-color: #dc3545;
    --navbar-color: #dc3545;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --body-font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --border-radius: 0.375rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

/* General Styles */
body {
    font-family: var(--body-font-family);
    line-height: 1.6;
    background-color: #ffffff;
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

/* Site Header - Equippers Style */
.site-header {
    background-color: #1a1f2e;
}

.header-top-bar {
    background-color: #1a1f2e;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-logo img {
    height: 100px;
    width: auto;
}

.header-phone {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.15s;
}

.header-phone:hover {
    color: #FF5758;
}

.header-phone i {
    color: #FF5758;
}

.header-search {
    flex: 0 1 400px;
    position: relative;
}

.header-search input {
    width: 100%;
    padding: 8px 45px 8px 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    background-color: #ffffff;
}

.header-search input:focus {
    outline: 2px solid #FF5758;
}

.header-search button {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    border: none;
    background-color: #FF5758;
    color: #ffffff;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.15s;
}

.header-search button:hover {
    background-color: #E64546;
}

.header-login-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.header-login-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.8rem;
    white-space: nowrap;
    transition: color 0.15s;
}

.header-login-link:hover {
    color: #FF5758;
}

.header-admin-link {
    color: #ffffff;
    font-size: 1rem;
    transition: color 0.15s;
}

.header-admin-link:hover {
    color: #FF5758;
}

.header-cart {
    position: relative;
    color: #ffffff;
    font-size: 1.25rem;
    text-decoration: none;
    transition: color 0.15s;
}

.header-cart:hover {
    color: #FF5758;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: #FF5758;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Navigation Bar */
.header-nav {
    background-color: #2d3447;
}

.header-nav-menu {
    display: flex;
    gap: 0;
}

.header-nav-menu .nav-item {
    position: relative;
}

.header-nav-menu .nav-link {
    display: block;
    padding: 10px 16px;
    color: #ffffff !important;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
}

.header-nav-menu .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #FF5758 !important;
}

.header-nav-menu .dropdown-menu {
    background-color: #2d3447;
    border: none;
    border-radius: 0 0 4px 4px;
    margin-top: 0;
    min-width: 200px;
}

.header-nav-menu .dropdown-item {
    color: #ffffff;
    padding: 8px 16px;
    font-size: 0.85rem;
}

.header-nav-menu .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #FF5758;
}

/* Partner Banner */
.partner-banner {
    background-color: #d4a934;
    color: #1a1f2e;
    padding: 8px 0;
    font-size: 0.9rem;
}

.partner-banner-text {
    color: #1a1f2e;
}

.partner-banner-text strong {
    font-weight: 600;
}

.partner-banner-link {
    color: #1a1f2e;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}

.partner-banner-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

@media (max-width: 767.98px) {
    .partner-banner {
        font-size: 0.8rem;
        padding: 10px 0;
    }
    
    .partner-banner .d-flex {
        flex-direction: column;
        gap: 5px;
    }
    
    .partner-banner-link {
        margin-left: 0 !important;
    }
}

/* Mobile styles */
@media (max-width: 991.98px) {
    .header-search {
        display: none !important;
    }
    
    .header-nav-menu {
        flex-direction: column;
        padding: 10px 0;
    }
    
    .header-nav-menu .nav-link {
        padding: 12px 16px;
    }
}

/* Legacy navbar override - hide old styles */
.navbar {
    padding-top: 0rem;
    padding-bottom: 0rem;
    min-height: auto;
}

/* Category Filter Hover Effect */
.category-filter-hover {
    transition: all 0.2s ease-in-out;
    border: 1px solid #dee2e6;
}

.category-filter-hover:hover {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0.25rem 0.75rem rgba(255, 87, 88, 0.15);
    transform: translateY(-2px);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.15s ease-in-out;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--box-shadow-lg);
    border-radius: var(--border-radius);
}

.dropdown-item {
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.dropdown-item:hover {
    background-color: var(--light-color);
}

/* Main Navigation - White Background */
.navbar-light .navbar-nav .nav-link {
    color: var(--dark-color);
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

.navbar-light .navbar-nav .nav-link:hover {
    color: var(--primary-color);
    background-color: var(--light-color);
}

/* Cart and User Icons - Dark on White */
.navbar-light .navbar-nav .nav-link {
    color: #333333 !important;
}

.navbar-light .navbar-nav .nav-link:hover {
    color: #FF5758 !important;
}

/* Hero Section */
.hero-section {
    background-image: linear-gradient(135deg, rgb(227 223 223) 0%, rgb(221 212 212) 100%);
    background-position-x: initial;
    background-position-y: initial;
    background-size: initial;
    background-repeat: initial;
    background-attachment: initial;
    background-origin: initial;
    background-clip: initial;
    background-color: initial;
    position: relative;
    overflow: hidden;
}

/* Trust Indicators Section */
.trust-indicators-section {
    background-color: var(--primary-color);
    color: #ffffff;
}

.trust-indicators-section .text-primary {
    color: #ffffff !important;
}

.trust-indicators-section strong {
    color: #ffffff;
}

.trust-indicators-section .text-muted {
    color: #e8f4fd !important;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="white" stroke-width="0.1" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    pointer-events: none;
}

/* Cards */
.card {
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: var(--border-radius);
    transition: all 0.15s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-lg);
}

.category-hover:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.product-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Product Cards */
.product-card {
    height: 100%;
    transition: all 0.3s ease;
}

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

.product-image {
    height: 200px;
    overflow: hidden;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

/* Category Cards */
.category-card {
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-card .card-img-top {
    position: relative;
    overflow: hidden;
}

.category-card .card-img-top img {
    transition: transform 0.3s ease;
}

.category-card:hover .card-img-top img {
    transform: scale(1.1);
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: all 0.15s ease-in-out;
}

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

.btn-primary:hover {
    background-color: #E64546;
    border-color: #D63D3E;
    transform: translateY(-1px);
}

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

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* Forms */
.form-control {
    border-radius: var(--border-radius);
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

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

.form-select {
    border-radius: var(--border-radius);
}

/* Alerts */
.alert {
    border-radius: var(--border-radius);
    border: none;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    color: #842029;
}

.alert-warning {
    background-color: #fff3cd;
    color: #664d03;
}

.alert-info {
    background-color: #d1ecf1;
    color: #055160;
}

/* Badges */
.badge {
    font-weight: 500;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    border-top: none;
    padding: 0.75rem;
}

.table td {
    padding: 0.75rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.025);
}

/* Admin Navbar */
.admin-navbar {
    background-color: #FF5758 !important;
}

.admin-navbar .navbar-brand {
    color: #ffffff !important;
}

.admin-navbar .navbar-nav .nav-link {
    color: #ffffff !important;
    transition: all 0.15s ease-in-out;
}

.admin-navbar .navbar-nav .nav-link:hover {
    color: #d4edda !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-radius: 0.25rem;
}

/* Footer */
footer {
    margin-top: auto;
}

footer .social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

footer .social-links a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.trust-badges img {
    height: 40px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.trust-badges img:hover {
    opacity: 1;
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-color);
    border-color: #dee2e6;
    font-weight: 500;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.pagination .page-link:hover {
    color: #E64546;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

/* Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Cart Item Styles */
.cart-item {
    transition: background-color 0.15s ease;
}

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

/* Price Display */
.price-display {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Search Results */
.search-highlight {
    background-color: #fff3cd;
    padding: 0.1em 0.2em;
    border-radius: 0.25rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .category-card,
    .product-card {
        margin-bottom: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .btn-lg {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }
    
    .display-4 {
        font-size: 1.75rem;
    }
}

/* Utility Classes */
.text-decoration-none {
    text-decoration: none !important;
}

.object-fit-cover {
    object-fit: cover;
}

.shadow-sm {
    box-shadow: var(--box-shadow) !important;
}

.shadow-lg {
    box-shadow: var(--box-shadow-lg) !important;
}

.rounded {
    border-radius: var(--border-radius) !important;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
