/* store-system/store-style.css */
@import url('https://fonts.googleapis.com/css2?family=Anek+Bangla:wght@400;600;700&display=swap');

/* Base Font */
body, h1, h2, h3, h4, p, label, input, textarea, button, .store-item-card {
    font-family: 'Anek Bangla', sans-serif;
}

/* General Layout */
.store-system-wrapper {
    max-width: 1400px; /* Increased max-width for two columns */
    margin: 30px auto;
    box-sizing: border-box;
}

/* Horizontal Layout for Products and Cart */
.store-layout-grid {
    display: grid;
    grid-template-columns: 2fr 1fr; /* 2 parts for products, 1 part for cart */
    gap: 30px; /* Space between columns */
}

.store-products-section {
    /* Styles for the products column */
}

.store-cart-section {
    /* Styles for the cart column */
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5em;
    font-weight: 700;
}

/* Store Items Grid */
.store-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* 3 columns on desktop, slightly smaller min */
    gap: 20px; /* Reduced gap */
    justify-content: center;
}

.store-item-card {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding: 15px; /* Reduced padding */
    text-align: left; /* Aligned content to left */
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    display: flex; /* Flex container for left/right content */
    align-items: center; /* Vertically align items */
    position: relative; /* For positioning the add-to-cart-icon-btn */
}

.store-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.item-card-left {
    flex-shrink: 0; /* Prevents image from shrinking */
    margin-right: 15px; /* Space between image and text */
}

.item-image {
    width: 80px; /* Smaller fixed width for image */
    height: 80px; /* Smaller fixed height for image */
    object-fit: cover;
    border-radius: 8px;
    /* margin-bottom: 15px; Removed */
}

.item-card-right {
    flex-grow: 1; /* Allows text content to take remaining space */
}

.item-title {
    font-size: 1.1em; /* Smaller title */
    color: #444;
    margin-bottom: 5px; /* Reduced margin */
    font-weight: 600;
    line-height: 1.3;
}

.item-price {
    font-size: 1em; /* Smaller price */
    color: #0073aa;
    font-weight: 700;
    margin-bottom: 10px; /* Reduced margin */
}

.item-description {
    font-size: 0.85em; /* Small font for description */
    color: #777;
    margin-bottom: 10px;
    line-height: 1.4;
    max-height: 2.8em; /* Limit to 2 lines (approx) */
    overflow: hidden;
    text-overflow: ellipsis; /* Add ellipsis if text overflows */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit to 2 lines */
    -webkit-box-orient: vertical;
}

/* Quantity Control */
.item-quantity-control {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Align quantity to left */
    margin-bottom: 0px; /* Removed bottom margin */
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    width: auto; /* Auto width */
    max-width: 120px; /* Adjusted max width */
    margin-top: 10px; /* Added margin to separate from price */
}

.quantity-btn {
    background-color: #f0f0f0;
    border: none;
    padding: 8px 12px; /* Smaller padding */
    font-size: 0.9em; /* Smaller font */
    cursor: pointer;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.quantity-btn:hover {
    background-color: #e0e0e0;
}

.item-quantity-input {
    width: 40px; /* Smaller width for quantity input */
    text-align: center;
    border: none;
    outline: none;
    font-size: 0.9em; /* Smaller font */
    padding: 8px 5px; /* Smaller padding */
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Add to Cart Icon Button */
.add-to-cart-icon-btn {
    background-color: #FF6A00;
    color: #fff !important;
    border: none;
    border-radius: 50%;
    width: 35px; /* Smaller button */
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em; /* Smaller icon */
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease, transform 0.2s ease;
    position: absolute;
    bottom: 15px;
    right: 15px;
}

.add-to-cart-icon-btn .dashicons {
    font-size: 0.9em; /* Adjust icon size within the button */
    line-height: 1;
}

.add-to-cart-icon-btn:hover {
    background-color: #218838;
    transform: scale(1.1);
}

/* Removed Floating Cart Button styles */

/* Cart Section Card (Static Cart Display) */
.cart-section-card {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    padding: 25px;
    box-sizing: border-box;
    position: sticky;
    top: 30px;
}

.cart-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.cart-section-header h2 {
    font-size: 1em; /* Smaller cart header title */
    color: #333;
	font-family: 'Anek Bangla', sans-serif;
    font-weight: 700;
    margin: 0;
}

/* Cart Items List */
.cart-items-list {
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #eee;
    position: relative; /* For positioning remove button */
}

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

.cart-item-image {
    width: 60px; /* Smaller image in cart */
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 15px;
    flex-shrink: 0;
}

.cart-item-details {
    flex-grow: 1;
    text-align: left;
}

.cart-item-details h4 {
    font-size: 1em; /* Smaller font for item name in cart */
    color: #444;
    margin: 0 0 5px 0;
    font-weight: 600;
}

.cart-item-details p {
    font-size: 0.85em; /* Smaller font for quantity/unit price in cart */
    color: #666;
    margin: 0;
}

.cart-item-quantity-control { /* New container for cart item quantity control */
    display: flex;
    align-items: center;
    margin-top: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: fit-content;
}

.cart-item-quantity-btn {
    background-color: #f0f0f0;
    border: none;
    padding: 5px 8px;
    font-size: 0.8em;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.cart-item-quantity-btn:hover {
    background-color: #e0e0e0;
}

.cart-item-quantity-input {
    width: 30px;
    text-align: center;
    border: none;
    outline: none;
    font-size: 0.8em;
    padding: 5px 3px;
    -moz-appearance: textfield;
}

.cart-item-total {
    font-size: 1em; /* Smaller font for total price in cart */
    font-weight: 700;
    color: #0073aa;
    margin-left: 15px;
    flex-shrink: 0;
}

.remove-item-btn { /* New remove button style */
    background: none;
    border: none;
    color: #dc3545; /* Red color for remove */
    font-size: 1.5em; /* Size of the 'x' */
    cursor: pointer;
    position: absolute;
    top: 5px;
    right: 0px;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
}

.remove-item-btn:hover {
    color: #c82333;
}

.empty-cart-message {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 20px;
}

/* Cart Summary */
.cart-summary {
    text-align: right;
    font-size: 1em; /* Smaller summary font */
    font-weight: 700;
    color: #333;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid #f0f0f0;
}

.cart-summary .cart-total-price {
    color: #dc3545;
}

/* Complete Order Button in Static Cart */
.complete-order-btn {
	font-family: 'Anek Bangla', sans-serif;
    background-color: #FF0B00;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 12px 25px;
    font-size: 1em; /* Smaller font */
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: 100%;
    margin-top: 20px;
    font-weight: 600;
}

.complete-order-btn:hover {
    background-color: #218838;
    transform: translateY(-1px);
}

/* Order Popup Overlay (New) */
.order-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.order-popup-content {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    padding: 25px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-sizing: border-box;
}

.order-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.order-popup-header h2 {
    font-size: 1em; /* Smaller popup header title */
	font-family: 'Anek Bangla', sans-serif;
    color: #333;
    font-weight: 700;
    margin: 0;
}

.close-order-popup-btn {
    background: none;
    border: none;
    font-size: 2em;
    color: #888;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.close-order-popup-btn:hover {
    color: #333;
}

/* Popup Cart Summary Section */
.popup-cart-summary {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px dashed #eee;
}

.popup-cart-summary h3 {
	font-family: "Anek Bangla", Sans-serif;
    font-size: 1.2em; /* Smaller popup summary heading */
    color: #555;
    margin-bottom: 15px;
    text-align: center;
}

.popup-cart-items-list .cart-item { /* Reuse .cart-item style, but adjust remove button */
    margin-bottom: 10px;
    padding-bottom: 10px;
    position: static; /* Override absolute positioning for remove button in popup summary */
}
.popup-cart-items-list .cart-item .remove-item-btn {
    display: none; /* Hide remove button in popup summary */
}


.popup-cart-total-price-display,
.popup-cart-subtotal-display,
.popup-delivery-charge-display {
    font-size: 14px; /* Smaller popup total price display */
    font-weight: 700;
    color: #645252;
    text-align: right;
    margin-top: 2px; /* Adjust margin */
}

.popup-cart-total-price,
.popup-cart-subtotal,
.popup-delivery-charge {
    color: #dc3545;
}

/* Popup Order Form */
.popup-order-form-section {
    margin-top: 20px;
    padding-top: 15px;
}

.popup-order-form-section h3 {
	font-family: 'Anek Bangla', sans-serif;
    font-size: 1.4em; /* Smaller popup form heading */
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
}

.order-form .form-group {
    margin-bottom: 15px;
}

.order-form label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9em; /* Smaller label font */
    color: #555;
    font-weight: 500;
}

.order-form input[type="text"],
.order-form input[type="tel"],
.order-form input[type="email"],
.order-form textarea,
.order-form .form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.95em; /* Smaller input font */
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.order-form input:focus,
.order-form textarea:focus,
.order-form .form-control:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

/* Delivery Options (New) */
.delivery-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
}

.delivery-option {
    flex: 1 1 150px; /* Adjusted size for delivery options */
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 8px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    color: #444;
    font-weight: 500;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.delivery-option:hover {
    background-color: #e6e6e6;
    border-color: #bbb;
}

.delivery-radio {
    display: none;
}

.delivery-radio:checked + .radio-label {
    color: #FF6A00;
    padding: 6px 10px;
    font-weight: 600;
}


/* Payment Radio Buttons */
.payment-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
}

.payment-option {
    flex: 1 1 80px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 8px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    color: #444;
    font-weight: 500;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.payment-option:hover {
    background-color: #e6e6e6;
    border-color: #bbb;
}

.payment-radio {
    display: none;
}

.radio-label {
    display: inline-block;
    padding: 0;
    width: 100%;
    text-align: center;
}

.payment-radio:checked + .radio-label {
    background-color: #0073aa;
    color: #fff;
    border-color: #0073aa;
    padding: 6px 10px;
    border-radius: 4px;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 115, 170, 0.3);
}

.payment-instruction-text {
    font-size: 0.85em; /* Smaller instruction text */
    color: #666;
    margin-top: 8px;
    margin-bottom: 12px;
}

.payment-details-hidden {
    display: none;
}

.place-order-btn {
	font-family: 'Anek Bangla', sans-serif !important;
    background-color: #FF6A00 !important;
    color: #fff !important;
    border: none;
    border-radius: 5px;
    padding: 12px 25px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: 100%;
    margin-top: 20px;
}

.place-order-btn:hover {
    background-color: #005a87;
    transform: translateY(-1px);
}

.order-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    font-size: 0.9em; /* Smaller order message font */
    text-align: center;
}

.order-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.order-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Utility Class */
.hidden {
    display: none;
}

/* Responsive Adjustments */

@media (max-width: 480px) {
    .store-item-card {
        flex-direction: column; /* কন্টেন্ট ভার্টিকালি সাজানোর জন্য */
        text-align: center;    /* লেখাগুলো মাঝখানে আনার জন্য */
        align-items: center;   /* ফ্লেক্স আইটেমগুলো মাঝখানে আনার জন্য */
    }
}
@media (max-width: 480px) {
    .store-system-wrapper {
        padding: 0;
    }
}
@media (max-width: 992px) { /* Tablets and smaller laptops */
    .store-layout-grid {
        grid-template-columns: 2fr; /* Stack columns vertically */
        gap: 30px;
    }
    .store-cart-section {
        margin-top: 30px; /* Add space if stacked */
    }
    .store-items-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); /* 2 columns on tablets */
    }
    .cart-section-card {
        position: static; /* Remove sticky behavior on smaller screens */
        top: auto;
    }
    .order-popup-content {
        max-width: 90%;
        width: 90%;
    }
}

@media (max-width: 600px) { /* Larger phones */
    .store-items-grid {
        grid-template-columns: repeat(2, 1fr); /* Explicitly 2 columns on mobile */
        gap: 15px;
    }
    .store-system-wrapper {
        margin: 20px auto;
    }
    h1 {
        font-size: 2em;
        margin-bottom: 20px;
    }
    .store-item-card {
        padding: 10px; /* Even smaller padding */
    }
    .item-card-left {
        margin-right: 10px; /* Smaller margin */
    }
    .item-image {
        width: 60px;
        height: 60px;
    }
    .item-title {
        font-size: 1em;
    }
    .item-price {
        font-size: 0.9em;
    }
    .item-description {
        font-size: 0.75em; /* Even smaller description font */
    }
    .item-quantity-control {
        max-width: 100px;
    }
    .quantity-btn {
        padding: 6px 10px;
        font-size: 0.8em;
    }
    .item-quantity-input {
        width: 30px;
        font-size: 0.8em;
        padding: 6px 3px;
    }
    .add-to-cart-icon-btn {
        width: 30px;
        height: 30px;
        font-size: 1.3em;
        bottom: 8px;
        right: 8px;
    }
    .cart-section-card {
        padding: 15px;
    }
    .cart-section-header h2 {
        font-size: 1.4em;
    }
    .complete-order-btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }
    .cart-item-image {
        width: 50px;
        height: 50px;
    }
    .cart-item-details h4 {
		font-family: "Anek Bangla", Sans-serif;
        font-size: 0.9em;
    }
    .cart-item-details p, .cart-item-total {
        font-size: 0.8em;
    }
    .order-popup-content {
        padding: 15px;
        /* Ensure it covers most of the screen vertically on mobile */
        width: 95%; /* Make it wider on mobile */
        max-width: 95%;
        height: 90%; /* Take up more height */
        max-height: 95vh;
    }
    .order-popup-header h2 {
        font-size: 1.4em;
    }
    .close-order-popup-btn {
        font-size: 1.5em;
    }
    .payment-option, .delivery-option {
        flex: 1 1 45%; /* Two per row on small phones */
        font-size: 0.8em;
        padding: 5px 8px;
    }
    .payment-radio:checked + .radio-label, .delivery-radio:checked + .radio-label {
        padding: 3px 8px;
    }
    .order-form input, .order-form textarea, .order-form .form-control {
        font-size: 0.9em;
        padding: 8px 10px;
    }
    .place-order-btn {
        font-size: 1em;
        padding: 10px 20px;
    }
}

@media (max-width: 480px) { /* Smaller phones */
    .store-items-grid {
        grid-template-columns: 1fr 1fr;
    }
	.payment-options, .delivery-options {
    display: flex;
    flex-wrap: nowrap; /* এটা নিশ্চিত করবে যে আইটেমগুলো এক লাইনে থাকবে */
    gap: 10px;
    margin-top: 5px;
    flex-direction: row; /* এটি আইটেমগুলোকে পাশাপাশি সাজাবে */
    align-items: center; /* এটি আইটেমগুলোকে উল্লম্বভাবে (vertically) মাঝখানে রাখবে */
}
    
}
@media (max-width: 480px) {
    .payment-options, .delivery-options {
        flex-direction: row;
        gap: 8px;
    }
}