* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #F5F5F5;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Header Section */
.header {
    background: #8B1E1E;
    padding: 30px 20px;
    text-align: center;
    color: white;
}

.store-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 5px solid white;
    margin: 0 auto 15px;
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.store-name {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
}

.store-contact {
    font-size: 16px;
    opacity: 0.95;
}

/* Loading Section */
.loading-section {
    padding: 60px 20px;
    text-align: center;
    color: #666;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #8B1E1E;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Product Gallery */
.products-section {
    padding: 30px 20px;
}

.section-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #212121;
    text-align: center;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.product-card {
    background: #FFFFFF;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    border: 1px solid #F5F5F5;
}

.product-card:active {
    transform: scale(0.98);
}

.product-card.out-of-stock-card {
    opacity: 0.6;
    cursor: not-allowed;
}

.product-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    background: linear-gradient(135deg, #F5F5F5 0%, #FFFFFF 100%);
}

.product-info {
    padding: 12px;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    color: #212121;
    margin-bottom: 5px;
}

.product-price {
    font-size: 18px;
    font-weight: bold;
    color: #8B1E1E;
}

.product-stock {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.product-stock.low-stock {
    color: #ff9800;
    font-weight: 600;
}

.out-of-stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

/* Order Form */
.order-section {
    background: #F5F5F5;
    padding: 30px 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #212121;
    margin-bottom: 8px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: #FFFFFF;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #8B1E1E;
}

.form-select {
    background: white;
    cursor: pointer;
}

.stock-info {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: #8B1E1E;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
    box-shadow: 0 5px 15px rgba(139, 30, 30, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.submit-btn:hover {
    background: #6D1717;
}

.submit-btn:active {
    transform: translateY(2px);
    box-shadow: 0 3px 10px rgba(139, 30, 30, 0.3);
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.7;
}

.btn-loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.modal-icon.error {
    color: #dc3545;
}

.modal-title {
    font-size: 24px;
    font-weight: bold;
    color: #212121;
    margin-bottom: 15px;
}

.modal-text {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
}

.modal-price {
    font-size: 32px;
    font-weight: bold;
    color: #8B1E1E;
    margin: 20px 0;
}

.modal-btn {
    width: 100%;
    padding: 15px;
    background: #8B1E1E;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.3s ease;
}

.modal-btn:hover {
    background: #6D1717;
}

.modal-btn.secondary {
    background: #28a745;
}

.modal-btn.secondary:hover {
    background: #218838;
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.image-modal.active {
    display: flex;
}

.image-modal-content {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 10px;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 2001;
}

/* Responsive */
@media (max-width: 400px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}