/* Top Bar Styling */
.top-bar {
    background: linear-gradient(to right, #13618C, #297B35);
    color: white;
    padding: 15px 0;
    font-size: 13px;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modes {
    display: flex;
    gap: 10px;
    background-color: rgba(16, 24, 40, 0.2);
    padding: 5px;
    border-radius: 6px;
}

.modes a {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    background-color: rgba(16, 24, 40, 0.2);
    text-decoration: none;
}

.modes a.active {
    background-color: #FCFCFD;
    color: #1D2939;
}

.modes a:hover.active {
    background-color: #e6e3e3;
}

.modes a:not(.active) {
    background-color: transparent;
    color: #E4E7EC;
}

.modes a:hover:not(.active) {
    background-color: rgba(16, 24, 40, 0.2);
}

.modes a img {
    width: 16px;
    height: 16px;
}

.contact-info {
    color: #FCFCFD;
    font-size: 13px;
    white-space: nowrap;
}

.contact-info a {
    color: #FCFCFD;
    text-decoration: none;
}

/* Header Styling */
header { 
    padding: 15px 0; 
    border-bottom: 1px solid #eee; 
    background-color: #fff; 
}

.container.header-flex { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    gap: 20px; 
}

.logo {
    flex-shrink: 0;
}

.logo img {
    height: 40px;
    width: auto;
}

.search-bar { 
    flex-grow: 1; 
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    background-color: #f9f9f9;
}

.search-bar img {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.search-bar input { 
    flex-grow: 1;
    border: none;
    background: none;
    padding: 0;
    font-size: 13px;
    outline: none;
}

.search-bar input::placeholder {
    color: #999;
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.cart-icon {
    position: relative;
    cursor: pointer;
}

.cart-icon img {
    width: 24px;
    height: 24px;
}

.cart-icon .badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #d32f2f;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.header-icons img {
    width: 24px;
    height: 24px;
}

/* ============================================
   CART POPUP STYLES
   ============================================ */

/* Cart Overlay */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Cart Popup */
.cart-popup {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background-color: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    overflow: hidden;
}

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

/* Cart Header */
.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #E5E7EB;
    flex-shrink: 0;
}

.cart-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1D2939;
    margin: 0;
}

.cart-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-header-cart-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.cart-header-cart-btn img {
    width: 18px;
    height: 18px;
}

.cart-header-cart-btn:hover {
    background: #F9FAFB;
}

.cart-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #6B7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-close-btn:hover {
    color: #1D2939;
}

/* Cart Body */
.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Empty Cart State */
.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
}

.cart-empty-icon {
    width: 80px;
    height: 80px;
    background-color: #F3F4F6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 40px;
}

.cart-empty h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1D2939;
    margin: 0 0 12px 0;
}

.cart-empty p {
    font-size: 14px;
    font-weight: 500;
    color: #475467;
    margin: 0 0 24px 0;
    line-height: 1.6;
}

.cart-empty-btn {
    background: linear-gradient(to right, #13618C, #297B35);
    color: #FCFCFD;
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s;
}

.cart-empty-btn:hover {
    transform: translateX(4px);
}

/* Store Section */
.cart-store-section {
    margin-bottom: 24px;
}

.cart-store-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #F3F4F6;
}

.cart-store-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-store-icon {
    width: 24px;
    height: 24px;
    background-color: #E5E7EB;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #6B7280;
}

.cart-store-name {
    font-size: 14px;
    font-weight: 600;
    color: #1D2939;
    margin: 0;
}

.cart-view-store {
    font-size: 12px;
    color: #0F766E;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.cart-view-store:hover {
    text-decoration: underline;
}

/* Cart Item */
.cart-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    background-color: #F9FAFB;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid #F3F4F6;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    background-color: white;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

.cart-item-name {
    font-size: 13px;
    font-weight: 600;
    color: #1D2939;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.cart-item-options {
    font-size: 12px;
    color: #6B7280;
    margin: 0 0 8px 0;
}

.cart-item-option {
    display: inline-block;
    margin-right: 12px;
}

.cart-item-option label {
    font-weight: 600;
}

.cart-item-prices {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.cart-item-price {
    font-size: 14px;
    font-weight: 700;
    color: #DC2626;
}

.cart-item-original-price {
    font-size: 12px;
    color: #9CA3AF;
    text-decoration: line-through;
}

.cart-item-qty-control {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: white;
    border: 1px solid #D1D5DB;
    border-radius: 4px;
    width: fit-content;
    padding: 2px;
}

.qty-btn {
    background: none;
    border: none;
    color: #6B7280;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: color 0.2s;
}

.qty-btn:hover {
    color: #1D2939;
}

.qty-input {
    width: 30px;
    border: none;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #1D2939;
}

.cart-item-delete {
    background: none;
    border: none;
    color: #9CA3AF;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.cart-item-delete:hover {
    color: #DC2626;
}

.cart-skeleton-store {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.cart-skeleton-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    background-color: #F9FAFB;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid #F3F4F6;
}

.cart-skeleton-thumb {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    background: linear-gradient(90deg, #eaecf0 25%, #f2f4f7 37%, #eaecf0 63%);
    background-size: 400% 100%;
    animation: cartSkeletonShimmer 1.2s ease-in-out infinite;
    flex-shrink: 0;
}

.cart-skeleton-content {
    flex: 1;
}

.cart-skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #eaecf0 25%, #f2f4f7 37%, #eaecf0 63%);
    background-size: 400% 100%;
    animation: cartSkeletonShimmer 1.2s ease-in-out infinite;
}

.cart-skeleton-store-title {
    width: 45%;
}

.cart-skeleton-store-link {
    width: 22%;
}

.cart-skeleton-title {
    width: 82%;
    margin-bottom: 10px;
}

.cart-skeleton-sub {
    width: 60%;
    margin-bottom: 10px;
}

.cart-skeleton-price {
    width: 35%;
}

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

/* Cart Footer */
.cart-footer {
    border-top: 1px solid #E5E7EB;
    padding: 20px;
    flex-shrink: 0;
    background-color: white;
}

.cart-login-message {
    background-color: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    margin-bottom: 16px;
}

.cart-login-message p {
    font-size: 13px;
    color: #4B5563;
    margin: 0 0 12px 0;
    line-height: 1.6;
}

.cart-signin-btn {
    background: linear-gradient(to right, #0F766E, #2D7A4D);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s;
}

.cart-signin-btn:hover {
    transform: translateY(-2px);
}

.cart-totals {
    margin-bottom: 16px;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #6B7280;
    margin-bottom: 8px;
}

.cart-total-amount {
    font-size: 20px;
    font-weight: 700;
    color: #1D2939;
    display: flex;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid #E5E7EB;
}

.cart-checkout-btn {
    background: linear-gradient(to right, #0F766E, #2D7A4D);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s;
}

.cart-checkout-btn:hover {
    transform: translateY(-2px);
}

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

    .cart-item {
        padding: 12px;
    }

    .cart-item-image {
        width: 70px;
        height: 70px;
    }

    .cart-item-name {
        font-size: 12px;
    }
}

