﻿.hero-carousel {
    height: 400px;
    overflow: hidden;
    background: #f8f9fa;
}

.hero-carousel .carousel-item img {
    height: 400px;
    object-fit: cover;
    width: 100%;
}

.category-card {
    padding: 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: white;
    border: 1px solid #dee2e6;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.category-card.loading {
    opacity: 0.7;
    transform: scale(0.98);
}

.category-card.loading:after {
    content: "載入中...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8em;
}

.category-icon img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
}

.category-icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
}

.service-item {
    padding: 30px 20px;
    transition: all 0.3s ease;
}

.service-item:hover,
.service-item.hovered {
    transform: translateY(-5px);
}

/* Floating helper styles */
.floating-helper {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1050; /* above most elements */
}

.floating-helper-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007bff, #0056d6);
    color: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
    border: none;
}

.floating-helper-btn:hover,
.floating-helper-btn:focus {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    outline: none;
}

.helper-icon { font-size: 22px; line-height:1; }

.cart-badge {
    position: absolute;
    right: -6px;
    top: -6px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 12px;
    background: #dc3545;
    color: #fff;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Small label for wide screens (optional) */
@media (min-width: 992px) {
    .floating-helper .helper-label {
        display: inline-block;
        margin-left: 10px;
        padding: 8px 12px;
        background: rgba(0,0,0,0.7);
        color: white;
        border-radius: 20px;
        font-size: 14px;
        white-space: nowrap;
        margin-right: 8px;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-carousel {
        height: 250px;
    }
    
    .hero-carousel .carousel-item img {
        height: 250px;
    }
    
    .category-card {
        padding: 15px;
    }
    
    .service-item {
        padding: 20px 15px;
    }

    .floating-helper { right: 12px; bottom: 12px; }
    .floating-helper-btn { width: 48px; height: 48px; }
    .cart-badge { min-width: 18px; height: 18px; font-size: 11px; }
}

/* Loading animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.loading-content {
    animation: pulse 1.5s ease-in-out infinite;
}
