/* View Toggle Styles */
.view-toggle-container {
    display: flex;
    justify-content: center;
    margin: 15px 0 25px 0;
}

.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    padding: 6px 14px;
    border-radius: 100px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.toggle-wrapper:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.toggle-text {
    font-size: 0.8rem;
    font-weight: 700;
    color: #999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    user-select: none;
    padding: 4px 8px;
    border-radius: 20px;
}

.toggle-text:hover {
    color: #666;
    background: rgba(0, 0, 0, 0.02);
}

.toggle-text.active {
    color: #1a1a2e;
}

/* The switch - modern design */
.switch {
    position: relative;
    display: inline-block;
    width: 54px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e2e8f0;
    transition: .4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 34px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

input:checked+.slider {
    background-color: #10b981;
}

input:checked+.slider:before {
    transform: translateX(26px);
}

/* Active pulse effect */
.switch:active .slider:before {
    width: 26px;
}

input:focus+.slider {
    box-shadow: 0 0 1px #10b981;
}

.brand-discount-card {
    background: #ffffff;
    border-top: 0 !important;
    border-left: 5px solid #10b981 !important;
    display: flex;
    flex-direction: column;
    padding: 18px 24px;
    min-height: auto;
}

.brand-discount-card:hover {
    border-left-color: #059669 !important;
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.1);
}

.brand-discount-card .brand-name {
    font-size: 1rem;
    margin-bottom: 2px;
    color: #1a1a2e;
    letter-spacing: -0.3px;
}

.brand-discount-card .discount-badge-large {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 8px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 8px 0;
}

.meta-tag {
    font-size: 0.7rem;
    padding: 2px 10px;
    border-radius: 100px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

/* Grouped Brand Card Styles */
.main-brand-header {
    border-bottom: 2px solid #f0f2f5;
    padding-bottom: 12px;
    margin-bottom: 15px !important;
}

.main-brand-header .brand-name {
    font-size: 1.2rem !important;
    font-weight: 800 !important;
    color: #059669;
}

.brand-entry {
    padding: 8px 0;
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.entry-divider {
    height: 1px;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.01));
    margin: 12px 0;
}

.brand-discount-card .items-list {
    margin-top: 5px !important;
    padding: 10px !important;
    background: rgba(16, 185, 129, 0.03) !important;
}

.category-tag {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.vehicle-tag {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #dbeafe;
}

.brand-discount-card .items-list {
    margin-top: 15px;
    background: rgba(255, 255, 255, 0.7);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.15);
    flex-grow: 1;
}

.brand-discount-card .item-detail {
    font-size: 0.95rem;
    color: #4a4a4a;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.05);
    line-height: 1.4;
}

.brand-discount-card .bullet {
    color: #10b981;
    margin-right: 8px;
    font-weight: 900;
}

.coming-soon-badge {
    display: inline-block;
    background: #f0f2f5;
    color: #666;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid #e0e0e0;
}

.brand-view-active .brand-discount-card:has(.coming-soon-badge) {
    opacity: 0.85;
    border-left-color: #9e9e9e !important;
}

/* Bulk Orders Page Styles */

.page-nav {
    background: white;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 50px;
}

.nav-link {
    color: #888;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 4px 0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    position: absolute;
    left: 20px;
}

.nav-link:hover {
    color: #1a1a2e;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
    flex: 1;
    text-align: center;
}

.bulk-intro {
    background: linear-gradient(135deg, #FFDC52 0%, #FFE87C 100%);
    padding: 32px 24px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 32px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.bulk-intro h2 {
    font-size: 2rem;
    color: #1a1a2e;
    margin: 0 0 12px 0;
    font-weight: 800;
}

.bulk-intro p {
    font-size: 1.1rem;
    color: #3a3a3a;
    margin: 0;
    font-weight: 500;
}

.bulk-section {
    margin-bottom: 10px;
}

.section-header {
    background: white;
    padding: 20px 24px;
    border-radius: 10px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.section-header h3 {
    font-size: 1.6rem;
    color: #1a1a2e;
    margin: 0 0 8px 0;
    font-weight: 700;
}

.section-subtitle {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
    font-weight: 500;
}

.bulk-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 1000px;
    margin: 0 auto;
}

.bulk-card {
    background: white;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.bulk-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.supplier-card {
    border-left: 4px solid #4CAF50;
}

.supplier-card:hover {
    border-color: #45a049;
    background: linear-gradient(135deg, #ffffff 0%, #f0fff4 100%);
}

.kargo-card {
    border-left: 4px solid #2196F3;
}

.kargo-card:hover {
    border-color: #1976D2;
    background: linear-gradient(135deg, #ffffff 0%, #e3f2fd 100%);
}

.fixed-card {
    border-left: 4px solid #FF9800;
}

.fixed-card:hover {
    border-color: #F57C00;
    background: linear-gradient(135deg, #ffffff 0%, #fff3e0 100%);
}

.discount-badge-large {
    display: inline-block;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 0;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.supplier-card .discount-badge-large {
    background: linear-gradient(135deg, #00C853 0%, #00AE45 100%);
    box-shadow: 0 4px 12px rgba(0, 200, 83, 0.3);
}

.kargo-badge {
    background: linear-gradient(135deg, #2979FF 0%, #1565C0 100%);
    box-shadow: 0 4px 12px rgba(41, 121, 255, 0.3);
}

.contact-badge {
    background: linear-gradient(135deg, #9E9E9E 0%, #757575 100%);
    box-shadow: 0 2px 8px rgba(158, 158, 158, 0.3);
    font-size: 0.85rem;
}

.card-content {
    margin-top: 0;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.brand-name {
    font-size: 1.3rem;
    color: #1a1a2e;
    margin: 0;
    font-weight: 700;
    flex: 1;
}

.supplier-name {
    font-size: 0.95rem;
    color: #666;
    margin: 8px 0 0 0;
    font-weight: 500;
}

.items-list {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.items-label {
    font-size: 0.9rem;
    color: #1a1a2e;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.item-detail {
    font-size: 0.85rem;
    color: #555;
    margin: 4px 0;
    line-height: 1.5;
    padding-left: 8px;
}

.item-detail strong {
    color: #1a1a2e;
    font-weight: 700;
}

.no-data {
    text-align: center;
    color: #999;
    padding: 40px;
    font-size: 1.1rem;
    grid-column: 1 / -1;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .page-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .page-title {
        text-align: left;
        font-size: 1.3rem;
    }

    .nav-link {
        text-align: center;
    }

    .bulk-intro h2 {
        font-size: 1.5rem;
    }

    .bulk-intro p {
        font-size: 0.95rem;
    }

    .section-header h3 {
        font-size: 1.3rem;
    }

    .bulk-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .brand-name {
        font-size: 1.1rem;
    }

    .discount-badge-large {
        font-size: 0.9rem;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .bulk-intro {
        padding: 24px 16px;
    }

    .section-header {
        padding: 16px;
    }

    .bulk-card {
        padding: 16px;
    }
}


/* Animation for cards */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bulk-card {
    animation: slideIn 0.3s ease forwards;
}

.bulk-card:nth-child(1) {
    animation-delay: 0.05s;
}

.bulk-card:nth-child(2) {
    animation-delay: 0.1s;
}

.bulk-card:nth-child(3) {
    animation-delay: 0.15s;
}

.bulk-card:nth-child(4) {
    animation-delay: 0.2s;
}

.bulk-card:nth-child(5) {
    animation-delay: 0.25s;
}

.bulk-card:nth-child(6) {
    animation-delay: 0.3s;
}

/* Categories View Styles */
.categories-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.categories-container.brand-view-active {
    grid-template-columns: 1fr;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.category-card {
    background: white;
    padding: 30px 24px;
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 160px;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    border-color: #FFDC52;
    background: linear-gradient(135deg, #ffffff 0%, #fffdf0 100%);
}

.category-card h3 {
    font-size: 1.4rem;
    color: #1a1a2e;
    margin: 0 0 8px 0;
    font-weight: 700;
}

.category-card p {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
    font-weight: 500;
}

/* Category Detail View Header */
.category-view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    border-bottom: 2px solid #f0f2f5;
    margin-left: 10px;
}

.back-to-categories {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: #f0f2f5;
    color: #1a1a2e;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
    white-space: nowrap;
}

.back-to-categories:hover {
    background: #e4e6e9;
    transform: translateX(-4px);
}

.category-title-main {
    font-size: 1.1rem;
    color: #1a1a2e;
    margin: 0;
    font-weight: 500;
    text-align: right;
}

/* Product Card Variants for Bulk */
.product-card-variant {
    border-left: 0;
    border-top: 4px solid #f0f0f0;
    margin-top: 8px;
}

.product-card-variant:hover {
    border-top-color: #FFDC52;
}

.bulk-product-name {
    font-size: 1.05rem;
    color: #1a1a2e;
    margin: 0;
    font-weight: 600;
    line-height: 1.3;
    flex: 1;
}

.product-main-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 4px 0;
}

.product-pricing-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    width: 100%;
}

.price-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.discount-badge-category {
    background: #10b981;
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 800;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
    letter-spacing: 0.5px;
}

.bulk-pricing {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    margin-top: 12px;
}

.cost-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #666;
    font-weight: 700;
}

.price-value {
    font-size: 1rem;
    color: #0d9488;
    font-weight: 500;
}

.mrp-value {
    font-size: 0.9rem;
    color: #888;
    text-decoration: line-through;
    margin-left: 4px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .categories-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .category-card {
        padding: 20px 12px;
        min-height: 120px;
    }

    .category-card h3 {
        font-size: 1.1rem;
    }

    .category-title-main {
        font-size: 1.1rem;
    }
}

/* Cart Specific Styles */
.product-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
}

.add-to-cart-btn {
    background: #FFDC52;
    color: #1a1a2e;
    border: none;
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 10px rgba(255, 220, 82, 0.3);
    display: flex;
    align-items: center;
}

.add-to-cart-btn:hover {
    background: #1a1a2e;
    color: #FFDC52;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(26, 26, 46, 0.3);
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f0f2f5;
    padding: 4px 8px;
    border-radius: 8px;
}

.qty-btn {
    background: white;
    border: 1px solid #ddd;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s;
    color: #1a1a2e;
}

.qty-btn:hover {
    background: #f8f9fa;
    border-color: #10b981;
    color: #10b981;
}

.qty-display {
    font-weight: 800;
    min-width: 20px;
    text-align: center;
    font-size: 0.95rem;
}

/* Floating Cart Button */
.floating-cart-btn {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 100px;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap;
}

.floating-cart-btn:hover {
    transform: translateX(-50%) scale(1.08) translateY(-5px);
    box-shadow: 0 15px 40px rgba(245, 158, 11, 0.5);
}

.cart-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.cart-text {
    font-weight: 700;
    font-size: 0.95rem;
}

.cart-count-badge {
    background: white;
    color: #f59e0b;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 50%;
    font-size: 0.85rem;
}

/* Cart Modal */
.cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: flex-end;
    z-index: 2000;
    transition: all 0.3s;
}

.cart-modal.active {
    display: flex;
}

.cart-modal-content {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: 24px 24px 0 0;
    padding: 24px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.cart-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f2f5;
}

.cart-header-row h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #1a1a2e;
}

.close-cart-btn {
    background: #f0f2f5;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-items-list {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 8px;
}

.cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f8f9fa;
}

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

.cart-item-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.cart-item-price {
    font-size: 0.85rem;
    color: #059669;
    font-weight: 600;
}

.cart-qty-controls {
    margin-left: 16px;
}

.cart-footer {
    border-top: 2px solid #f0f2f5;
    padding-top: 20px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.total-line {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1a1a2e;
}

.complete-order-btn {
    width: 100%;
    background: #25d366;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 12px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    transition: all 0.2s;
}

.complete-order-btn:hover {
    background: #128c7e;
    transform: translateY(-2px);
}

.clear-cart-btn {
    width: 100%;
    background: transparent;
    color: #ef4444;
    border: 1px solid #fee2e2;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
}

.clear-cart-btn:hover {
    background: #fef2f2;
}

.empty-cart-msg {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .floating-cart-btn {
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        padding: 10px 20px;
    }

    .cart-text {
        display: none;
    }
}