/* General Styles */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.footer {
    margin-top: auto;
}

/* Card Styles */
.card {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.card-img-top {
    height: auto;
    width: 100%;
}

.img-home {  
    height: 250px;
    width: 100%;
    object-fit: cover;
}

.product-img {
    height: 250px;
    width: 100%;
    object-fit: contain;
    background-color: white;
    padding: 0;
}

.specialty-img {
    height: 250px;
    width: 100%;
    object-fit: cover;
}

.category-img {
    height: 250px;
    width: 100%;
    object-fit: cover;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

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

.cart-item:hover {
    background-color: #f8f9fa;
}

/* Form Styles */
.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Button Styles */
.btn {
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-link {
    position: relative;
    color: #333;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    margin: 1px 0;
    width: 100%;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #fff;
    transition: all 0.2s;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    background-color: #e9ecef;
    color: #000;
    text-decoration: none;
}

.nav-link.active {
    background-color: #0d6efd;
    color: white;
}

/* Modal Styles */
.modal-content {
    border-radius: 0.5rem;
}

.modal-header {
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

/* Alert Styles */
.alert {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

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

/* Responsive Adjustments */
@media (max-width: 768px) {
    .card-img-top {
        height: 150px;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

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

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

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

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

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

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

/* Admin Controls */
.admin-logged-in:not(.admin) .admin-only {
    display: none;
}

.card-link + .card-link {
    margin-left: 0rem;
}

/* Sidebar styles */
.sidebar-container {
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
    min-height: calc(100vh - 56px);
}

.sidebar-content {
    position: sticky;
    top: 1rem;
    padding: 0;
}

.category-list {
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    padding: 0;
}

/* Sidebar Headers */
.sidebar-header {
    padding: 1rem 0.75rem;
    margin: 0;
    border-bottom: 1px solid #dee2e6;
    font-weight: 500;
}

.mobile-sidebar-header {
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

/* Mobile Styles */
@media (max-width: 767.98px) {
    .sidebar-container {
        border-right: none;
        border-bottom: 1px solid #dee2e6;
        min-height: auto;
    }

    .sidebar-content {
        position: static;
    }

    .category-list {
        max-height: 300px;
    }

    .nav-link {
        padding: 0.75rem 1rem;
    }
}

/* Category Cards */
.category-card {
    transition: transform 0.2s ease-in-out;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Hidden category styling */
.category-card.hidden-category {
    opacity: 0.7;
}

.category-card.hidden-category:hover {
    opacity: 0.9;
}

.category-img {
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid #dee2e6;
}

/* Product Cards */
.product-card {
    transition: transform 0.2s ease-in-out;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    margin-bottom: 1rem;
    background-color: white;
}

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

.product-card .card-body {
    padding: 1rem;
    background-color: white;
}

.product-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.product-card .card-text {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.product-card .text-danger {
    color: #dc3545 !important;
}

.product-card .text-success {
    color: #198754 !important;
}

.product-card .input-group {
    margin-top: 0.5rem;
}

.product-card .input-group-sm .form-control {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
}

.product-card .btn-sm {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .product-img {
        height: 150px;
    }
    
    .product-card .card-title {
        font-size: 1rem;
    }
    
    .product-card .card-text {
        font-size: 0.8rem;
    }
}

/* Custom Modal Sizes */
.modal-xxl {
    max-width: 90% !important;
    margin: 1.75rem auto;
}

.card-body {
    flex: 1 1 auto;
}

/* Placeholder image styles */
.placeholder-img {
    opacity: 1;
    filter: none;
    transition: opacity 0.3s ease;
    background-color: white;
}

.placeholder-img:hover {
    opacity: 1;
}

/* Product image container */
.card-img-top.product-img {
    background-color: white;
}

/* No image placeholder */
.card-img-top.product-img.d-flex {
    background-color: white;
}

/* Make card-link.nav-link look like sidebar nav-link */
.card-link.nav-link,
.card-link.nav-link:visited,
h5 .card-link.nav-link,
h5 .card-link.nav-link:visited {
  color: #333 !important;
  background: none !important;
  text-decoration: none !important;
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0;
  font-size: 0.9rem;
  transition: all 0.2s;
}
.card-link.nav-link:hover,
.card-link.nav-link:focus,
h5 .card-link.nav-link:hover,
h5 .card-link.nav-link:focus {
  background-color: #e9ecef !important;
  color: #000 !important;
  text-decoration: none !important;
}

/* Accent color for card titles */
.card-title {
  border-left: 4px solid #1976f6;
  padding-left: 0.75rem;
  font-weight: 600;
}

/* Section heading underline */
.section-heading {
  display: inline-block;
  border-bottom: 3px solid #1976f6;
  padding-bottom: 0.25rem;
  margin-bottom: 1rem;
}

/* Active nav link and primary button */
.nav-link.active, .btn-primary {
  background-color: #1976f6 !important;
  color: #fff !important;
  border-color: #1976f6 !important;
}

/* Blue link hover for nav-link and card-link.nav-link */
.nav-link:hover, .card-link.nav-link:hover {
  color: #1976f6 !important;
}

/* Fix category card titles - allow text to wrap and show full names */
.category-card .card-title .card-link.nav-link {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-wrap: break-word;
  line-height: 1.2;
  min-height: 2.4em; /* Ensure consistent height for 2 lines */
  padding: 0.5rem 0.75rem !important;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Additional fix for category card titles to ensure proper display */
.category-card .card-title {
  margin-bottom: 0;
  padding: 0;
  border-left: none; /* Remove the accent border for category cards */
}

/* Ensure category card body has proper spacing */
.category-card .card-body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 60px; /* Ensure minimum height for consistent card appearance */
} 