/* ==========================================================================
   1. GLOBAL STYLES & RESET
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #FF9900;
    --secondary-color: #146EB4;
    --text-dark: #111;
    --text-light: #565959;
    --bg-light: #FFFFFF;
    --bg-gray: #F7F7F7;
    --border-color: #E8E8E8;
    --shadow-light: 0 2px 5px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

/* ==========================================================================
   2. TYPOGRAPHY
   ========================================================================== */
h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

h3 {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-dark);
}

h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

p {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.7;
}

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

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

/* ==========================================================================
   3. TOP CONTACT BAR
   ========================================================================== */
.top-contact-bar {
    background-color: var(--secondary-color);
    padding: 0.8rem 1.5rem;
    text-align: center;
}

.top-contact-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.top-contact-link {
    color: var(--bg-light);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.top-contact-link:hover {
    color: var(--primary-color);
}

/* ==========================================================================
   4. NAVIGATION BAR
   ========================================================================== */
.navbar {
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-light);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.8rem 1.5rem;
    gap: 2rem;
}

.nav-logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary-color);
    transition: var(--transition);
}

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

.search-bar {
    flex: 1;
    display: flex;
    align-items: center;
    background-color: var(--bg-gray);
    border-radius: 4px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.search-input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: none;
    background: transparent;
    outline: none;
    font-size: 1rem;
}

.search-btn {
    padding: 0.8rem 1.2rem;
    background-color: var(--primary-color);
    color: var(--bg-light);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.search-btn:hover {
    background-color: #ff8c3b;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--primary-color);
}

/* ==========================================================================
   5. RESPONSIVE GEOLOCATION BAR & PICKER MODAL
   ========================================================================== */
.location-bar {
    background-color: var(--bg-gray);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 1.5rem;
}

.location-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.location-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
}

.location-edit-btn {
    background: none;
    border: none;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    transition: var(--transition);
}

.location-edit-btn:hover {
    color: var(--primary-color);
}

/* Location Selector Modal Overlays */
.location-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 1rem;
}

.location-modal-content {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
    max-width: 450px;
    width: 100%;
    box-shadow: var(--shadow-medium);
}

.location-modal-content h3 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.location-modal-content p {
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
}

.location-modal-content input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    outline: none;
}

.location-modal-content input:focus {
    border-color: var(--primary-color);
}

.location-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.modal-btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: var(--transition);
}

.modal-btn.cancel {
    background-color: var(--bg-gray);
    color: var(--text-dark);
}

.modal-btn.cancel:hover {
    background-color: #e0e0e0;
}

.modal-btn.save {
    background-color: var(--primary-color);
    color: var(--bg-light);
}

.modal-btn.save:hover {
    background-color: #ff8c3b;
}

/* ==========================================================================
   6. CATEGORIES SECTION (Upgraded Flipkart-Style Edge-to-Edge Compact Layout)
   ========================================================================== */
.categories-section {
    background-color: var(--bg-light);
    padding: 2rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
    width: 100%;
}

.category-tile {
    background: #ffffff;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px;
    padding: 0 !important; /* Strips old padding box frames so imagery touches card boundaries */
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Encapsulates asset content safely within border corner radius limits */
    box-shadow: var(--shadow-light);
}

.category-tile:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
    border-color: var(--secondary-color);
}

.category-image {
    width: 100% !important;
    height: 130px !important; /* Fixed responsive block height aspect tracking */
    background-color: var(--bg-gray);
    overflow: hidden;
    padding: 0 !important;
    margin: 0 !important;
}

.category-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* Forces asset block space filling seamlessly without squishing */
    display: block !important;
}

.category-name {
    padding: 8px 6px !important;
    font-size: 0.82rem !important; /* Downscaled compact text design size */
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap !important; /* Constrains typography explicitly down to a single row line */
    overflow: hidden !important; /* Cleans layout breaking text overflow anomalies */
    text-overflow: ellipsis !important; /* Implements trailing (...) truncation for long names */
    line-height: 1.2 !important;
}

/* ==========================================================================
   7. FILTER SECTION
   ========================================================================== */
.filter-section {
    background-color: var(--bg-gray);
    padding: 2rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.filter-container {
    max-width: 1400px;
    margin: 0 auto;
}

.products-subtitle {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.category-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.6rem 1.2rem;
    background-color: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-color);
    color: var(--bg-light);
    border-color: var(--primary-color);
}

/* ==========================================================================
   8. VALUE TRUST BAR
   ========================================================================== */
.trust-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    background-color: var(--bg-gray);
    padding: 2rem 1.5rem;
    text-align: center;
    max-width: 1400px;
    margin: 0 auto;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
}

/* ==========================================================================
   9. FLIPKART-STYLE COMPACT PRODUCT CARD ENGINE
   ========================================================================== */
.products-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    font-size: 1.1rem;
}

.product-card {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
    display: flex;
    flex-direction: column;
    position: relative;
}

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

.product-image-wrapper {
    width: 100%;
    height: 250px;
    background-color: var(--bg-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.flat-image-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 4px 6px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    z-index: 6;
}

.image-rating-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: transparent;
    color: #f39c12;
    font-size: 11px;
    font-weight: 700;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 6px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.image-rating-badge .rating-count {
    font-weight: 600;
    color: #555;
    font-size: 11px;
}

.product-info.compact {
    padding: 10px 12px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.grid-product-name {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 4px 0;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-dark);
}

.grid-product-desc {
    font-size: 0.80rem;
    color: #666;
    margin: 4px 0;
    line-height: 1.1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.1rem * 2);
}

.price-row-grid {
    display: flex;
    gap: 8px;
    align-items: baseline;
    flex-wrap: wrap;
    margin-top: auto;
    padding-bottom: 8px;
}

.price-row-grid .selling-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: #e63946;
    white-space: nowrap;
}

.price-row-grid .mrp-price {
    font-size: 0.95rem;
    color: #777;
    text-decoration: line-through;
}

.price-row-grid .discount-percent {
    font-size: 0.82rem;
    color: #28a745;
    font-weight: 700;
}

.buy-now-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 5px;
    background-color: var(--primary-color);
    color: var(--bg-light);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 4px;
    transition: var(--transition);
}

.buy-now-btn:hover {
    background-color: #ff8c3b;
}

.product-category, .discount-badge { display: none !important; }

/* ==========================================================================
   10. HERO CAROUSEL / SLIDESHOW
   ========================================================================== */
.slideshow-container {
    position: relative;
    max-width: 100%;
    overflow: hidden;
    background: #f0f0f0;
}

.slides-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slide {
    min-width: 100%;
}

.slide img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.slide-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    border: none;
    font-size: 18px;
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s;
    z-index: 10;
}

.slide-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
}

.slide-arrow.prev { left: 15px; }
.slide-arrow.next { right: 15px; }

.slide-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: #fff;
}

/* ==========================================================================
   11. TEXT-CONTENT PAGES LAYOUT (ABOUT, CONTACT, CTA, FAQ)
   ========================================================================== */
.about-container,
.contact-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.about-hero,
.contact-hero {
    text-align: center;
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3rem;
}

.about-hero h1,
.contact-hero h1 {
    color: var(--secondary-color);
}

.about-content,
.contact-content {
    margin-bottom: 3rem;
}

.about-section,
.contact-info,
.contact-form-section {
    margin-bottom: 2.5rem;
    padding: 2rem;
    background-color: var(--bg-gray);
    border-radius: 8px;
}

.about-section h2,
.contact-form-section h2 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.about-list {
    list-style: none;
    margin-left: 0;
}

.about-list li {
    padding: 0.6rem 0;
    font-size: 1rem;
    line-height: 1.6;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.info-card {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.info-card:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.info-card h3 {
    margin-bottom: 0.8rem;
    color: var(--primary-color);
}

.info-card p {
    margin-bottom: 0.8rem;
}

.info-card ul {
    list-style: none;
    margin-left: 0;
}

.info-card li {
    padding: 0.4rem 0;
}

.contact-link {
    display: inline-block;
    color: var(--secondary-color);
    font-weight: 600;
    transition: var(--transition);
}

.contact-link:hover {
    color: var(--primary-color);
}

.contact-form {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.1);
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 4px;
    text-align: center;
    display: none;
}

.form-message.success {
    display: block;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    display: block;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.faq-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--secondary-color);
}

.faq-item {
    background-color: var(--bg-gray);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.faq-item:hover {
    box-shadow: var(--shadow-medium);
    transform: translateX(4px);
}

.faq-item h3 {
    margin-bottom: 0.8rem;
    color: var(--secondary-color);
}

.faq-item p {
    margin: 0;
}

.cta-section {
    text-align: center;
    padding: 3rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--bg-light);
    border-radius: 8px;
    margin-bottom: 3rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.cta-section h2 {
    color: var(--bg-light);
    margin-bottom: 1rem;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

.cta-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--bg-light);
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.cta-btn:hover {
    background-color: #ff8c3b;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* ==========================================================================
   12. FOOTER DEFINITIONS
   ========================================================================== */
.footer {
    background-color: var(--text-dark);
    color: var(--bg-light);
    padding: 2rem 1.5rem;
    margin-top: 3rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section ul {
    font-size: 0.95rem;
    line-height: 1.8;
}

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

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

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

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

.view-all-wrapper {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 2rem;
    padding: 1rem 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

/* ==========================================================================
   13. MULTI-PLATFORM RESPONSIVE HOOK BREAKPOINTS
   ========================================================================== */
@media (min-width: 768px) {
    .nav-container {
        flex-direction: row;
        gap: 2rem;
    }
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
}

@media (min-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 1.25rem;
    }
}

@media (min-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 0.75rem;
    }
    .product-image-wrapper { height: 180px; }
    .product-info.compact { padding: 8px 10px; }
    .grid-product-name { font-size: 0.93rem; }
    .grid-product-desc { font-size: 0.78rem; }
    .price-row-grid .mrp-price, .price-row-grid .selling-price { font-size: 0.92rem; }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 0.8rem 1rem;
    }
    .search-bar { width: 100%; }
    .nav-links {
        width: 100%;
        justify-content: space-around;
        gap: 0.5rem;
    }
    .nav-link { font-size: 0.9rem; }
    .category-filters { gap: 0.5rem; }
    .filter-btn { padding: 0.5rem 1rem; font-size: 0.9rem; }
    
    .slide img { height: 220px; }
    .contact-content { grid-template-columns: 1fr; }
    .about-section, .contact-form-section, .info-card, .contact-form { padding: 1.5rem; }
}

@media (max-width: 576px) {
    .top-contact-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    .top-contact-link { font-size: 0.85rem; }
}

@media (max-width: 480px) {
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    
    .nav-container { padding: 0.6rem 0.8rem; gap: 0.8rem; }
    .nav-logo a { font-size: 1.3rem; }
    .search-input { font-size: 0.9rem; padding: 0.6rem 0.8rem; }
    .search-btn { padding: 0.6rem; font-size: 0.9rem; }
    .nav-links { flex-direction: column; gap: 0.3rem; }
    .nav-link { font-size: 0.8rem; }
    
    .filter-section { padding: 1.5rem 1rem; }
    .filter-container h2 { font-size: 1.3rem; margin-bottom: 1rem; }
    .category-filters { gap: 0.4rem; }
    .filter-btn { padding: 0.4rem 0.8rem; font-size: 0.85rem; }
    
    .categories-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
    .products-container { padding: 1rem; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
    
    .grid-product-name { font-size: 0.92rem; }
    .grid-product-desc { font-size: 0.78rem; }
    .price-row-grid .selling-price { font-size: 0.92rem; }
    .flat-image-badge { font-size: 11px; padding: 5px 7px; }
    .image-rating-badge { font-size: 11px; padding: 0; gap: 4px; bottom: 6px; left: 6px; }
    
    .action-btn { padding: 0.6rem; font-size: 0.85rem; }
    .footer-container { grid-template-columns: 1fr; gap: 1.5rem; }
    .cta-section { margin: 2rem 1rem 3rem 1rem; padding: 2rem 1rem; }
}