/* Delivery Page Specific Styles */

/* Hero Section */
.delivery-hero {
    background-color: #2c3e50 !important;
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('/images/hero.webp?v=2') !important;
    background-size: cover !important;
    background-position: center !important;
    background-attachment: fixed !important;
    background-repeat: no-repeat !important;
    color: white !important;
    padding: 140px 0 80px !important;
    text-align: center !important;
    min-height: 400px !important;
}

.delivery-hero .hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: white;
}

.delivery-hero .hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.delivery-badges {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Hero Testimonial */
.hero-testimonial {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 12px auto 0;
}
.hero-testimonial .testimonial-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.6);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.hero-testimonial blockquote {
    margin: 0;
    font-style: italic;
    color: rgba(255, 255, 255, 0.95);
}

.delivery-badges .badge {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

/* Delivery Info Section */
.delivery-info {
    padding: 30px 0;
    background: var(--cafe-bg);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.info-card {
    background: var(--cafe-card);
    border: 1px solid var(--cafe-border);
    border-radius: 8px;
    padding: 1rem 0.8rem;
    text-align: left;
    box-shadow: 0 6px 24px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 80px;
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.info-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-card h3 {
    color: var(--cafe-accent);
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.info-card p {
    color: var(--cafe-muted);
    font-size: 0.9rem;
    line-height: 1.3;
    margin: 0;
}

/* Menu Section */
.menu-section {
    padding: 50px 0;
    background: white;
}

.menu-section h2 {
    text-align: center;
    color: var(--cafe-accent);
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--cafe-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Category Filter */
.category-filter {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    padding: 0 1rem;
}

.filter-btn {
    background: var(--cafe-card);
    border: 2px solid var(--cafe-border);
    color: var(--cafe-text);
    padding: 0.6rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.85rem;
    white-space: nowrap;
    min-width: fit-content;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--cafe-accent);
    color: white;
    border-color: var(--cafe-accent);
    transform: translateY(-2px);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.product-card {
    background: var(--cafe-card);
    border: 1px solid var(--cafe-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    position: relative;
}

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

.product-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--cafe-muted);
    position: relative;
    overflow: hidden;
}

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

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--cafe-accent);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Product cards without images */
.product-card:not(:has(.product-image)) {
    padding-top: 1.5rem;
}

.product-card:not(:has(.product-image)) .product-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.product-content {
    padding: 1.5rem;
}

.product-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--cafe-accent);
    margin-bottom: 0.25rem;
}

.product-chinese-name {
    font-size: 1rem;
    font-weight: 500;
    color: var(--cafe-text);
    margin-bottom: 0.5rem;
    font-family: 'Noto Serif SC', serif;
}

.product-origin {
    font-size: 0.85rem;
    color: var(--cafe-muted);
    margin-bottom: 0.5rem;
}

.product-description {
    color: var(--cafe-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--cafe-accent);
    margin-bottom: 1rem;
}

.product-unit {
    font-size: 0.8rem;
    color: var(--cafe-muted);
    margin-left: 0.5rem;
}

.add-to-cart-btn {
    width: 100%;
    background: var(--cafe-accent);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.add-to-cart-btn:hover {
    background: #4c3426;
    transform: translateY(-2px);
}

.add-to-cart-btn:disabled {
    background: var(--cafe-muted);
    cursor: not-allowed;
    transform: none;
}

/* Shopping Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--cafe-card);
    border-left: 1px solid var(--cafe-border);
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--cafe-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    color: var(--cafe-accent);
    margin: 0;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--cafe-muted);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-items {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--cafe-border);
}

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

.cart-item-image {
    width: 60px;
    height: 60px;
    background: var(--cafe-bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--cafe-muted);
}

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

.cart-item-name {
    font-weight: 600;
    color: var(--cafe-accent);
    margin-bottom: 0.1rem;
    font-size: 0.9rem;
}

.cart-item-chinese-name {
    font-weight: 500;
    color: var(--cafe-text);
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
    font-family: 'Noto Serif SC', serif;
}

.cart-item-origin {
    color: var(--cafe-muted);
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.cart-item-price {
    color: var(--cafe-muted);
    font-size: 0.9rem;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.quantity-btn {
    background: var(--cafe-bg);
    border: 1px solid var(--cafe-border);
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.quantity-btn:hover {
    background: var(--cafe-accent);
    color: white;
}

.quantity-display {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
}

.remove-item {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    margin-left: 0.5rem;
}

.cart-summary {
    padding: 1.5rem;
    border-top: 1px solid var(--cafe-border);
    background: var(--cafe-bg);
}

.cart-total {
    margin-bottom: 1rem;
}

.cart-total > div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.cart-total .total {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--cafe-accent);
    border-top: 1px solid var(--cafe-border);
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

.free-shipping-notice {
    text-align: center;
    margin-bottom: 1rem;
}

.free-shipping-badge {
    background: #27ae60;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.checkout-btn {
    width: 100%;
    background: var(--cafe-accent);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkout-btn:hover:not(:disabled) {
    background: #4c3426;
    transform: translateY(-2px);
}

.checkout-btn:disabled {
    background: var(--cafe-muted);
    cursor: not-allowed;
    transform: none;
}

/* Cart Toggle Button */
.cart-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--cafe-accent);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.cart-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0,0,0,0.3);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal.open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--cafe-card);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--cafe-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--cafe-accent);
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--cafe-muted);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--cafe-accent);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--cafe-border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--cafe-accent);
}

.order-summary {
    background: var(--cafe-bg);
    padding: 1rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.order-summary h4 {
    color: var(--cafe-accent);
    margin-bottom: 1rem;
}

.order-total {
    text-align: right;
    font-size: 1.2rem;
    color: var(--cafe-accent);
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--cafe-border);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Order Contact Modal Styles */
.contact-options {
    margin: 2rem 0;
}

.contact-options h4 {
    color: var(--cafe-accent);
    margin-bottom: 1.5rem;
    text-align: center;
}

.contact-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-method-btn {
    background: var(--cafe-card);
    border: 2px solid var(--cafe-border);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    text-decoration: none;
    color: var(--cafe-text);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 160px;
    justify-content: center;
}

.contact-method-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    text-decoration: none;
    color: var(--cafe-text);
}

.contact-method-btn .contact-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.contact-method-btn h3 {
    color: var(--cafe-accent);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.contact-method-btn p {
    color: var(--cafe-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.contact-detail {
    font-weight: 600;
    color: var(--cafe-accent);
    font-size: 0.9rem;
}

.whatsapp-btn:hover {
    border-color: #25D366;
    background: rgba(37, 211, 102, 0.1);
}

.phone-btn {
    border-color: #007AFF !important;
    background: rgba(0, 122, 255, 0.1) !important;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2) !important;
}

.phone-btn:hover {
    border-color: #0056CC !important;
    background: rgba(0, 122, 255, 0.2) !important;
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.3) !important;
    transform: translateY(-4px) !important;
}

.wechat-btn:hover {
    border-color: #07C160;
    background: rgba(7, 193, 96, 0.1);
}

.qr-code-container {
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.qr-code {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 2px solid var(--cafe-border);
    object-fit: cover;
}

.qr-fallback {
    width: 80px;
    height: 80px;
    border: 2px solid var(--cafe-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cafe-bg);
}

.order-instructions {
    background: var(--cafe-bg);
    border: 1px solid var(--cafe-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.order-instructions p {
    margin-bottom: 1rem;
    color: var(--cafe-accent);
}

.order-instructions ul {
    margin: 0;
    padding-left: 1.5rem;
}

.order-instructions li {
    margin-bottom: 0.5rem;
    color: var(--cafe-text);
}

/* Contact Section */
.contact-section {
    padding: 50px 0;
    background: var(--cafe-bg);
}

.contact-section h2 {
    text-align: center;
    color: var(--cafe-accent);
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-method {
    background: var(--cafe-card);
    border: 1px solid var(--cafe-border);
    border-radius: 8px;
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: 0 6px 24px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 140px;
}

.contact-method:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.contact-method .contact-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.contact-method h3 {
    color: var(--cafe-accent);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.contact-method p {
    color: var(--cafe-muted);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.3;
}

.contact-btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 2px solid;
}

.whatsapp-btn {
    background: #25D366;
    color: white;
    border-color: #25D366;
}

.whatsapp-btn:hover {
    background: #128C7E;
    border-color: #128C7E;
    transform: translateY(-2px);
}

.email-btn {
    background: #EA4335;
    color: white;
    border-color: #EA4335;
}

.email-btn:hover {
    background: #D33B2C;
    border-color: #D33B2C;
    transform: translateY(-2px);
}

.phone-btn {
    background: var(--cafe-accent);
    color: white;
    border-color: var(--cafe-accent);
}

.phone-btn:hover {
    background: #4c3426;
    border-color: #4c3426;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }
}

@media (max-width: 768px) {
    .delivery-hero .hero-title {
        font-size: 2.5rem;
    }
    
    .delivery-badges {
        flex-direction: column;
        align-items: center;
    }
    
    .category-filter {
        gap: 0.4rem;
        padding: 0 0.5rem;
        overflow-x: auto;
        justify-content: flex-start;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .category-filter::-webkit-scrollbar {
        display: none;
    }
    
    .filter-btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
        border-radius: 15px;
        flex-shrink: 0;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .cart-toggle {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .contact-methods {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .contact-method {
        padding: 1rem 0.5rem;
        min-height: 120px;
    }
    
    .contact-method h3 {
        font-size: 1rem;
    }
    
    .contact-method p {
        font-size: 0.8rem;
    }
    
    .contact-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .delivery-hero {
        padding: 120px 0 60px;
    }
    
    .delivery-hero .hero-title {
        font-size: 2rem;
    }
    
    .delivery-hero .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .info-card {
        padding: 1rem 0.5rem;
        min-height: 100px;
    }
    
    .info-card h3 {
        font-size: 1rem;
    }
    
    .info-card p {
        font-size: 0.8rem;
    }
    
    .product-card {
        margin: 0 1rem;
    }
    
    .cart-toggle {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
    }
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid var(--cafe-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error Messages */
.message {
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-weight: 500;
}

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

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

/* Animation for cart items */
.cart-item {
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Product card animations */
.product-card {
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* QR Code Responsive Styles */
@media (max-width: 768px) {
    .contact-methods-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .contact-method-btn {
        min-height: 140px;
        padding: 1rem;
    }
    
    .qr-code {
        width: 60px;
        height: 60px;
    }
    
    .qr-fallback {
        width: 60px;
        height: 60px;
    }
}
