/* Enhanced E-Commerce Styles */

/* ==================== Announcement Banner ==================== */
.announcement-banner {
    background: #274433;
    color: #ffffff;
    text-align: center;
    padding: 10px 20px;
    font-size: 0.85rem;
    position: relative;
    z-index: 1000;
}

.announcement-banner p {
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.announcement-banner .close-banner {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    font-size: 20px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.announcement-banner .close-banner:hover {
    opacity: 1;
}

.announcement-banner.hidden {
    display: none;
}

/* ==================== Cart Icon ==================== */
.cart-icon-wrapper {
    position: relative;
    margin-left: 15px;
    display: inline-block;
    cursor: pointer;
    vertical-align: middle;
}

.cart-icon {
    font-size: 24px;
    color: inherit;
    transition: transform 0.3s;
}

.cart-icon:hover {
    transform: scale(1.1);
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #274433;
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

/* ==================== Cart Sidebar ==================== */
.cart-sidebar {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100dvh;
    background: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

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

.cart-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
}

.cart-sidebar-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #274433;
}

.close-cart {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #274433;
    transition: transform 0.3s;
}

.close-cart:hover {
    transform: scale(1.1);
}

.cart-items {
    padding: 20px;
    min-height: calc(100dvh - 200px);
}

.cart-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

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

.cart-item img,
#cartSidebar .cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.cart-item-details,
#cartSidebar .cart-item-details {
    flex: 1;
}

#cartSidebar .cart-item-details h4 {
    margin: 0 0 5px;
    font-size: 0.95rem;
    color: #274433;
}

#cartSidebar .cart-item-details .price {
    color: #274433;
    font-weight: 600;
    font-size: 1rem;
}

.cart-item-details .quantity,
#cartSidebar .cart-item-details .quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

#cartSidebar .cart-item-details .quantity button {
    background: #274433;
    color: #fff;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

#cartSidebar .cart-item-details .quantity span {
    min-width: 30px;
    text-align: center;
}

#cartSidebar .cart-item-remove {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 20px;
    padding: 0;
}

#cartSidebar .cart-item-remove:hover {
    color: #274433;
}

.cart-sidebar-footer {
    position: sticky;
    bottom: 0;
    width: 100%;
    padding: 20px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #274433;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.cart-overlay.active {
    display: block;
    opacity: 1;
}

/* ==================== Product Hover Carousel ==================== */
.product-item {
    position: relative;
}

.product-item img {
    transition: opacity 0.3s ease;
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }

    .cart-icon-wrapper {
        margin-left: 10px;
    }
}