/* Container Tổng */
.daruma-woo-tabs-container {
    font-family: inherit;
    margin: 40px 0;
    color: #fff;
    /* Chữ mặc định màu trắng */
}

/* Khu vực Tabs Menu */
.daruma-tabs-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}

.daruma-tab-btn {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 4px;
    cursor: pointer;
    display: inline-block;
    padding: 10px 24px;
    transition: all 0.3s ease;
    box-shadow: none !important;
    outline: none !important;
}

.daruma-tab-btn:hover,
.daruma-tab-btn.active {
    background: #965f24 !important;
    /* Màu nâu đất giống hình */
    border-color: #965f24 !important;
}

.daruma-tab-btn .cat-name {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

/* Khu vực Content */
.daruma-tabs-content {
    position: relative;
    min-height: 250px;
}

/* Lưới hiển thị sản phẩm - Chạy ngang */
.daruma-products-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 20px;
    padding-bottom: 20px;
    /* Không gian cho thanh cuộn */
    transition: opacity 0.3s ease;

    /* Làm đẹp thanh cuộn */
    scrollbar-width: thin;
    scrollbar-color: #8b5a2b #111;
}

.daruma-products-grid::-webkit-scrollbar {
    height: 8px;
}

.daruma-products-grid::-webkit-scrollbar-track {
    background: #111;
    border-radius: 4px;
}

.daruma-products-grid::-webkit-scrollbar-thumb {
    background-color: #8b5a2b;
    border-radius: 4px;
}

.daruma-products-grid.loading {
    opacity: 0.3;
    pointer-events: none;
}

/* Thẻ Sản Phẩm Từng Mục */
.daruma-product-item {
    flex: 0 0 calc(25% - 15px);
    /* 4 sản phẩm trên desktop */
    min-width: 240px;
    /* Đảm bảo không bị bóp méo quá nhỏ */
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.daruma-product-item:hover {
    border-color: #c9a050;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.daruma-product-item .product-thumb img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-bottom: 2px solid #800000;
    /* Viền nhỏ đỏ ở dưới ảnh (tùy chọn) */
}

.daruma-product-item .product-info {
    padding: 20px 15px;
    text-align: center;
    background: #0a0a0a;
    /* Nền đen của thẻ sp */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.daruma-product-item .product-action {
    margin-top: auto;
}

.daruma-product-item .product-title {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.daruma-product-item .product-title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

.daruma-product-item .product-title a:hover {
    color: #c9a050;
}

.daruma-product-item .product-price-wrap {
    color: #c9a050;
    /* Giá màu vàng đồng */
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 12px;
}

.daruma-product-item .product-price-wrap del {
    color: #888;
    font-size: 14px;
    font-weight: normal;
    margin-right: 5px;
}

.daruma-product-item .product-rating {
    margin-bottom: 15px;
}

.daruma-product-item .product-rating .star-rating {
    margin: 0 auto;
    color: #c9a050;
    font-size: 12px;
}

/* Nút đặt món */
.daruma-woo-tabs-container .daruma-product-item .product-action a.button {
    display: inline-block;
    background: #e60000 !important;
    /* Đỏ tươi */
    color: #fff !important;
    padding: 10px 25px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 700;
    font-size: 14px;
    transition: background 0.3s;
    border: 1px solid #cc0000 !important;
    text-transform: uppercase;
}

.daruma-woo-tabs-container .daruma-product-item .product-action a.button:hover {
    background: #cc0000 !important;
    /* Đỏ sậm hơn khi hover */
}

/* Hiệu ứng Loading Spinner */
.daruma-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.daruma-loading .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(201, 160, 80, 0.2);
    border-top-color: #c9a050;
    border-radius: 50%;
    animation: daruma-spin 1s linear infinite;
}

@keyframes daruma-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .daruma-product-item {
        flex: 0 0 calc(33.333% - 14px);
    }
}

@media (max-width: 768px) {
    .daruma-tabs-nav {
        gap: 15px;
    }

    .daruma-product-item {
        flex: 0 0 calc(50% - 10px);
    }

    .daruma-tab-btn {
        padding: 8px 16px;
    }

    .daruma-tab-btn .cat-name {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .daruma-tabs-nav {
        gap: 10px;
        margin-bottom: 20px;
    }
    
    /* Chuyển lưới sản phẩm thành 2 cột xếp dọc xuống (không cuộn ngang nữa) */
    .daruma-products-grid {
        flex-wrap: wrap;
        overflow-x: visible;
        gap: 10px; 
        padding-bottom: 0;
    }

    .daruma-product-item {
        flex: 0 0 calc(50% - 5px); 
        min-width: 0; /* Bỏ min-width để tự động bóp vừa 2 cột */
    }
    
    .daruma-tab-btn {
        padding: 6px 12px;
    }
    .daruma-product-item .product-info {
        padding: 10px 8px;
    }
    .daruma-product-item .product-title {
        font-size: 14px;
        margin-bottom: 8px;
    }
    .daruma-product-item .product-price-wrap {
        font-size: 13px;
        margin-bottom: 10px;
    }
    .daruma-woo-tabs-container .daruma-product-item .product-action a.button {
        padding: 6px 10px;
        font-size: 11px;
    }
}