/* ระบบร้านก๋วยเตี๋ยว - Frontend CSS */

/* Global Styles */
body {
    font-family: 'Kanit', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #fff8f0;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: #fff;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo h1 {
    color: white;
    margin: 0;
}

.logo img {
    width: 60px;
    height: 60px;
    margin-right: 10px;
}

nav ul {
    list-style-type: none;
    padding: 0;
    display: flex;
    align-items: center;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    padding: 8px 15px;
    border-radius: 5px;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 24px;
}

.cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #e74c3c;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: bold;
}

/* Button Styles */
.login-button,
.user-info,
.checkout-button,
.add-to-cart {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: #fff;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(255, 107, 53, 0.3);
}

.login-button:hover,
.add-to-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 107, 53, 0.4);
}

.user-info {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
}

.checkout-button {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    width: 100%;
    font-size: 18px;
    padding: 15px 20px;
}

.checkout-button:hover {
    transform: translateY(-2px);
}

/* Form Styles */
.search-bar,
.checkout-form {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.search-bar input,
.checkout-form input,
.checkout-form textarea,
.checkout-form select {
    flex-grow: 1;
    padding: 12px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s;
}

.search-bar input:focus,
.checkout-form input:focus,
.checkout-form textarea:focus,
.checkout-form select:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.search-bar button {
    padding: 12px 24px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.search-bar button:hover {
    transform: translateY(-2px);
}

/* Category Filter Styles */
.category-filter {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border: 2px solid #e0e0e0;
    background-color: #fff;
    color: #333;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Kanit', sans-serif;
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-color: #ff6b35;
}

.filter-btn.active {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: #fff;
    border-color: #ff6b35;
    box-shadow: 0 4px 10px rgba(255, 107, 53, 0.3);
}

/* Product Styles */
.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 40px 0;
}

.product {
    background-color: #fff;
    border: 2px solid #f0f0f0;
    padding: 20px;
    text-align: center;
    border-radius: 15px;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: relative;
    overflow: visible;
}

.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.2);
    border-color: #ff6b35;
}

.product img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}

.product h3 {
    color: #8b4513;
    margin: 10px 0;
    font-size: 1.2em;
}

.product p {
    color: #ff6b35;
    font-weight: bold;
    font-size: 1.3em;
    margin: 5px 0;
}

/* Slideshow Styles */
.slideshow {
    background-color: #ddd;
    height: 400px;
    position: relative;
    overflow: hidden;
    margin-top: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background-size: cover;
    background-position: center;
}

.slide.active {
    opacity: 1;
}

/* Checkout Styles */
.checkout-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.order-summary,
.checkout-form-container {
    background-color: #fff;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.order-summary {
    flex: 1;
}

.checkout-form-container {
    flex: 2;
}

.order-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.order-total {
    font-weight: bold;
    font-size: 1.5em;
    margin-top: 20px;
    text-align: right;
    color: #ff6b35;
}

/* Message Styles */
.success-message,
.error-message {
    padding: 15px;
    margin-bottom: 20px;
    border: none;
    border-radius: 10px;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
}

/* Footer Styles */
footer {
    background: linear-gradient(135deg, #8b4513 0%, #6b3410 100%);
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

/* Login Form Styles */
.login-container {
    max-width: 400px;
    margin: 40px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.login-form input {
    padding: 12px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
}

.login-form button {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: #fff;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 8px;
    font-weight: 600;
}

.login-form button:hover {
    transform: translateY(-2px);
}

/* Cart Styles */
.cart-container {
    background-color: #fff;
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    padding: 15px 0;
}

.cart-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    margin-right: 20px;
    border-radius: 10px;
}

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

.cart-item-details h3 {
    color: #8b4513;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-item-quantity button {
    background-color: #ff6b35;
    color: white;
    border: none;
    padding: 5px 12px;
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
}

.cart-item-quantity button:hover {
    background-color: #e55a2b;
}

.cart-item-quantity span {
    margin: 0 10px;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.cart-summary {
    margin-top: 20px;
    text-align: right;
}

.cart-summary h2 {
    color: #ff6b35;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    nav ul li {
        margin: 5px;
    }

    .checkout-container {
        flex-direction: column;
    }

    .products {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}
