
/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* CSS Variables */
:root {
    --primary: #2c3e50;
    --secondary: #4a69bd;
    --accent: #ff6b6b;
    --success: #ff6b6b;
    --light: #f8f9fa;
    --medium: #6c757d;
    --dark: #2c3e50;
    --white: #ffffff;
    --border: #e9ecef;
    --shadow: rgba(0, 0, 0, 0.1);
    --radius: 0.5rem;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(45deg, var(--accent), #ff7979);
    color: var(--white);
}

.btn-primary:hover {
    background: linear-gradient(45deg, #e55656, #ff6b6b);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--light);
    transform: translateY(-2px);
}

.btn-success {
    background: var(--accent);
    color: var(--white);
}

.btn-success:hover {
    background: #65242a;
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--medium);
    border: 1px solid transparent;
}

.btn-ghost:hover {
    color: var(--primary);
    background: rgba(108, 117, 125, 0.1);
}

.btn-destructive {
    background: #e74c3c;
    color: var(--white);
}

.btn-destructive:hover {
    background: #c0392b;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-loading .btn-text {
    display: none;
}

.btn-loading .btn-loading {
    display: inline;
}

.btn-text {
    display: inline;
}

.btn-loading {
    display: none;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        transform: translateY(20px); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0); 
        opacity: 1; 
    }
}

@keyframes bounceIn {
    0%, 20%, 53%, 80%, 100% { 
        transform: translate3d(0,0,0); 
    }
    40%, 43% { 
        transform: translate3d(0, -8px, 0); 
    }
    70% { 
        transform: translate3d(0, -4px, 0); 
    }
    90% { 
        transform: translate3d(0, -2px, 0); 
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

.bounce-in {
    animation: bounceIn 0.6s ease-out;
}

/* Navigation */
.navbar {
    background: var(--white);
    box-shadow: 0 2px 10px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 700;
    transition: color 0.3s ease;
}

.nav-logo a:hover {
    color: var(--secondary);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--medium);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: rgba(108, 117, 125, 0.1);
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.welcome-text {
    color: var(--medium);
    font-size: 0.9rem;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--medium);
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: 6rem 2rem;
    text-align: center;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
}

.hero-icon {
    font-size: 4rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: bounceIn 0.6s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    animation: slideUp 0.3s ease-out;
}

.accent-text {
    color: var(--accent);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
    animation: slideUp 0.3s ease-out 0.1s both;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: slideUp 0.3s ease-out 0.2s both;
}

.hero-buttons .btn {
    min-width: 250px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Features Section */
.features {
    padding: 5rem 2rem;
    background: var(--white);
}

.features-header {
    text-align: center;
    margin-bottom: 4rem;
}

.features-header h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.features-header p {
    font-size: 1.25rem;
    color: var(--medium);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: var(--radius);
    background: var(--light);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px var(--shadow);
}

.feature-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
    color: var(--white);
}

.accent-bg { background: var(--accent); }
.success-bg { background: var(--success); }
.secondary-bg { background: var(--secondary); }

.feature-card h3 {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--medium);
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    /* background-image: linear-gradient(to right top, #2b0c0b, #381214, #47181b, #561e23, #65242a, #722c31, #7f3339, #8c3b41, #9a454a, #a85053, #b65a5c, #c46565); */
    background-image: linear-gradient(to top, #2b0c0b, #381214, #47181b, #561e23, #65242a, #722c31, #7f3339, #8c3b41, #9a454a, #a85053, #b65a5c, #c46565);
}

.seller-auth {
    /* background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); */
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    /* background-image: linear-gradient(to right top, #2b0c0b, #381214, #47181b, #561e23, #65242a, #722c31, #7f3339, #8c3b41, #9a454a, #a85053, #b65a5c, #c46565); */
    background-image: linear-gradient(to top, #2b0c0b, #381214, #47181b, #561e23, #65242a, #722c31, #7f3339, #8c3b41, #9a454a, #a85053, #b65a5c, #c46565);

}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    animation: slideUp 0.3s ease-out;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header i {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.seller-icon {
    color: var(--success) !important;
}

.auth-header h2 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--medium);
}

.auth-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(74, 105, 189, 0.1);
}

.auth-toggle {
    text-align: center;
    margin-bottom: 1rem;
}

.auth-toggle p {
    color: var(--medium);
    margin-bottom: 0.5rem;
}

.link-button {
    background: none;
    border: none;
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

.seller-link {
    color: var(--success) !important;
}

.auth-back {
    text-align: center;
}

/* Products Page */
.products-header {
    background: var(--white);
    padding: 4rem 2rem;
    text-align: center;
    box-shadow: 0 2px 10px var(--shadow);
}

.products-header h1 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.products-header p {
    font-size: 1.25rem;
    color: var(--medium);
    max-width: 600px;
    margin: 0 auto;
}

.products-section {
    margin: 3rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 2rem;
    color: var(--primary);
}

.section-header i {
    color: var(--accent);
}

.badge {
    background: var(--accent);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 4px 20px var(--shadow);
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px var(--shadow);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-content {
    padding: 1.5rem;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.store-badge {
    background: var(--accent);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
}
/* .addcart{
    background-color: #cc7e7e;
    color: var(--border);
    padding: 0.25rem 0.75rem;
    border-radius: 5px;
    font-size: 0.8rem;
} */
.product-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.product-description {
    color: var(--medium);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.loading-state,
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--medium);
}

.loading-state i,
.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.fa-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Dashboard */
.dashboard-header {
    background: var(--white);
    padding: 2rem;
    border-bottom: 1px solid var(--border);
}

.dashboard-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-title h1 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.dashboard-title p {
    color: var(--medium);
}

.seller-info {
    text-align: right;
}

.seller-name {
    color: var(--primary);
    font-weight: 600;
}

.store-name {
    color: var(--accent);
    font-size: 1rem;
    text-transform: capitalize;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin: 2rem 0;
}

.dashboard-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 4px 20px var(--shadow);
    overflow: hidden;
}

.card-header {
    background: var(--light);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary);
}

.card-content {
    padding: 1.5rem;
}

.product-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.products-container {
    max-height: 600px;
    overflow-y: auto;
}

/* Dashboard Product Card */
.dashboard-product-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    background-color: var(--white);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 600px; /* Limit max width for larger screens */
    margin-left: auto;
    margin-right: auto;
       /* Dark background to match the image */
    box-shadow: 0 4px 20px var(--shadow);
}

.dashboard-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow);
}

/* Product Image */
.dashboard-product-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius);
    flex-shrink: 0;
    background-color: #fff; /* White background for image container */
}

/* Product Content */
.dashboard-product-content {
    flex: 1;
    min-width: 0; /* Prevent content overflow */
    color: var(--white); /* White text to contrast dark background */
}

/* Product Name */
.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent); /* Pinkish accent for name */
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Product Description */
.product-description {
    font-size: 0.9rem;
    color: var(--medium); /* Grayish color for description */
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Product Header */
.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

/* Store Badge */
.store-badge {
    background: var(--accent);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Product Price */
.product-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent); /* Match price color with accent */
}

/* Product Actions (Cart Icon) */
.product-header i {
    font-size: 1.2rem;
    color: var(--accent);
    cursor: pointer;
    transition: color 0.3s ease;
}

.product-header i:hover {
    color: var(--dark); /* White on hover for contrast */
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-product-card {
        flex-direction: column;
        align-items: stretch;
        padding: 0.75rem;
        max-width: 100%; /* Full width on mobile */
    }

    .dashboard-product-image {
        width: 100%;
        height: auto;
        max-height: 150px; /* Adjusted for mobile */
    }

    .dashboard-product-content {
        padding: 0.5rem 0;
    }

    .product-name {
        font-size: 1rem;
        white-space: normal;
    }

    .product-description {
        font-size: 0.85rem;
        -webkit-line-clamp: 3; /* More lines on mobile */
    }

    .product-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .product-header i {
        margin-top: 0.5rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .dashboard-product-card {
        max-width: 500px;
    }

    .dashboard-product-image {
        width: 70px;
        height: 70px;
    }
}
/* Footer */
.footer {
    background: var(--primary);
    color: var(--white);
    padding: 3rem 2rem 1rem;
    margin-top: 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--white);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    font-size: 1.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #555;
    color: #bbb;
}

/* Notifications */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: var(--white);
    border-left: 4px solid var(--success);
    box-shadow: 0 4px 20px var(--shadow);
    border-radius: var(--radius);
    padding: 1rem;
    max-width: 300px;
    z-index: 1001;
    animation: slideIn 0.3s ease-out;
}

.notification.error {
    border-left-color: #e74c3c;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-icon {
    font-size: 1.25rem;
}

.notification-icon.success {
    color: var(--success);
}
.item-description-info{
    color: var(--dark);
    text-transform: capitalize;
    font-size: 1rem;
}
.notification-icon.error {
    color: #e74c3c;
}

.notification-close {
    background: none;
    border: none;
    color: var(--medium);
    cursor: pointer;
    margin-left: auto;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        min-width: 200px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header .container {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

.product-list{
    display: flex;
    flex-direction: row;
    gap: 1rem;
    margin-bottom: 10px;
}
.line{
    width: 100%;
    height: 1px;
    background-color: var(--border);
    margin: 20px 0;
}
.delete-btn{
    background-color: var(--accent);
    border: none;
    color: #fff;
    cursor: pointer;
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    height: 30px;
    padding: 0 10px;
    font-size: 1rem;
    border-radius: 3px;
    transform: translate(0px);
}
/* display: flex; */
.cart-container {
    background-color: #803238;
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%; /* Default width for responsiveness */
    max-width: 600px; /* Maximum width on larger screens */
    margin: 0 auto;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: 0 4px 20px var(--shadow);
    z-index: 1000; /* Ensure it stays on top */
}
.popup-cart-container {
    background-color: var(--dark);
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%; /* Default width for responsiveness */
    max-width: 600px; /* Maximum width on larger screens */
    margin: 0 auto;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: 0 4px 20px var(--shadow);
    z-index: 1000; /* Ensure it stays on top */
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    margin: 1rem 0;
    background-color: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 2px 4px var(--shadow);
    position: relative;
    gap: 1rem;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius);
    flex-shrink: 0;
}

.cart-item-divider {
    width: 1px;
    height: 80%;
    background-color: var(--border);
}

.cart-item-details {
    flex-grow: 1;
    padding: 0 1rem;
}

.cart-item-name {
    font-size: 1.1rem;
    color: var(--dark);
    margin: 0 0 0.5rem 0;
}

.cart-item-description {
    font-size: 0.9rem;
    color: var(--medium);
    margin: 0 0 0.5rem 0;
}

.cart-item-price {
    font-size: 1rem;
    font-weight: bold;
    color: var(--primary);
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.quantity-btn {
    background-color: var(--light);
    border: 1px solid var(--border);
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    border-radius: var(--radius);
    color: var(--dark);
    transition: background-color 0.2s;
}

.quantity-btn:hover {
    background-color: var(--border);
}

.quantity-display {
    min-width: 2rem;
    text-align: center;
    color: var(--dark);
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.btn-add-to-cart {
    background-color: var(--dark);
    color: var(--white);
    margin-right: 0.5rem;
}

.btn-add-to-cart:hover {
    background-color: #47181b;
}

.btn-buy-now {
    background-color: var(--accent);
    color: var(--white);
}

.btn-buy-now:hover {
    background-color: #381214;
}

.btn-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: var(--medium);
    cursor: pointer;
    font-size: 1.2rem;
}

.btn-close:hover {
    color: var(--dark);
}

/* Responsive Design */
@media (max-width: 768px) {
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.75rem;
    }

    .cart-item-image {
        width: 80px;
        height: 80px;
    }

    .cart-item-divider {
        display: none;
    }

    .cart-item-details {
        padding: 0;
        width: 100%;
    }

    .quantity-control {
        justify-content: center;
        width: 100%;
    }

    .btn-add-to-cart,
    .btn-buy-now {
        width: 100%;
        margin: 0.25rem 0;
    }

    .cart-container {
        width: 95%; /* Slightly wider on smaller screens */
        padding: 15px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .cart-container {
        width: 80%;
    }
}
.totalCartBtn{
    background-color:#edebeb;
    color: var(--primary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    /* padding: 0.5rem 1rem; */
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.5s;
}
.totalCartBtn:hover{
    background-color: #dcdcdc;
    color: var(--primary);
}

/* CSS Variables */
:root {
    --primary: #2c3e50;
    --secondary: #4a69bd;
    --accent: #ff6b6b;
    --success: #ff6b6b;
    --light: #f8f9fa;
    --medium: #6c757d;
    --dark: #2c3e50;
    --white: #ffffff;
    --border: #e9ecef;
    --shadow: rgba(0, 0, 0, 0.1);
    --radius: 0.5rem;
}
/* Cart Container */
.cart-container {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 700px;
    margin: 0 auto;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius);
    box-shadow: 0 8px 30px var(--shadow);
    color: var(--white);
    z-index: 1000;
}

/* Cart Header */
.cart-header {
    width: 100%;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 1.5rem;
    text-align: center;
}

.cart-header h2 {
    font-size: 1.8rem;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Cart Item */
.cart-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.cart-item:hover {
    transform: translateY(-5px);
}

.cart-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius);
    background-color: var(--white);
    flex-shrink: 0;
}

.cart-item-details {
    flex: 1;
    padding: 0 1rem;
    color: var(--white);
}

.cart-item-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

.cart-item-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-item-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--success);
}

/* Quantity Control */
.quantity-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.quantity-btn {
    background: var(--white);
    border: 1px solid var(--border);
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius);
    color: var(--dark);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.quantity-btn:hover {
    background: var(--accent);
    color: var(--white);
}

.quantity-display {
    min-width: 2rem;
    text-align: center;
    color: var(--white);
}

/* Cart Actions */
.cart-actions {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.btn-checkout {
    background: linear-gradient(45deg, var(--success), #ff8787);
    color: var(--white);
    padding: 0.75rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-checkout:hover {
    background: linear-gradient(45deg, #e74c3c, var(--accent));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.btn-clear {
    background: var(--white);
    color: var(--dark);
    padding: 0.75rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--white);
}

.btn-clear:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.btn-close:hover {
    color: var(--white);
}

/* Responsive Design */
@media (max-width: 768px) {
    .cart-container {
        width: 95%;
        padding: 1.5rem;
    }

    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }

    .cart-item-image {
        width: 80px;
        height: 80px;
    }

    .cart-item-details {
        padding: 0;
        margin-top: 0.5rem;
    }

    .cart-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn-checkout,
    .btn-clear {
        width: 100%;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .cart-container {
        width: 85%;
    }

    .cart-item-image {
        width: 90px;
        height: 90px;
    }
}

/* Checkout Cart Container */
.checkOut-Cart {
    display: block;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    margin: 0 auto;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 10px 30px var(--shadow);
    z-index: 1000;
    color: var(--dark);
    overflow-y: scroll;
    max-height: 100vh; /* Limit height for better scrolling */
}

/* Checkout Header */
.checkOut-header {
    width: 100%;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.5rem;
    text-align: center;
}

.checkOut-header h2 {
    font-size: 1.8rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Checkout Item */
.checkOut-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.checkOut-item:hover {
    transform: translateY(-5px);
}

.checkOut-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius);
    background-color: var(--white);
    flex-shrink: 0;
}

.checkOut-item-details {
    flex: 1;
    padding: 0 1rem;
}

.checkOut-item-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.checkOut-item-description {
    font-size: 0.9rem;
    color: var(--medium);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.checkOut-item-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
}

/* Checkout Quantity Control */
.checkOut-quantity-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.checkOut-quantity-btn {
    background: var(--white);
    border: 1px solid var(--border);
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius);
    color: var(--dark);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.checkOut-quantity-btn:hover {
    background: var(--accent);
    color: var(--white);
}

.checkOut-quantity-display {
    min-width: 2rem;
    text-align: center;
    color: var(--dark);
}

/* Checkout Actions */
.checkOut-actions {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.btn-checkout-final {
    background: linear-gradient(45deg, var(--success), #ff8787);
    color: var(--white);
    padding: 0.75rem 2rem;
    border: 2px solid #2b0c0b;
    border-radius: var(--radius);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-checkout-final:hover {
    background: linear-gradient(45deg, #e74c3c, var(--accent));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.btn-cancel {
    background: var(--white);
    color: var(--dark);
    padding: 0.75rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--border);
}

.btn-cancel:hover {
    background: var(--light);
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-close-checkout {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--medium);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.btn-close-checkout:hover {
    color: var(--dark);
}

/* Responsive Design for Checkout Cart */
@media (max-width: 768px) {
    .checkOut-Cart {
        width: 95%;
        padding: 1.5rem;
    }

    .checkOut-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }

    .checkOut-item-image {
        width: 80px;
        height: 80px;
    }

    .checkOut-item-details {
        padding: 0;
        margin-top: 0.5rem;
    }

    .checkOut-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn-checkout-final,
    .btn-cancel {
        width: 100%;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .checkOut-Cart {
        width: 85%;
    }

    .checkOut-item-image {
        width: 90px;
        height: 90px;
    }
}
.chaeckCartBox {
    display: flex;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 700px;
    margin: 0 auto;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    /* background: #e55656;  */
    background-image: linear-gradient(to right bottom, #e55656, #e55a5a, #e55f5f, #e46363, #e46767, #cf5f62, #bb575d, #a65057, #7a3d45, #512a32, #2b191d, #000000);
    border-radius: var(--radius);
    box-shadow: 0px 18px 30px #717171;
    z-index: 1000;
    max-height: 80vh;
    overflow-y: scroll;
}

.checkout-header {
    width: 100%;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
}

.checkout-header h2 {
    font-size: 1.8rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.close-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: var(--medium);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: var(--dark);
}

.checkout-item-info {
    display: flex;
    align-items: center;
    width: 100%;
    color: #ffffff;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: transparent;
    /* background-image: linear-gradient(to right bottom, #f5f5f5, #eeeeee, #e7e7e7, #e0e0e0, #d9d9d9, #d7d7d7, #d4d4d4, #d2d2d2, #d4d4d4, #d5d5d5, #d7d7d7, #d9d9d9); */
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    /* overflow-y: scroll; */
}

.checkout-item:hover {
    transform: translateY(-5px);
}

.item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius);
    background-color: var(--white);
    flex-shrink: 0;
}

.item-details {
    flex: 1;
    padding: 0 1rem;
    color: var(--white);
}

.item-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--medium);
}

.item-description {
    font-size: 0.9rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--success);
}

.item-quantity-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.quantity-decrement,
.quantity-increment {
    background: var(--white);
    border: 1px solid var(--border);
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius);
    color: var(--dark);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.quantity-decrement:hover,
.quantity-increment:hover {
    background: var(--accent);
    color: var(--white);
}

.quantity-value {
    min-width: 2rem;
    text-align: center;
    color: var(--dark);
}
.quantity-value-info {
    min-width: 2rem;
    text-align: center;
    color: var(--dark);
}
.checkout-actions {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.checkout-button {
    background: linear-gradient(45deg, var(--success), #ff8787);
    color: var(--white);
    padding: 0.75rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    transition: all 0.3s ease;
}

.checkout-button:hover {
    background: linear-gradient(45deg, #e74c3c, var(--accent));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.clear-cart-button {
    background: var(--light);
    color: var(--dark);
    padding: 0.75rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--border);
}

.clear-cart-button:hover {
    background: var(--white);
    color: var(--primary);
    transform: translateY(-2px);
}

.clear-cart-button-info {
    background: var(--medium);
    color: var(--border);
    padding: 0.75rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--border);
}

.clear-cart-button-info:hover {
    background: var(--white);
    color: var(--primary);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .checkout-cart-wrapper {
        width: 95%;
        padding: 1.5rem;
    }

    .checkout-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }

    .item-image {
        width: 80px;
        height: 80px;
    }

    .item-details {
        padding: 0;
        margin-top: 0.5rem;
    }

    .checkout-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .checkout-button,
    .clear-cart-button {
        width: 100%;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .checkout-cart-wrapper {
        width: 85%;
    }

    .item-image {
        width: 90px;
        height: 90px;
    }
}

/* Dark Mode Adaptations */
@media (prefers-color-scheme: dark) {
    .checkout-cart-wrapper {
        background: var(--primary);
        color: var(--white);
    }

    .checkout-header h2 {
        color: var(--white);
    }

    .close-btn {
        color: var(--light);
    }

    .close-btn:hover {
        color: var(--white);
    }

    .checkout-item {
        background: var(--dark);
        color: var(--white);
    }

    .item-name {
        color: var(--primary);
    }

    .item-description {
        color: var(--dark);
    }

    .item-price {
        color: var(--success);
    }

    .quantity-decrement,
    .quantity-increment {
        background: var(--dark);
        color: var(--light);
    }

    .quantity-decrement:hover,
    .quantity-increment:hover {
        background: var(--accent);
        color: var(--white);
    }

    .quantity-value {
        color: var(--white);
    }

    .checkout-button {
        background: linear-gradient(45deg, var(--success), #ff8787);
    }

    .clear-cart-button {
        background: var(--dark);
        color: var(--white);
        border: 2px solid var(--white);
    }

    .clear-cart-button:hover {
        background: var(--secondary);
        color: var(--white);
    }
}
#cartVal{
    margin-left: 5px;
}
/* Ensure proper alignment and overflow handling */
@media (max-width: 480px) {
    .cart-item-details {
        font-size: 0.9rem;
    }

    .quantity-btn {
        padding: 0.2rem 0.4rem;
    }

    .quantity-display {
        min-width: 1.5rem;
    }

    .btn {
        padding: 0.4rem 0.8rem;
    }}