:root {
    --primary-color:    #2d5016;
    --secondary-color:  #8b4513;
    --accent-color:     #f4a460;
    --text-dark:        #2c3e50;
    --text-light:       #ffffff;
    --bg-light:         #f8f9fa;
    --offer-color:      #c0392b;
    --sub-color:        #1a6e3c;
}

/* -------------------------------------------------------
   Base
------------------------------------------------------- */
body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-dark);
    background: #fff;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Merriweather', serif;
    color: var(--primary-color);
}

/* -------------------------------------------------------
   Navbar
------------------------------------------------------- */
.navbar {
    background-color: var(--primary-color) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,.15);
}

.navbar-brand img {
    max-height: 50px;
    filter: brightness(1.2);
}

.navbar-nav .nav-link {
    color: var(--text-light) !important;
    font-weight: 500;
    padding: .5rem 1rem !important;
    transition: color .2s;
}

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

.btn-basket {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(255,255,255,.15);
    color: var(--text-light) !important;
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 50px;
    padding: .4rem 1rem;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s;
    position: relative;
}

.btn-basket:hover {
    background: rgba(255,255,255,.25);
    color: var(--text-light) !important;
}

.basket-badge {
    background: var(--accent-color);
    color: var(--text-dark);
    border-radius: 50%;
    font-size: .7rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 2px;
}

/* -------------------------------------------------------
   Shop Header
------------------------------------------------------- */
.shop-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--text-light);
    padding: 3rem 0 2.5rem;
    text-align: center;
}

.shop-header h1 {
    color: var(--text-light);
    font-size: 2.5rem;
    margin-bottom: .5rem;
}

.shop-header p {
    font-size: 1.1rem;
    opacity: .9;
    margin: 0;
}

/* -------------------------------------------------------
   Delivery Notice
------------------------------------------------------- */
.delivery-notice {
    background: #eaf2e3;
    border-bottom: 1px solid #c3d9ae;
    padding: .65rem 0;
    font-size: .9rem;
    color: var(--primary-color);
    text-align: center;
}

.delivery-link {
    color: var(--secondary-color);
    font-weight: 600;
    margin-left: .5rem;
    text-decoration: underline;
}

.delivery-link:hover {
    color: var(--primary-color);
}

/* -------------------------------------------------------
   Category Filter
------------------------------------------------------- */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.btn-category {
    background: var(--bg-light);
    border: 1px solid #d0d0d0;
    color: var(--text-dark);
    border-radius: 50px;
    padding: .35rem 1rem;
    font-size: .9rem;
    font-weight: 500;
    transition: all .2s;
    text-decoration: none;
}

.btn-category:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-light);
}

.btn-category.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-light);
}

/* -------------------------------------------------------
   Product Cards
------------------------------------------------------- */
.product-card {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    transition: transform .25s, box-shadow .25s;
    position: relative;
}

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

.product-card.on-offer {
    border-color: var(--offer-color);
}

/* Special offer ribbon */
.offer-ribbon {
    position: absolute;
    top: 12px;
    right: -30px;
    background: var(--offer-color);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    padding: .25rem 2.5rem;
    transform: rotate(45deg);
    transform-origin: top right;
    letter-spacing: .05em;
    z-index: 10;
    width: 130px;
    text-align: center;
}

/* Product image */
.product-img-wrap {
    height: 200px;
    overflow: hidden;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #f0f0f0;
}

/* Card body text */
.category-badge {
    display: inline-block;
    background: #eaf2e3;
    color: var(--primary-color);
    font-size: .75rem;
    font-weight: 600;
    padding: .2rem .6rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.product-name {
    font-size: 1rem;
    font-family: 'Merriweather', serif;
    color: var(--primary-color);
    margin-bottom: .3rem;
}

.product-desc {
    font-size: .875rem;
    color: #555;
    line-height: 1.5;
}

/* Pricing */
.price-block {
    border-top: 1px solid #eee;
    padding-top: .75rem;
}

.price-was {
    font-size: .9rem;
    color: #999;
    text-decoration: line-through;
    margin-right: .4rem;
}

.price-now {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.product-card.on-offer .price-now {
    color: var(--offer-color);
}

.sub-price {
    font-size: .8rem;
    color: var(--sub-color);
    font-weight: 600;
}

.sub-saving {
    font-weight: 400;
    color: #666;
}

.stock-notice {
    font-size: .8rem;
    color: #888;
    margin-bottom: 0;
}

/* Buttons */
.qty-input {
    width: 65px;
    text-align: center;
    padding: .375rem .5rem;
}

.btn-primary-custom {
    background-color: var(--primary-color);
    border: none;
    color: var(--text-light);
    font-weight: 600;
    border-radius: 6px;
    padding: .45rem 1rem;
    transition: background .2s, transform .15s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary-custom:hover {
    background-color: #3d6b1e;
    color: var(--text-light);
    transform: scale(1.02);
}

.btn-subscribe {
    background: transparent;
    border: 2px solid var(--sub-color);
    color: var(--sub-color);
    font-size: .82rem;
    font-weight: 600;
    border-radius: 6px;
    padding: .4rem .75rem;
    transition: all .2s;
}

.btn-subscribe:hover {
    background: var(--sub-color);
    color: #fff;
}

/* -------------------------------------------------------
   Footer
------------------------------------------------------- */
footer {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 1.75rem 0;
    text-align: center;
    margin-top: 4rem;
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* -------------------------------------------------------
   Basket page
------------------------------------------------------- */
.empty-basket-icon {
    opacity: .4;
}

.basket-table-wrap {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.basket-table {
    margin: 0;
}

.basket-table thead th {
    background: var(--bg-light);
    color: var(--primary-color);
    font-family: 'Merriweather', serif;
    font-size: .85rem;
    font-weight: 700;
    border-bottom: 2px solid #ddd;
    padding: .85rem 1rem;
}

.basket-table tbody td {
    padding: .9rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.basket-table tbody tr:last-child td {
    border-bottom: none;
}

.basket-thumb {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.basket-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.basket-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
}

.basket-product-name {
    font-weight: 600;
    font-size: .95rem;
    color: var(--text-dark);
    margin-bottom: .2rem;
}

.badge-sub {
    display: inline-flex;
    align-items: center;
    background: #e8f5ee;
    color: var(--sub-color);
    font-size: .72rem;
    font-weight: 600;
    padding: .15rem .5rem;
    border-radius: 50px;
    border: 1px solid #c3e6cf;
    margin-right: .3rem;
}

.badge-offer {
    display: inline-block;
    background: #fdecea;
    color: var(--offer-color);
    font-size: .72rem;
    font-weight: 600;
    padding: .15rem .5rem;
    border-radius: 50px;
    border: 1px solid #f5c6cb;
}

.qty-input-sm {
    width: 58px;
    text-align: center;
    padding: .3rem .4rem;
    font-size: .9rem;
}

.btn-update {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: .3rem .5rem;
    line-height: 1;
    transition: background .2s;
}

.btn-update:hover {
    background: #3d6b1e;
    color: #fff;
}

.btn-remove {
    background: transparent;
    border: 1px solid #ddd;
    color: #aaa;
    border-radius: 5px;
    padding: .3rem .45rem;
    line-height: 1;
    transition: all .2s;
}

.btn-remove:hover {
    background: var(--offer-color);
    border-color: var(--offer-color);
    color: #fff;
}

.btn-outline-continue {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 6px;
    font-size: .9rem;
    font-weight: 600;
    padding: .45rem 1.1rem;
    text-decoration: none;
    transition: all .2s;
}

.btn-outline-continue:hover {
    background: var(--primary-color);
    color: #fff;
}

/* Order summary panel */
.order-summary {
    background: var(--bg-light);
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 1.5rem;
    position: sticky;
    top: 80px;
}

.summary-title {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: .75rem;
    border-bottom: 2px solid #ddd;
}

.summary-lines {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-bottom: .75rem;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: .88rem;
    gap: .5rem;
}

.summary-line-name {
    color: #555;
    flex: 1;
}

.summary-sub-label {
    color: var(--sub-color);
    font-size: .78rem;
}

.summary-line-price {
    font-weight: 600;
    white-space: nowrap;
}

.summary-divider {
    border-top: 2px solid #ddd;
    margin: .75rem 0;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: .75rem;
}

.summary-note {
    font-size: .78rem;
    color: #888;
    text-align: center;
    margin-bottom: 0;
}

.sub-notice {
    background: #e8f5ee;
    border: 1px solid #c3e6cf;
    border-radius: 6px;
    color: var(--sub-color);
    font-size: .8rem;
    padding: .6rem .75rem;
    margin-top: .75rem;
    display: flex;
    align-items: flex-start;
    gap: .25rem;
}

.btn-checkout {
    background: var(--secondary-color);
    border: none;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 6px;
    padding: .75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, transform .15s;
    text-decoration: none;
}

.btn-checkout:hover {
    background: #a0522d;
    color: #fff;
    transform: scale(1.02);
}

.active-basket {
    background: rgba(255,255,255,.3) !important;
    border-color: rgba(255,255,255,.7) !important;
}

/* -------------------------------------------------------
   Checkout page
------------------------------------------------------- */

/* Progress steps */
.checkout-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
}

.step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ddd;
    color: #999;
    font-weight: 700;
    font-size: .9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .3s, color .3s;
}

.step.active .step-circle {
    background: var(--primary-color);
    color: #fff;
}

.step.done .step-circle {
    background: var(--sub-color);
    color: #fff;
}

.step-label {
    font-size: .75rem;
    font-weight: 600;
    color: #aaa;
}

.step.active .step-label,
.step.done .step-label {
    color: var(--primary-color);
}

.step-line {
    height: 2px;
    width: 80px;
    background: #ddd;
    margin-bottom: 1.2rem;
    flex-shrink: 0;
}

.step-line.done {
    background: var(--sub-color);
}

/* Checkout form sections */
.checkout-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 1.5rem;
}

.checkout-section-title {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 1.1rem;
    padding-bottom: .65rem;
    border-bottom: 2px solid #eee;
}

.form-label {
    font-size: .875rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: .3rem;
}

.req {
    color: var(--offer-color);
}

.postcode-note {
    font-size: .75rem;
    font-weight: 400;
    color: #888;
}

.delivery-info-box {
    background: #fff8f0;
    border: 1px solid #f4a460;
    border-radius: 6px;
    color: #7a4a1e;
    font-size: .8rem;
    padding: .6rem .75rem;
    display: flex;
    align-items: flex-start;
    gap: .25rem;
}

/* Confirmation page */
.confirmed-box {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 2.5rem 2rem;
}

.confirmed-icon {
    color: var(--primary-color);
}

/* -------------------------------------------------------
   Responsive tweaks
------------------------------------------------------- */
@media (max-width: 576px) {
    .shop-header h1 { font-size: 1.8rem; }

    .basket-table .col-price,
    .basket-table .col-total { display: none; }

    .basket-thumb { width: 48px; height: 48px; }
}
