/* --- General Styling --- */
:root {
    --primary-yellow: #FFC300;
    --secondary-dark: #2c3e50;
    --light-bg: #ecf0f1;
    --border-color: #bdc3c7;
    --success-green: #2ecc71;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--secondary-dark);
    background-color: white;
}

a {
    text-decoration: none;
    color: var(--secondary-dark);
}

.top-banner {
    background-color: var(--primary-yellow);
    border-bottom: 3px solid var(--secondary-dark);
    text-align: center;
    padding: 10px 15px;
    font-size: 1.1em;
    font-weight: 700;
    color: var(--secondary-dark);
    text-transform: uppercase;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 25px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    background: white;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-container img {
    max-width: 80px;
    height: auto;
}

.company-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--secondary-dark);
}

.search-login-cart {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-bar {
    position: relative;
}

.search-bar input[type="search"] {
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    width: 250px;
    font-size: 14px;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0 0 10px 10px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 101;
    display: none;
}

.search-result-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.search-result-item:hover {
    background-color: #f5f5f5;
}

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

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    padding: 5px;
    position: relative;
    color: var(--secondary-dark);
}

#cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    line-height: 1;
}

/* NEW: Become a Seller Button Styling */
.seller-btn {
    background-color: var(--success-green);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 0.9em;
}

.seller-btn:hover {
    background-color: #27ae60;
}

/* Menu Bar Styling - Right Aligned */
.menu-bar {
    background-color: var(--secondary-dark);
    padding: 8px 0;
}

.menu-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: flex-end;
}

.menu-items {
    display: flex;
    justify-content: flex-end;
    gap: 25px;
    list-style: none;
}

.menu-items li a {
    color: white;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background-color 0.3s;
    font-size: 0.9em;
}

.menu-items li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Marquee Section */
.marquee-section {
    background: linear-gradient(90deg, var(--primary-yellow), #FFD700, var(--primary-yellow));
    padding: 8px 0;
    overflow: hidden;
}

.marquee-content {
    font-weight: 700;
    color: var(--secondary-dark);
    font-size: 1.1em;
    white-space: nowrap;
}

/* Category Filter Bar */
.category-filter-bar {
    background: var(--light-bg);
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.category-filter-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.category-filter-label {
    font-weight: 600;
    color: var(--secondary-dark);
}

.category-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.category-filter-btn {
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9em;
}

.category-filter-btn:hover {
    background: var(--primary-yellow);
    border-color: var(--primary-yellow);
}

.category-filter-btn.active {
    background: var(--secondary-dark);
    color: white;
    border-color: var(--secondary-dark);
}

/* Category Cards Section */
.category-cards-section {
    padding: 30px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.category-cards-container {
    max-width: 1200px;
    margin: 0 auto;
}

.category-cards-container h2 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--secondary-dark);
    font-size: 1.8rem;
}

.category-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.category-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.category-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.category-card h3 {
    padding: 15px;
    text-align: center;
    font-size: 1.1rem;
}

/* Category Slider Section */
.category-slider-section {
    padding: 20px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.category-slider {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.category-slider h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--secondary-dark);
    font-size: 1.8rem;
}

.slider-container {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.slider-track {
    display: flex;
    transition: transform 0.5s ease;
}

.slider-slide {
    min-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slider-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.slider-nav {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    gap: 10px;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background 0.3s;
}

.slider-dot.active {
    background: var(--secondary-dark);
}

/* Product Card Styling */
.product-section {
    padding: 20px 40px;
    text-align: center;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.product-card {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    padding: 15px;
    text-align: left;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.product-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
    cursor: zoom-in;
    margin-bottom: 10px;
}

.rating .star {
    color: var(--primary-yellow);
}

.product-price {
    font-size: 1.3em;
    font-weight: 700;
    color: #e74c3c;
}

.add-to-cart-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--secondary-dark);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    font-weight: 600;
    transition: background-color 0.3s, font-size 0.3s;
}

/* New Style for City Name in Main Card View */
.product-city {
    font-size: 0.85em;
    color: var(--success-green);
    font-weight: 600;
    border: 1px solid var(--success-green);
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 5px;
}

/* --- NEW STYLE FOR ADD TO CART SUCCESS STATE --- */
.add-to-cart-btn.success {
    background-color: var(--success-green);
    font-size: 1.8em;
    font-weight: 700;
    animation: pulse-add 0.5s ease-out;
}

@keyframes pulse-add {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* --- END NEW STYLE --- */

/* Pagination Styling */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination-btn {
    padding: 8px 15px;
    background: var(--secondary-dark);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.pagination-btn:hover {
    background: #1a2530;
}

.pagination-btn.active {
    background: var(--primary-yellow);
    color: var(--secondary-dark);
}

.load-more-btn {
    padding: 10px 25px;
    background: var(--success-green);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    margin: 20px auto;
    display: block;
}

/* Testimonial Section Styles */
.testimonial-section {
    padding: 60px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.testimonial-section .container {
    max-width: 1200px;
    margin: 0 auto;
}

.testimonial-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    font-weight: 700;
    color: white;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.testimonial-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.rating-stars {
    margin-bottom: 20px;
    text-align: center;
}

.rating-stars .star {
    color: #FFD700;
    font-size: 1.5rem;
    margin: 0 2px;
}

.testimonial-text {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 25px;
    font-style: italic;
    flex-grow: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.author-info h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.author-info p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Enhanced Footer Styles */
.footer {
    background: var(--secondary-dark);
    color: white;
    margin-top: 0;
}

.footer-main {
    padding: 60px 20px 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section h3 {
    color: var(--primary-yellow);
    font-size: 1.3rem;
    margin-bottom: 20px;
    font-weight: 600;
    border-bottom: 2px solid var(--primary-yellow);
    padding-bottom: 10px;
    display: inline-block;
}

.footer-section p {
    line-height: 1.6;
    margin-bottom: 20px;
    color: #bdc3c7;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
    display: block;
}

.footer-section ul li a:hover {
    color: var(--primary-yellow);
    padding-left: 10px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary-yellow);
    transform: translateY(-3px);
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: #bdc3c7;
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    color: #bdc3c7;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 25px;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-yellow);
}

/* Modals/Popups */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 25px;
    border-radius: 10px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
    width: 95%;
    max-width: 900px;
}

#cart-popup .modal-content {
    width: 350px;
    height: 100%;
    position: fixed;
    top: 0;
    right: 0;
    border-radius: 0;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: var(--secondary-dark);
    background: none;
    border: none;
}

/* Zoom Popup Styling */
#zoom-popup .modal-content {
    background: transparent;
    padding: 0;
    width: 90%;
    max-width: 90vw;
}

.zoom-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
    z-index: 1001;
}

.zoom-control-btn {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
}

/* Product Detail Popup specific */
#product-detail-popup .modal-content {
    max-width: 900px;
}

#product-details-content {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

#product-details-content>div {
    flex: 1;
    min-width: 300px;
}

#main-product-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
}

#thumbnail-gallery {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#thumbnail-gallery img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 5px;
    border: 2px solid #ddd;
    cursor: pointer;
    transition: border-color 0.3s;
}

#thumbnail-gallery img:hover {
    border-color: var(--primary-yellow);
}

#detail-table th,
#detail-table td {
    padding: 8px;
    border: 1px solid #eee;
    text-align: left;
}

#detail-table th {
    background-color: var(--light-bg);
    font-weight: 600;
}

/* --- STYLES FOR CITY AND PUBLISHER IN DETAIL POPUP --- */

/* City: Green and Animated */
@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(46, 204, 113, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
    }
}

.city-detail {
    color: var(--success-green);
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 5px;
    animation: pulse-green 1.5s infinite;
    display: inline-block;
}

/* Publisher: Red Border */
.publisher-detail {
    color: red;
    font-weight: 600;
    border: 2px solid red;
    padding: 3px 8px;
    border-radius: 3px;
    display: inline-block;
}

/* --- End STYLES --- */

/* --- Print Specific CSS for clean invoice printing --- */
@media print {
    body * {
        visibility: hidden;
    }

    #invoice-popup,
    #invoice-popup * {
        visibility: visible;
    }

    #invoice-popup {
        position: absolute;
        left: 0;
        top: 0;
    }

    .modal-content {
        max-height: none !important;
        box-shadow: none !important;
        border: none !important;
    }

    .close-btn,
    #download-invoice-btn,
    #print-receipt-btn {
        display: none !important;
    }
}

/* Circular Progress Bar Styles */
.circular-progress {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: conic-gradient(#10B981 0%, #E5E7EB 0%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.circular-progress::before {
    content: "";
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: white;
}

.progress-value {
    position: relative;
    font-size: 18px;
    font-weight: 600;
    color: #10B981;
}

/* Responsive Design */
@media (max-width: 768px) {
    .category-slider h2 {
        font-size: 1.5rem;
    }

    .slider-image {
        height: 200px;
    }

    .product-section {
        padding: 20px 15px;
    }

    .search-bar input[type="search"] {
        width: 180px;
    }

    .menu-items {
        gap: 15px;
        flex-wrap: wrap;
    }

    .menu-items li a {
        padding: 6px 10px;
        font-size: 0.9em;
    }

    .company-name {
        font-size: 1.2rem;
    }

    .logo-container img {
        max-width: 60px;
    }

    .category-cards {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .category-filter-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .seller-btn {
        padding: 6px 12px;
        font-size: 0.8em;
    }

    .testimonial-section {
        padding: 40px 15px;
    }

    .testimonial-section h2 {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    .testimonial-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .testimonial-card {
        padding: 20px;
    }

    .footer-main {
        padding: 40px 15px 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .category-slider h2 {
        font-size: 1.3rem;
    }

    .slider-image {
        height: 150px;
    }

    .header {
        flex-direction: column;
        gap: 10px;
    }

    .search-login-cart {
        width: 100%;
        justify-content: space-between;
    }

    .menu-items {
        gap: 10px;
    }

    .menu-items li a {
        padding: 5px 8px;
        font-size: 0.85em;
    }

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

    .logo-container img {
        max-width: 50px;
    }

    .category-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-filters {
        gap: 5px;
    }

    .category-filter-btn {
        padding: 6px 12px;
        font-size: 0.8em;
    }

    .seller-btn {
        display: none;
    }

    .testimonial-section h2 {
        font-size: 1.8rem;
    }

    .testimonial-text {
        font-size: 1rem;
    }

    .testimonial-author {
        flex-direction: column;
        text-align: center;
    }

    .footer-section h3 {
        font-size: 1.1rem;
    }

    .social-links {
        justify-content: center;
    }
}
/* Add these styles to your existing CSS */

/* QR Code Container Styles */
.qr-code-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
}

.qr-code-header {
    text-align: center;
    color: white;
    margin-bottom: 15px;
}

.qr-code-header h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.qr-code-header p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.qr-code-image-container {
    background: white;
    padding: 15px;
    border-radius: 10px;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.qr-code-image {
    width: 200px;
    height: 200px;
    display: block;
}

.upi-details {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
}

.upi-detail-item {
    background: white;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}

.upi-detail-item:last-child {
    margin-bottom: 0;
}

.upi-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 5px;
}

.upi-value {
    font-weight: 700;
    font-size: 1.1rem;
}

.payment-instruction {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    margin-top: 10px;
}

/* Enhanced Progress Bar Animation */
@keyframes progress-grow {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.circular-progress {
    animation: progress-grow 0.5s ease-out;
}

/* Payment Success Animation */
@keyframes payment-success {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    70% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.payment-success {
    animation: payment-success 0.6s ease-out;
}