/* Pragati Mahila Swa Sahayata Samuh - Custom Styles */

:root {
    --primary-color: #c2185b; /* Pink/Magenta from logo */
    --secondary-color: #1976d2; /* Blue from logo */
    --accent-color: #ff6f00; /* Orange from logo */
    --text-dark: #2C3E50;
    --text-light: #7F8C8D;
    --bg-light: #F8F9FA;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Typography */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Noto+Sans+Devanagari:wght@400;500;600;700&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    padding-top: 120px; /* Account for fixed navbar height */
}

.brand-text {
    font-family: 'Noto Sans Devanagari', sans-serif;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 2.2rem;
    margin-bottom: 2px;
}

/* Navigation */
.navbar {
    box-shadow: var(--shadow);
    padding: 1rem 0;
    z-index: 1030; /* Ensure navbar stays above other content */
    background-color: #f8f9fa !important; /* Ensure solid background */
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.navbar-brand img {
    /* border-radius: 50%; - Removed to eliminate rounded corners */
    height: 80px !important;
    width: auto;
    object-fit: contain;
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Brand Info and FSSAI Styling */
.brand-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
}

.fssai-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.fssai-logo {
    height: 12px;
    width: auto;
    opacity: 0.9;
    transition: opacity 0.3s ease;
    display: block;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.fssai-number {
    font-size: 0.7rem;
    color: #666;
    white-space: nowrap;
}

.fssai-logo:hover {
    opacity: 1;
}

/* FSSAI info in navbar right corner */
.fssai-info-navbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    margin-left: 10px;
}

.fssai-info-navbar .fssai-logo {
    height: 16px;
}

.fssai-info-navbar .fssai-number {
    font-size: 0.65rem;
    color: #555;
    font-weight: 500;
}

/* Responsive adjustments for mobile devices */
@media (max-width: 768px) {
    body {
        padding-top: 80px; /* Reduce padding for mobile */
    }
    
    .navbar-brand img {
        height: 60px !important; /* Smaller logo on mobile */
    }
    
    .brand-text {
        font-size: 1.6rem; /* Smaller brand text */
    }
    
    .fssai-info {
        flex-direction: row;
        align-items: center;
        gap: 6px;
    }
    
    .fssai-logo {
        height: 10px;
    }
    
    .fssai-number {
        font-size: 0.65rem;
    }
    
    .brand-info {
        line-height: 1.1;
    }
    
    /* Improve mobile navigation */
    .navbar-collapse {
        background-color: #f8f9fa;
        padding: 15px;
        border-radius: 8px;
        box-shadow: var(--shadow);
    }
    
    /* Make buttons more tappable on mobile */
    .btn {
        padding: 10px 20px;
        font-size: 1rem;
        margin: 5px 0;
    }
    
    /* Improve form elements on mobile */
    input, select, textarea {
        font-size: 16px !important; /* Prevent zoom on iOS */
        padding: 12px !important;
    }
}

/* Cart Badge Styling */
.nav-link {
    position: relative;
}

/* Cart Badge Styling - specific to nav links */
.nav-link .badge {
    font-size: 0.65rem;
    position: absolute;
    top: -8px;
    right: -12px;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 10;
    transition: all 0.3s ease;
}

/* General badge styling - only for custom badges, not Bootstrap badges */
.custom-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35em 0.65em;
    border-radius: 0.375rem;
    display: inline-block;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
}

/* Cart Icon Styling */
.nav-link .fas.fa-shopping-cart {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

/* Cart badge hover effects */
.nav-link:hover .badge {
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

.nav-link:hover .fas.fa-shopping-cart {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding-top: 100px;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/pattern.png') repeat;
    opacity: 0.1;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-image {
    position: relative;
    z-index: 2;
}

.hero-buttons .btn {
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.hero-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Feature Cards */
.feature-card {
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #E9ECEF;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(194, 24, 91, 0.1);
    border-radius: 50%;
}

/* Category Cards */
.category-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.category-card:hover {
    transform: scale(1.05);
}

.category-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.7));
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover .category-overlay {
    opacity: 1;
}

.category-card:hover img {
    transform: scale(1.1);
}

/* Buttons */
.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
    padding: 10px 25px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #a91750;
    border-color: #a91750;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(194, 24, 91, 0.4);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
    padding: 10px 25px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Forms */
.form-control {
    border-radius: 10px;
    border: 2px solid #E9ECEF;
    padding: 12px 15px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(194, 24, 91, 0.25);
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: 15px 15px 0 0 !important;
    font-weight: 600;
}

/* Product Cards */
.product-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

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

.product-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.original-price {
    text-decoration: line-through;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Cart and Order Process Styling */
.cart-item {
    border: 1px solid #E9ECEF;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    transition: box-shadow 0.3s ease;
}

.cart-item:hover {
    box-shadow: var(--shadow);
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 35px;
    height: 35px;
    border: 1px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: var(--primary-color);
    color: white;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-summary {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    position: sticky;
    top: 120px;
}

/* Mobile-friendly order process */
@media (max-width: 768px) {
    .cart-item {
        padding: 10px 0;
    }
    
    .cart-item-image {
        width: 60px;
        height: 60px;
    }
    
    .cart-summary {
        position: relative;
        top: 0;
        margin-top: 20px;
        margin-bottom: 20px;
    }
    
    /* Checkout form improvements */
    .checkout-form .form-group {
        margin-bottom: 15px;
    }
    
    .checkout-form label {
        font-weight: 500;
        margin-bottom: 8px;
        display: block;
    }
    
    /* Order confirmation page */
    .order-confirmation {
        padding: 15px;
    }
}

/* Home page quantity selector */
.quantity-selector-home {
    margin: 10px 0;
}

.quantity-selector-home .form-label {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.quantity-selector-home .input-group {
    max-width: 120px;
    margin: 0 auto;
}

.quantity-selector-home .quantity-input {
    border-left: none;
    border-right: none;
    text-align: center;
    font-weight: 500;
    background: white;
}

.quantity-selector-home .btn {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.quantity-selector-home .btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.quantity-selector-home .quantity-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(194, 24, 91, 0.25);
}

/* Footer */
footer {
    background: linear-gradient(135deg, #2C3E50, #34495E);
    color: #FFFFFF;
}

footer a {
    color: #FFFFFF;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--accent-color);
}

/* Enhanced Footer Contact Styles */
footer .social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    margin-right: 10px;
}

footer .social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(194, 24, 91, 0.4);
}

footer .contact-info li {
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
}

footer .contact-info li:last-child {
    border-bottom: none;
}

footer .contact-info a {
    color: #FFFFFF;
    font-weight: 500;
}

footer .contact-info a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

footer .business-details {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    color: #FFFFFF;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
        padding-top: 120px;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        margin-top: 2rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .category-card {
        margin-bottom: 2rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(194, 24, 91, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Alerts */
.alert {
    border-radius: 10px;
    border: none;
    font-weight: 500;
}

.alert-success {
    background: rgba(25, 118, 210, 0.1);
    color: var(--secondary-color);
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #856404;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a91750;
}

/* Utility Classes */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

.shadow-custom {
    box-shadow: var(--shadow);
}

.rounded-custom {
    border-radius: 15px;
}

/* Product Cards */
.product-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

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

.product-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-info {
    padding: 1.5rem;
}

.product-category {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.product-price {
    margin-bottom: 1rem;
}

.product-price .price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-actions .btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.add-to-cart-btn {
    background: var(--primary-color);
    border: none;
    color: white;
}

.add-to-cart-btn:hover {
    background: #a91750;
    transform: translateY(-1px);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Featured badge */
.product-card .badge {
    font-size: 0.7rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
}

/* Responsive adjustments for product cards */
@media (max-width: 768px) {
    .product-image-container {
        height: 180px;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .product-name {
        font-size: 1rem;
    }
    
    .product-price .price {
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .product-image-container {
        height: 160px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}