:root {
    --primary-color: #2d7a6e;
    --primary-dark: #1f5a4f;
}

.offcanvas-header {
    border-bottom: 1px solid #e0e0e0;
    padding: 0.75rem 1rem;
}

.offcanvas-title {
    font-weight: 600;
    font-size: 1rem;
    color: #333;
}

.offcanvas-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cart-items {
    max-height: 35vh;
    overflow-y: auto;
    overflow-x: hidden;
    margin-bottom: 0.75rem;
    min-height: 30vh;
}

/* Custom scrollbar for cart items */
.cart-items::-webkit-scrollbar {
    width: 6px;
}

.cart-items::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.cart-items::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.cart-items::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.cart-item {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
}

.product-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: var(--primary);
    color: white;
    font-size: 0.6rem;
    padding: 0px 4px;
    border-radius: 3px;
    font-weight: 700;
    text-transform: uppercase;
}

.cart-item h6 {
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 0.25rem;
}

.cart-item .fw-bold {
    font-size: 0.95rem;
    color: #333;
}

.quantity-controls {
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    background: white;
}

.quantity-controls button {
    border: none;
    background: transparent;
    width: 26px;
    height: 26px;
    color: #666;
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-controls button:hover {
    color: var(--primary);
}

.quantity-controls input {
    border: none;
    width: 30px;
    text-align: center;
    font-weight: 500;
    font-size: 0.85rem;
    color: #333;
}

.quantity-controls input:focus {
    outline: none;
}

.trash-btn {
    background: transparent;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trash-btn:hover {
    opacity: 0.7;
}

.coupon-input-wrapper {
    position: relative;
}

.coupon-input-wrapper .form-control {
    padding-left: 2.5rem;
    padding-right: 3.5rem;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    height: 40px;
    font-size: 0.85rem;
}

.coupon-input-wrapper .form-control::placeholder {
    color: #999;
}

.coupon-input-wrapper .bi-tag {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 1rem;
}

.coupon-input-wrapper .apply-btn {
    position: absolute;
    right: 0.625rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    display: none;
}

.coupon-input-wrapper .apply-btn.show {
    display: block;
}

.coupon-input-wrapper .apply-btn:hover {
    text-decoration: underline;
}

.view-offers-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.view-offers-link:hover {
    text-decoration: underline;
}

.recommendation-section {
    background: var(--primary);
    border-radius: 10px;
    padding: 8px;
}

.recommendation-section h6 {
    color: white;
    font-weight: 600;
    margin-bottom: 0;
    font-size: 0.95rem;
}

.recommendation-card {
    background: white;
    border-radius: 6px;
    padding: 5px;
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.recommendation-card img {
    width: 55px;
    height: 55px;
    object-fit: cover;
    border-radius: 5px;
    flex-shrink: 0;
}

.recommendation-card .product-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.recommendation-card .product-name {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
    color: #333;
    line-height: 1.2;
}

.recommendation-card .product-price {
    font-weight: 700;
    color: #333;
    font-size: 0.9rem;
}

.recommendation-card .add-btn {
    background: white;
    border: 1.5px solid var(--primary);
    color: var(--primary);
    border-radius: 5px;
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.recommendation-card .add-btn:hover {
    background: var(--primary);
    color: white;
}

.error-div {
    min-height: 18px;
    margin-top: 0.4rem;
    margin-bottom: 120px;
}

.error-div span {
    color: #dc3545;
    font-size: 0.8rem;
}

.cart-total {
    border-top: 1px solid #e0e0e0;
    padding-top: 1rem;
    margin-top: auto;
    padding-bottom: 0;
    background: #ffffff;
}

.cart-total .bi-receipt {
    font-size: 1.1rem;
    color: #333;
}

.cart-total .fw-semibold {
    font-size: 0.95rem;
    color: #333;
}

.checkout-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.875rem 1rem;
    font-weight: 600;
    width: 100%;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.checkout-btn:hover {
    background: var(--primary-dark);
}

.payment-icons {
    display: flex;
    gap: 0.625rem;
    align-items: center;
    font-size: 1rem;
}

.product-size {
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 0.3rem 0.625rem;
    font-size: 0.8rem;
    background: white;
    cursor: pointer;
    width: auto;
    max-width: 110px;
}

.product-size:focus {
    border-color: var(--primary);
    box-shadow: none;
}

.cart-total {
    position: absolute;
    bottom: 0;
    width: 100%;
    left: 0;
    padding: 1rem;
}

/* Checkout Page Styles */
.checkout-page {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.checkout-header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.back-btn {
    background: transparent;
    border: none;
    font-size: 1.3rem;
    color: #333;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-btn:hover {
    color: var(--primary-color);
}

.checkout-title {
    font-weight: 600;
    font-size: 1rem;
    color: #333;
    margin: 0;
}

.checkout-body {
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
    padding-bottom: 70px;
}

.checkout-body::-webkit-scrollbar {
    width: 6px;
}

.checkout-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.checkout-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.checkout-body::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.mobile-section .form-label {
    font-size: 0.85rem;
    color: #333;
    margin-bottom: 0.4rem;
}

.mobile-section .input-group-text {
    background: white;
    border-right: none;
    color: #666;
    font-weight: 500;
}

.mobile-section .form-control {
    /*border-left: none;*/
}

.mobile-section .form-control:focus {
    border-color: #ced4da;
    box-shadow: none;
}

.info-block {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.875rem;
}

.block-title {
    background: #f8f9fa;
    padding: 8px 10px;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.block-content {
    padding: 0 10px 10px 10px;
}

.block-content .form-label {
    font-size: 0.8rem;
    color: #555;
    margin-bottom: 0.3rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

.block-content .form-control,
.block-content .form-select {
    font-size: 0.85rem;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
    padding: 0.5rem 0.75rem;
}

.block-content .form-control:focus,
.block-content .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.15rem rgba(45, 122, 110, 0.1);
}

.block-content .form-control::placeholder {
    color: #999;
    font-size: 0.8rem;
}

.block-content .mb-3 {
    margin-bottom: 0.75rem !important;
}

.order-summary {
    background: #f8f9fa;
    padding: 0.875rem;
    border-radius: 6px;
    font-size: 0.85rem;
}

.order-summary h6 {
    font-size: 0.9rem;
    /*margin-bottom: 0.75rem !important;*/
}

.order-summary .d-flex {
    margin-bottom: 0.5rem;
}

.order-summary .border-top {
    border-top: 1px solid #dee2e6 !important;
    margin-top: 0.5rem;
    padding-top: 0.5rem !important;
}

.place-order-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.875rem 1rem;
    font-weight: 600;
    width: 100%;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.place-order-btn:hover {
    background: var(--primary-dark);
}

.input-group:hover {
    color: var(--grey) !important;
}

.rec-cart-wrapper button {
    border: 1px solid var(--primary);
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.rec-cart-wrapper button:hover {
    background: var(--primary);
    color: #ffffff;
}

.entrCart:hover {
    color: #000000;
}

#checkoutCouponInput {
    padding-left: 40px;
}

/* Saved Addresses List */
.saved-addresses-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
}

/* Address Card/Tile */
.address-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
}

.address-card:hover {
    border-color: var(--primary-color);
    background: #f8f9fa;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
}

.address-card-type {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

.address-card-type i {
    font-size: 1rem;
}

.address-card-details {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
}

/* Custom Scrollbar for Address List */
.saved-addresses-list::-webkit-scrollbar {
    width: 6px;
}

.saved-addresses-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.saved-addresses-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.saved-addresses-list::-webkit-scrollbar-thumb:hover {
    background: #1e5a4f;
}

/* Toggle Address Button */
#toggleAddressBtn {
    font-weight: 500;
    font-size: 0.85rem;
}

#toggleAddressBtn:hover {
    text-decoration: underline !important;
}

.input-group-text {
    border-color: var(--border);
}

/* Payment Method Styles */
.payment-option {
    position: relative;
    margin-bottom: 0.75rem;
}

.payment-radio-label {
    cursor: pointer;
    display: block;
    margin: 0;
}

.payment-radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.payment-option-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.3s ease;
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.payment-option-card:hover {
    border-color: var(--primary-color);
    background: #f8f9fa;
}

.payment-radio-label input[type="radio"]:checked ~ .payment-option-card {
    border-color: var(--primary-color);
    background: #e8f5e9;
}

.payment-option-card .check-icon {
    color: #e0e0e0;
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.payment-radio-label input[type="radio"]:checked ~ .payment-option-card .check-icon {
    color: var(--primary-color);
}

.payment-option-card .fw-semibold {
    font-size: 0.9rem;
    color: #333;
}

.payment-option-card small {
    font-size: 0.8rem;
}

.payment-option-card i.bi-credit-card-2-front,
.payment-option-card i.bi-cash-coin {
    font-size: 1.1rem;
}

/* Delivery Estimate Message */
#deliveryEstimateMsg {
    font-size: 0.85rem;
    padding: 0.5rem 0;
}

/* Coupon Section */
.coupon-section {
    margin-bottom: 0.875rem;
}

.coupon-section .block-content {
    padding: 10px;
}

/* Floating Label Customization */
.form-floating > .form-control,
.form-floating > .form-select {
    height: 50px;
    font-size: 0.85rem;
    padding: 0.75rem;
}

/* Hide placeholder initially to avoid overlap */
.form-floating > .form-control::placeholder {
    color: transparent;
}

/* Show placeholder only when focused */
.form-floating > .form-control:focus::placeholder {
    color: #999;
}

.form-floating > label {
    font-size: 0.85rem;
    padding: 0.75rem;
    color: #666;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label {
    opacity: 0.65;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
    font-size: 0.75rem;
}

.form-floating > textarea {
    height: auto !important;
    min-height: 70px;
}

/* Textarea placeholder */
.form-floating > textarea::placeholder {
    color: transparent;
}

.form-floating > textarea:focus::placeholder {
    color: #999;
}

/* Remove extra spacing from block content since floating labels handle it */
.block-content {
    padding: 8px 10px;
}

.block-content .mb-2:last-child {
    margin-bottom: 0 !important;
}