/* Base Styles */
:root {
    --primary-color: #0B4270;
    --secondary-color: #2A7D3D;
    --accent-color: #00A651;
    --text-color: #333;
    --light-bg: #f8f8f8;
    --white: #fff;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition-base: all 0.3s ease;
}

body {
    background: var(--light-bg);
    color: var(--text-color);
}

fieldset {
    border: 1px solid red;
    text-align: center;
}



/* Product Card Styles */

.product-item {
    display: flex;
    flex-direction: column;
    background-color: var(--white);
    border-radius: 14px;
    border: 1px solid rgba(11, 66, 112, 0.08);
    box-shadow: 0 6px 18px rgba(11, 66, 112, 0.08);
    overflow: hidden;
    position: relative;
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
    height: 100%;
}

.product-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 28px rgba(11, 66, 112, 0.16);
    border-color: rgba(42, 125, 61, 0.35);
}

.product-item .img-container {
    display: block;
    position: relative;
    width: 100%;
    padding: 12px 12px 0 12px;
    text-decoration: none;
}

.product-item .img-cover {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-item .img-product {
    object-fit: cover;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    transition: transform 0.35s ease;
}

.product-item:hover .img-product {
    transform: scale(1.04);
}

/* Badges on Image */
.product-badge {
    position: absolute;
    z-index: 2;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    padding: 5px 10px;
    border-radius: 6px;
    line-height: 1.1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.product-badge.badge-status {
    top: 18px;
    left: 18px;
    color: var(--white);
    text-transform: uppercase;
}

.product-badge.badge-selling {
    background: linear-gradient(135deg, #2A7D3D, #4F9840);
}

.product-badge.badge-outofstock {
    background: #64748b;
}

.product-badge.badge-discount {
    top: 18px;
    right: 18px;
    background: linear-gradient(135deg, #ff6116, #e53935);
    color: var(--white);
    font-size: 12px;
    padding: 5px 9px;
}

/* Product Card Body */
.product-item .product-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 14px 14px 16px 14px;
}

.product-item .product-name {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    min-height: 2.8em;
    text-align: center;
    color: var(--primary-color);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-item .product-name a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.25s ease;
}

.product-item .product-name a:hover {
    color: var(--secondary-color);
}

/* Price Section */
.product-item .product-price-section {
    border-top: 1px dashed #e2e8f0;
    padding-top: 10px;
    margin-top: auto;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.product-item .member-price {
    font-size: 16px;
    font-weight: 800;
    color: #d92b2b;
    line-height: 1.2;
    white-space: nowrap;
}

.product-item .price-discount-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 5px;
    background-color: rgba(255, 97, 22, 0.12);
    color: #ff6116;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.product-item .market-price {
    font-size: 13px;
    font-weight: 500;
    color: #94a3b8;
    text-decoration: line-through;
    white-space: nowrap;
}

.box-light {
    padding: 10px;
    background: #f9f9f9;
    border-radius: 6px;
    margin: 10px 0;
}

.info-block section {
    width: 132px;
    border: 1px solid #2A7D3D;
    position: relative;
    border-radius: 4px;
}



.bg-gradient {
    background: linear-gradient(30deg, #0B4270, #2A7D3D, #4F9840, #84C341, floralwhite) !important;
    background-size: 400% 400% !important;
    animation: gradient 15s ease infinite !important;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Banner Styles */
.carousel-banner {
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    background-color: #0B4270;
}

.carousel-banner .carousel-item {
    position: relative;
    transition: transform .6s ease-in-out;
}

.carousel-banner .carousel-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    will-change: transform;
}

#wide-device-carousel .carousel-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 1600 / 533;
    object-fit: contain;
}

#mobile-carousel .carousel-item img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Carousel Transitions */
.carousel-banner .carousel-inner {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.carousel-banner .carousel-item-next:not(.carousel-item-start),
.carousel-banner .active.carousel-item-end {
    transform: translateX(100%);
}

.carousel-banner .carousel-item-prev:not(.carousel-item-end),
.carousel-banner .active.carousel-item-start {
    transform: translateX(-100%);
}

.carousel-banner .carousel-item-next.carousel-item-start,
.carousel-banner .carousel-item-prev.carousel-item-end {
    transform: translateX(0);
}

.carousel-banner .carousel-item-next,
.carousel-banner .carousel-item-prev,
.carousel-banner .carousel-item.active {
    display: block;
    transition: transform .6s ease-in-out;
}

/* Banner Controls */
.carousel-banner .carousel-control-prev,
.carousel-banner .carousel-control-next {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: var(--transition-base);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 5;
}

.carousel-banner:hover .carousel-control-prev,
.carousel-banner:hover .carousel-control-next {
    opacity: 0.9;
}

.carousel-banner .carousel-control-prev:hover,
.carousel-banner .carousel-control-next:hover {
    opacity: 1;
    background: #ffffff;
    transform: translateY(-50%) scale(1.08);
}

.carousel-banner .carousel-control-prev {
    left: 20px;
}

.carousel-banner .carousel-control-next {
    right: 20px;
}

.carousel-banner .carousel-control-prev-icon,
.carousel-banner .carousel-control-next-icon {
    width: 20px;
    height: 20px;
    filter: invert(1) grayscale(100);
}

/* Banner Indicators */
.carousel-banner .carousel-indicators {
    bottom: 12px;
    gap: 8px;
    margin-bottom: 0;
}

.carousel-banner .carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid var(--white);
    transition: var(--transition-base);
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.carousel-banner .carousel-indicators button.active {
    background-color: var(--white);
    transform: scale(1.25);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* Responsive Styles */
@media (min-width: 576px) {
    #wide-device-carousel {
        display: block;
    }
    
    #mobile-carousel {
        display: none;
    }
}