#bft-simple-shop-container {
    max-width: 1200px;
    margin: 20px auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.product-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    background-color: #f9f9f9;
    border-bottom: 1px solid #f0f0f0;
}

.product-info {
    padding: 15px 20px;
    flex-grow: 1;
}

.product-card h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
    line-height: 1.2;
    min-height: 2.4em; /* Ensure alignment for multi-line titles */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-subtitle {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: 5px;
    line-height: 1.4;
}

.product-details {
    margin-top: 15px;
    font-size: 0.85rem;
    color: #34495e;
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
}

.detail-item {
    margin-bottom: 3px;
}

.product-price-section {
    margin-top: 15px;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.product-price {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1.3rem;
}

.product-unit-price {
    font-size: 0.85rem;
    color: #95a5a6;
}

.product-description-preview {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
    border-top: 1px dashed #eee;
    padding-top: 10px;
    font-style: italic;
}

.product-actions {
    display: flex;
    gap: 1px;
    margin-top: auto;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
}

.bft-details-button {
    background: #f8f9fa;
    color: #333;
    border: none;
    padding: 14px;
    flex: 1;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
    border-right: 1px solid #eee;
}

.bft-details-button:hover {
    background: #e9ecef;
}

.bft-order-button {
    background: #27ae60;
    color: #fff;
    border: none;
    padding: 14px;
    flex: 1;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.bft-order-button:hover {
    background: #219150;
}

/* Modal styles */
#bft-order-modal {
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

/* Floating Cart Widget */
#bft-floating-cart {
    position: fixed;
    top: 120px;
    right: 30px;
    background: #27ae60;
    color: white;
    padding: 0 20px;
    height: 54px;
    border-radius: 27px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.4);
    cursor: pointer;
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255,255,255,0.2);
}

#bft-floating-cart .cart-label {
    font-weight: bold;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#bft-floating-cart:hover {
    transform: scale(1.1);
    background: #2ecc71;
}

#bft-floating-cart .cart-count {
    background: #ffffff;
    color: #27ae60;
    font-size: 14px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#bft-floating-cart svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Cart Table in Modal */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.cart-table th {
    text-align: left;
    padding: 10px;
    border-bottom: 2px solid #eee;
    color: #7f8c8d;
}

.cart-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.cart-item-info {
    font-weight: 600;
}

.cart-item-option {
    display: block;
    font-size: 0.85rem;
    color: #7f8c8d;
    font-weight: normal;
}

.qty-input {
    width: 50px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.remove-from-cart {
    color: #e74c3c;
    cursor: pointer;
    font-size: 18px;
}

.cart-total-row {
    font-size: 1.2rem;
    font-weight: bold;
    text-align: right;
    padding: 20px 10px;
    border-top: 2px solid #eee;
}

.cart-empty-msg {
    text-align: center;
    padding: 40px;
    color: #95a5a6;
    font-style: italic;
}

.modal-content {
    background-color: #fefefe;
    padding: 30px;
    border-radius: 15px;
    width: 95%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

#modal-product-image {
    max-height: 300px;
    width: auto;
    max-width: 100%;
    margin: 0 auto 20px;
    display: block;
    border-radius: 8px;
    object-fit: contain;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

#bft-order-form p {
    margin: 10px 0;
}

.form-row {
    margin-bottom: 10px;
}

.form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-row input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

#submit-order-button {
    background: #2980b9;
    color: white;
    border: none;
    padding: 15px;
    width: 100%;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
}

#submit-order-button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

#distance-check-result {
    margin: 10px 0;
    padding: 10px;
    border-radius: 6px;
    font-weight: 500;
}

.distance-ok {
    background: #eafaf1;
    color: #27ae60;
    border: 1px solid #27ae60;
}

.distance-error {
    background: #fdf2f2;
    color: #c0392b;
    border: 1px solid #c0392b;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.category-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    border-color: #2980b9;
}

.category-card h3 {
    margin: 0;
    font-size: 1.1rem;
}

.category-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 15px;
}

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

.category-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.product-count {
    display: block;
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: 5px;
}

/* Shop Header & Back Button */
.shop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.shop-header h2 {
    margin: 0;
}

.back-button {
    text-decoration: none;
    background: #f1f1f1;
    color: #34495e;
    padding: 8px 15px;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.3s;
}

.back-button:hover {
    background: #e0e0e0;
}

/* Checkout specific enhancements */
#bft-modal-view-checkout .form-row {
    margin-bottom: 8px;
}

#bft-modal-view-checkout h3 {
    font-size: 1.05rem;
    padding-bottom: 8px !important;
    margin-bottom: 10px !important;
}

#bft-modal-view-checkout .checkout-section {
    padding: 12px !important;
    margin-bottom: 15px !important;
}

#bft-modal-view-checkout input[type="radio"],
#bft-modal-view-checkout input[type="checkbox"] {
    width: auto !important;
    margin-right: 8px;
    cursor: pointer;
}

.cart-summary-lines {
    background: #fdfdfd;
    padding: 15px;
    border-radius: 8px;
}

.cart-summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    color: #7f8c8d;
    font-size: 0.95rem;
}

/* Animations */
@keyframes bft-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); box-shadow: 0 12px 30px rgba(39, 174, 96, 0.6); }
    100% { transform: scale(1); }
}

.bft-cart-pulse {
    animation: bft-pulse 0.4s ease;
}

#bft-floating-cart:active {
    transform: scale(0.95);
}

body.bft-modal-open {
    overflow: hidden !important;
    height: 100%;
}

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {
    #bft-order-modal {
        align-items: flex-start;
        overflow-y: auto;
        padding-top: 30px;
        padding-bottom: 30px;
    }

    .modal-content {
        padding: 20px 15px;
        width: 96%;
        max-height: none;
        border-radius: 10px;
        margin: 0 auto; /* Horizontal centering in flex-start */
    }

    .cart-table {
        font-size: 0.85rem;
    }

    .cart-table th, .cart-table td {
        padding: 8px 5px;
    }

    .qty-input {
        width: 45px;
        padding: 8px 2px;
        font-size: 1rem; /* Better for mobile zoom prevention */
    }

    #bft-floating-cart {
        top: 80px;
        right: 15px;
        height: 48px;
        padding: 0 15px;
    }

    #bft-floating-cart .cart-label {
        font-size: 0.8rem;
    }
}
