/*Products Page Styling*/

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.product-card {
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 16px;
    background: white;
    transition: box-shadow 0.2s ease;
}

    .product-card:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

.product-image {
    max-width: 100%;
    width: 100%;
    height: 220px;
    object-fit: contain;
    display: block;
    margin-bottom: 12px;
}

.product-name {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #222;
    text-decoration: none;
    margin-bottom: 8px;
}

.product-price {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 16px;
}

.product-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.quantity-input {
    width: 70px;
}

.add-cart-btn {
    flex-grow: 1;
    background: #0076ce;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
}

    .add-cart-btn:hover {
        background: #005fa3;
    }

/*Cart Icon*/

.cart-link {
    text-decoration: none;
}

.cart-icon-container {
    position: relative;
    display: inline-block;
}

.cart-icon {
    font-size: 2rem;
    line-height: 1;
}

.cart-badge {
    position: absolute;
    top: -8px;
    left: 16px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background-color: #dc3545;
    color: white;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    border: 1px solid white;
}

/* Mini Cart */
.mini-cart {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    max-width: 100vw;
    height: 100vh;
    background: white;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 15px rgba(0,0,0,.15);
    animation: slideInCart 0.12s ease-out;
    box-sizing: border-box;
}

.mini-cart-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0,0,0,0.30);
    backdrop-filter: blur(2px);
}

@keyframes slideInCart {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

.mini-cart-header {
    padding: 16px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-btn {
    border: none;
    background: none;
    font-size: 28px;
    cursor: pointer;
}

.mini-cart-body {
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    flex-shrink: 0;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 10px;
}

.cart-item-qty {
    color: #666;
    margin-bottom: 8px;
}

.cart-item-price {
    font-size: 1.1rem;
    font-weight: bold;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 600;
}

.cart-total-label {
    color: #333;
}

.cart-total-value {
    color: #333;
}

.subtotal {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 4px;
}

    .quantity-control button {
        width: 32px;
        height: 32px;
        border: 1px solid #ddd;
        background: #f8f8f8;
        cursor: pointer;
    }

    .quantity-control input {
        width: 60px;
        text-align: center;
    }

.mini-cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.remove-item-btn {
    margin-left: auto;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #dc3545;
    padding: 4px;
    font-size: 1rem;
}

    .remove-item-btn:hover {
        color: #b02a37;
    }

.quantity-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    width: 100%;
}

.shipping-item-price-row {
    display: flex;
    justify-content: space-between;
    margin-top: 0px;
    padding-top: 10px;
}

.shipping-item-name {
    font-weight: 600;
    margin-bottom: 2px;
}

.cart-item-price-row {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f1f1f1;
}

.line-total {
    font-size: 1.05rem;
    font-weight: 700;
}

.mini-cart-footer {
    padding: 11px;
    border-top: 1px solid #e5e5e5;
    box-sizing: border-box;
    background: white;
    flex-shrink: 0;
    width: 100%;
    overflow: hidden;
}

.footer-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

    .footer-actions a {
        display: block;
        width: 100%;
        box-sizing: border-box;
        margin: 0;
    }

.view-cart-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    padding: 12px;
    border: 2px solid #c85e27;
    border-radius: 999px;
    text-decoration: none;
    margin: 0 !important;
    color: #c85e27;
    background: white;
}

.checkout-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border: none;
    border-radius: 999px;
    padding: 12px;
    text-align: center;
    background: #c24f1f;
    color: white;
    text-decoration: none;
    cursor: pointer;
    margin: 0 !important;
}

.emptyCart {
    font-size: 35px;
}

/*Shipping details*/
.checkout-input {
    width: 100%;
    min-height: 36px;
    padding: 0.375rem 0.5rem;
}

.checkout-field {
    margin-bottom: 0.25rem;
}

    .checkout-field label {
        display: block;
        margin-bottom: 0.15rem;
        font-size: 0.95rem;
        font-weight: 500;
    }

    .checkout-field .form-control,
    .checkout-field .form-select {
        width: 100%;
        height: 36px;
        padding: 0.25rem 0.5rem;
    }

.checkout-summary {
    position: sticky;
    top: 20px;
}

.checkout-layout {
    display: grid;
    grid-template-columns: 50% 50%;
    gap: 2rem;
    align-items: start;
}

@media(max-width:768px) {

    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .checkout-summary {
        order: 1;
    }

    .shipping-details {
        order: 2;
    }

    .checkout-summary {
        position: static;
    }

    .checkout-page {
        grid-template-columns: 1fr;
    }
}

/*Shipping details */

.address-card-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 2rem;
}

.address-card {
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 8px;
    cursor: pointer;
    transition: all .15s ease;
    background: white;
}

    .address-card:hover {
        border-color: #c85e27;
        box-shadow: 0 3px 10px rgba(0,0,0,.08);
    }

    .address-card.selected {
        border-color: #c85e27;
        background: #fff7f2;
    }

.address-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    font-weight: 600;
}

.address-card.selected i {
    color: #c85e27;
    border-color: #c85e27;
    font-size: 1.1rem;
}

.new-address {
    border-style: dashed;
    text-align: center;
    color: #666;
}

    .new-address:hover {
        background: #fafafa;
    }

Shipping option

.shipping-method-card {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.shipping-method-card h4 {
    margin: 0;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e5e5;
    font-size: 1.35rem;
}

.shipping-option {
    display: grid;
    grid-template-columns: 30px 90px 1fr;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f1f1f1;
    transition: background .15s ease;
}

    .shipping-option:last-child {
        border-bottom: none;
    }

    .shipping-option:hover {
        background: #fafafa;
    }

    .shipping-option input[type=radio] {
        width: 18px;
        height: 18px;
    }

    .shipping-option:has(input:checked) {
        background: #fff7f2;
        border-left: 4px solid #c85e27;
    }

    .shipping-option.selected {
        background: #fff7f2;
        border-left: 4px solid #c85e27;
    }

.shipping-price {
    font-weight: 600;
    font-size: 1.05rem;
}

.shipping-name {
    color: #444;
}

/*Make screens smaller than 500px have a horizontal scroll bar on QuickGrid;*/

.quickgrid-container {
    width: 100%;
    overflow-x: auto;
}

    .quickgrid-container table {
        min-width: 500px;
    }