/* ==========================================================================
   Abigail's British Foods — Consumer Site
   ========================================================================== */

:root {
    --primary: #1a365d;
    --union-blue: #012169;
    --union-red: #c8102e;
    --bg: #f8f9fa;
    --bg-warm: #faf9f7;
    --text: #2d3748;
    --text-dark: #333;
    --border: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg);
}

/* ---------- Main site header ---------- */
header.site-header {
    background: linear-gradient(to right, #c8102e, #ffffff, #00247d);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo img {
    height: 60px;
    width: auto;
}

.logo h1 {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-link {
    position: relative;
    color: white;
    text-decoration: none;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #c8102e;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

.lang-switcher select {
    padding: 0.25rem;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* ---------- Main content ---------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/images/hero-bg.jpg') center/cover;
    color: white;
    text-align: center;
    padding: 4rem 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    color: #c8102e;
    font-size: 2rem;
}

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

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-info {
    padding: 1rem;
}

.product-name {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #333;
}

.product-price {
    color: #c8102e;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.add-to-cart {
    width: 100%;
    background-color: #c8102e;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.add-to-cart:hover {
    background-color: #a0001a;
}

/* ---------- Cart ---------- */
.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    background-color: #f0f0f0;
}

.cart-item-details {
    flex: 1;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-input {
    width: 60px;
    padding: 0.25rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.remove-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
}

.cart-summary {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 1rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.summary-total {
    font-weight: bold;
    font-size: 1.2rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #eee;
}

/* ---------- Forms ---------- */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.btn {
    background-color: #c8102e;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.3s;
    display: inline-block;
    text-decoration: none;
}

.btn:hover {
    background-color: #a0001a;
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* ---------- Category sidebar / shop layout ---------- */
.shop-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

.sidebar {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 0.5rem;
}

.category-list a {
    display: block;
    padding: 0.5rem;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.category-list a:hover {
    background-color: #f8f9fa;
}

.subcategory {
    padding-left: 1rem;
    font-size: 0.9rem;
}

/* ---------- Product info on product page ---------- */
.product-info-block {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

/* ---------- Footer ---------- */
footer.site-footer {
    background: #333;
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    color: #c8102e;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
}

.footer-links a:hover {
    color: white;
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid #555;
}

/* ---------- Delivery page (standalone look) ---------- */
body.delivery-page {
    font-family: 'Open Sans', 'Segoe UI', sans-serif;
    background: var(--bg-warm);
    color: var(--text);
    line-height: 1.8;
}

.flag-bar {
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--union-red) 0%,
        var(--union-red) 33%,
        white 33%,
        white 66%,
        var(--union-blue) 66%,
        var(--union-blue) 100%
    );
}

header.delivery-header {
    background: linear-gradient(135deg, var(--union-blue) 0%, #1e3a5f 100%);
    color: white;
    padding: 1.5rem 2rem;
    text-align: center;
}

header.delivery-header h1 {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

header.delivery-header a {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    margin: 0 0.5rem;
}

.delivery-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.delivery-container h2 {
    font-family: 'Playfair Display', 'Georgia', serif;
    color: var(--union-blue);
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
    border-bottom: 2px solid var(--union-red);
    padding-bottom: 0.5rem;
}

.zone-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.zone-card h3 {
    color: var(--union-red);
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    font-family: 'Playfair Display', 'Georgia', serif;
}

.zone-card .zone-body {
    white-space: pre-wrap;
}

.zone-card .zone-body p {
    margin-bottom: 0.6rem;
}

.delivery-important {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

.delivery-important strong {
    color: #856404;
}

footer.delivery-footer {
    background: var(--union-blue);
    color: white;
    padding: 2rem;
    text-align: center;
    margin-top: 3rem;
}

footer.delivery-footer a {
    color: white;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    .nav-right {
        width: 100%;
        justify-content: center;
    }
    .hero {
        padding: 2rem 1rem;
    }
    .section-title {
        font-size: 1.5rem;
    }
    .shop-layout {
        grid-template-columns: 1fr;
    }
}
