/* 
==================================================
RAMESH KIRANA STORE
==================================================
Design Concept: Smart Modern Kirana
*/

:root {
    /* Color System */
    --primary: #1b4332; /* Deep Green */
    --primary-hover: #081c15;
    --secondary: #40916c; /* Fresh Green */
    --accent: #fca311; /* Warm Yellow / Golden */
    --accent-hover: #e5930f;
    --cream: #fbf8f1;
    --white: #ffffff;
    --charcoal: #2b2b2b;
    --gray-light: #f4f4f4;
    --gray-mid: #e0e0e0;
    --text-main: #333333;
    --text-muted: #6c757d;
    
    /* Bootstrap Overrides */
    --bs-primary: #1b4332;
    --bs-primary-rgb: 27, 67, 50;
    --bs-secondary: #40916c;
    --bs-secondary-rgb: 64, 145, 108;
    --bs-warning: #fca311;
    --bs-warning-rgb: 252, 163, 17;

    
    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-accent: 'Manrope', sans-serif;
    
    /* Effects */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --border-radius-lg: 16px;
}

.text-primary { color: var(--primary) !important; }
.bg-primary { background-color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.bg-secondary { background-color: var(--secondary) !important; }
.text-accent { color: var(--accent) !important; }
.bg-accent { background-color: var(--accent) !important; }
.bg-cream { background-color: var(--cream) !important; }

/* Buttons */
body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--cream);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
}

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

a:hover {
    color: var(--primary);
}

.btn-primary {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--primary);
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: var(--border-radius);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    color: var(--primary);
    box-shadow: var(--shadow-md);
}

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

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

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--accent);
    border-radius: 2px;
}

.section-padding {
    padding: 5rem 0;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.loading-content {
    text-align: center;
    color: var(--white);
}

.loading-icon {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

.loading-content h2 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-30px);}
    60% {transform: translateY(-15px);}
}

/* Header & Navbar */
.site-header {
    background-color: var(--white);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.navbar-brand .brand-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.nav-link {
    font-family: var(--font-accent);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--charcoal) !important;
    text-transform: uppercase;
    padding: 1rem 0.75rem !important;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--secondary) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--secondary);
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 80%;
}

.search-icon-btn {
    color: var(--primary);
    font-size: 1.2rem;
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 6rem 0;
    background-color: var(--primary);
    overflow: hidden;
}

.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(27,67,50,0.95) 0%, rgba(8,28,21,0.8) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
}

.hero-content h1 {
    color: var(--white);
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-content .lead {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.hero-visual {
    position: relative;
    z-index: 2;
    height: 400px;
}

.grocery-composition {
    position: relative;
    width: 100%;
    height: 100%;
}

.basket-img {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 300px;
    z-index: 5;
    animation: float 6s ease-in-out infinite;
}

.floating-product {
    position: absolute;
    background: var(--white);
    padding: 10px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 4;
}

.fp-1 { top: 10%; left: 0; animation: float 5s ease-in-out infinite 0.5s; }
.fp-2 { top: 40%; right: 0; animation: float 7s ease-in-out infinite 1s; }
.fp-3 { bottom: 20%; left: 10%; animation: float 6s ease-in-out infinite 1.5s; }

.floating-product img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.floating-product span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--charcoal);
}

.freshness-badge {
    position: absolute;
    top: 20%;
    right: 20%;
    background: var(--accent);
    color: var(--primary);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1.1;
    z-index: 6;
    transform: rotate(15deg);
    box-shadow: var(--shadow-md);
    animation: pulse 2s infinite;
}

@keyframes float {
    0% { transform: translateY(0px) translateX(-50%); }
    50% { transform: translateY(-20px) translateX(-50%); }
    100% { transform: translateY(0px) translateX(-50%); }
}

@keyframes pulse {
    0% { transform: rotate(15deg) scale(1); }
    50% { transform: rotate(15deg) scale(1.05); }
    100% { transform: rotate(15deg) scale(1); }
}

/* Quick Category Bar */
.quick-categories {
    background-color: var(--white);
    padding: 2rem 0;
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 10;
    margin-top: -30px;
    border-radius: var(--border-radius-lg);
}

.category-shortcut {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    padding: 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.category-shortcut:hover {
    background-color: var(--cream);
    transform: translateY(-5px);
}

.cat-icon {
    width: 60px;
    height: 60px;
    background-color: var(--gray-light);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: var(--secondary);
    transition: var(--transition);
}

.category-shortcut:hover .cat-icon {
    background-color: var(--secondary);
    color: var(--white);
}

.category-shortcut span {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--charcoal);
    text-transform: uppercase;
}

/* Smart Grocery Aisles */
.smart-aisle-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .smart-aisle-container {
        grid-template-columns: 1fr;
    }
}

.smart-aisle {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    overflow: hidden;
    position: relative;
    height: 100%;
}

.smart-aisle::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background-color: transparent;
    transition: var(--transition);
}

.smart-aisle:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.smart-aisle:hover::before {
    background-color: var(--secondary);
}

.aisle-icon {
    font-size: 2rem;
    color: var(--primary);
    width: 50px;
    text-align: center;
    flex-shrink: 0;
}

.aisle-content {
    flex-grow: 1;
}

.aisle-content h3 {
    margin-bottom: 0.25rem;
    font-size: 1.15rem;
}

.aisle-content p {
    margin-bottom: 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
}

.aisle-action {
    opacity: 0;
    transform: translateX(-20px);
    transition: var(--transition);
}

.smart-aisle:hover .aisle-action {
    opacity: 1;
    transform: translateX(0);
}

/* Product Cards */
.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-img-wrapper {
    position: relative;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    background: var(--gray-light);
    overflow: hidden;
}

.product-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
    transition: transform 0.5s ease;
}

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

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent);
    color: var(--primary);
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    z-index: 2;
}

.product-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 0.75rem;
    color: var(--secondary);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.product-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--charcoal);
}

.product-unit {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.product-action {
    margin-top: auto;
}

/* Footer */
.site-footer {
    background-color: var(--primary);
    color: var(--cream);
    padding: 5rem 0 2rem;
}

.footer-brand {
    margin-bottom: 2rem;
}

.footer-title {
    color: var(--accent);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-desc {
    color: var(--gray-mid);
    font-size: 0.9rem;
}

.footer-heading {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.footer-links ul li {
    margin-bottom: 0.75rem;
}

.footer-links a, .footer-contact a {
    color: var(--gray-mid);
    font-size: 0.9rem;
}

.footer-links a:hover, .footer-contact a:hover {
    color: var(--accent);
}

.footer-contact address {
    color: var(--gray-mid);
    font-size: 0.9rem;
    font-style: normal;
    line-height: 1.8;
}

.reg-number {
    font-size: 0.8rem;
    color: var(--secondary);
    margin-top: 1rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
}

.copyright {
    color: var(--gray-mid);
    font-size: 0.85rem;
}

.footer-legal-links li {
    margin-right: 1rem;
}

.footer-legal-links li:last-child {
    margin-right: 0;
}

.footer-legal-links a, .footer-legal-links button {
    color: var(--gray-mid);
    font-size: 0.85rem;
    text-decoration: none;
}

.footer-legal-links a:hover, .footer-legal-links button:hover {
    color: var(--accent);
}

.btn-link.manage-cookies-btn {
    padding: 0;
    border: none;
    background: none;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(43, 43, 43, 0.95);
    color: var(--white);
    padding: 1.5rem 0;
    z-index: 1050;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
    backdrop-filter: blur(5px);
}

/* Forms */
.form-control, .form-select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-mid);
    border-radius: var(--border-radius);
}

.form-control:focus, .form-select:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 0.25rem rgba(64, 145, 108, 0.25);
}

/* Utility */
.bg-cream { background-color: var(--cream); }
.bg-white { background-color: var(--white); }
.text-primary-color { color: var(--primary); }
