/* Custom styles for the e-commerce front-end */
/* Design tokens matching the product page for a cohesive look */
:root {
    --primary-color: #d32f2f;
    --primary-dark: #b71c1c;
    --secondary-bg: #f3f5f9;
    --text-dark: #1e293b;
    --text-gray: #64748b;
    --success-color: #10b981;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-hover: 0 10px 25px rgba(211, 47, 47, 0.15);
}

/* Base typography and colours */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--secondary-bg);
    color: var(--text-dark);
}

/* Navbar styling */
/* Navbar styling aligned with product page */
.navbar {
    background-color: white;
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
}
.navbar-brand,
.nav-link {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--text-dark);
}
.navbar-brand span {
    color: var(--primary-color);
}
.nav-link.active, .nav-link:hover {
    color: var(--primary-color);
}

/* Cards */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: transform 0.15s ease-in-out;
}
.card:hover {
    transform: translateY(-4px);
}
.card-img-top {
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
    object-fit: cover;
    max-height: 220px;
}
.card-title {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Buttons */
/* Primary buttons share the red theme */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Category list styling */
.list-group-item {
    border: none;
    border-left: 3px solid transparent;
    border-radius: 0;
    margin-bottom: 0.25rem;
    padding: 0.5rem 1rem;
}
.list-group-item a {
    text-decoration: none;
    color: var(--text-dark);
    display: block;
    width: 100%;
}
/* Active category list item uses the red accent */
.list-group-item.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}
.list-group-item.active a {
    color: #fff;
}

/* Search dropdown */
.search-dropdown {
    position: absolute;
    background: #fff;
    border: 1px solid #ccc;
    width: 100%;
    z-index: 1000;
    display: none;
    border-radius: 0.25rem;
    overflow: hidden;
}
.search-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.search-dropdown li {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
}
.search-dropdown li:hover {
    background: #f1f3f5;
}

/* Breadcrumbs spacing */
.breadcrumb {
    background-color: transparent;
    padding-left: 0;
}

/* Footer (optional) */
footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
    color: #6c757d;
    font-size: 0.875rem;
}

/* Override Bootstraps default active states on pagination */
/* Pagination styling matches primary colour */
.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}
.pagination .page-link {
    color: var(--primary-color);
}

/* Headings use Poppins to match product page */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

/* Hero sections for home and categories */
/* Hero section styling uses secondary background and subtle shadow */
.home-hero {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 4rem 1rem;
}
.home-hero h1 {
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}
.category-hero {
    background: white;
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-sm);
    font-family: 'Poppins', sans-serif;
}

/* Search container styling similar to the product page */
.search-container {
    position: relative;
}
.search-input {
    border-radius: 50px;
    background: var(--secondary-bg);
    border: none;
    padding: 12px 20px;
    padding-right: 50px;
}
.search-input:focus {
    background: white;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}
.search-btn {
    position: absolute;
    right: 5px;
    top: 5px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

/* Category navigation bar styling */
.category-nav .nav-link {
    color: var(--text-dark);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    margin-right: 20px;
    border-bottom: 3px solid transparent;
    padding-bottom: 15px;
}
.category-nav .nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}