/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    line-height: 1.6;
    color: var(--text-color);
    background: var(--page-bg);
    -webkit-font-smoothing:antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

:root{
    --brand:#e74c3c;
    --accent:#02e6d9;
    --muted:#98a6aa;
    --bg:#f6f8f9;
    --page-bg: linear-gradient(180deg,#fbfdfe 0%, #f3f7f8 100%);
    --card-bg:#ffffff;
    --text-color:#1f2933;
    --shadow: 0 8px 24px rgba(15,23,42,0.06);
}

/* Accessibility helpers */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Header & Navbar */
header {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(6px);
    box-shadow: 0 6px 20px rgba(15,23,42,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 0.9rem 0;
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: space-between;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.nav-center {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

/* nav-toggle removed */

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.4rem;
    align-items: center;
    justify-content: center;
}

/* Mobile collapsed state removed (no toggle button) */

/* Search form in header */
.search-form {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-right: 0.8rem;
}

.search-input {
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #e6e6e6;
    width: 220px;
    font-size: 0.95rem;
}

.search-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
}

.search-btn i { font-size: 0.95rem; }

.logo h2 {
    color: var(--brand);
    font-size: 1.6rem;
    letter-spacing: -.5px;
    font-weight:700;
}

.logo a { display: inline-flex; align-items:center; gap:8px; color: inherit; }
/* logo icon removed */

.logo img {
    height: 44px;
    width: auto;
    display: block;
}

/* Centered search bar (large) */
.search-bar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    padding: 10px 12px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(31,41,51,0.06);
    max-width: 640px;
    width: 60%;
}

.search-category {
    border: none;
    background: transparent;
    font-size: 0.95rem;
    padding: 6px 8px;
}

.search-bar .search-input {
    flex: 1 1 auto;
    border: none;
    box-shadow: none;
    padding: 8px 6px;
}

.search-bar .search-btn {
    background: linear-gradient(90deg,var(--brand), #8e44ad);
    color: #fff;
    border-radius: 10px;
    padding: 8px 12px;
}

.nav-icons-stack {
    display: flex;
    gap: 18px;
    align-items: center;
}

.icon-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: inherit;
    font-size: 0.9rem;
}

.icon-item i { display:block; background: rgba(107,91,214,0.06); padding:10px; border-radius:10px; color:#333; }

.icon-item:hover i { transform: translateY(-4px); background: linear-gradient(90deg,#6b5bd6,#8e44ad); color:#fff; }

.nav-icons-stack .cart-count { background:#ff4d4d; }

.icon-item .nav-label {
    font-size: 0.85rem;
    color: var(--muted);
}

/* make search-bar responsive */
@media (max-width: 900px) {
    .search-bar { width: 70%; }
}

@media (max-width: 700px) {
    .search-bar { width: 100%; }
    .nav-center { order: 3; width: 100%; margin-top: 8px; }
    .nav-right { order: 2; }
    .nav-left { order: 1; }
    .nav-icons-stack { gap: 10px; }
    .icon-item .nav-label { display: none; }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a:hover {
    color: #e74c3c;
}

.cart-icon-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
}

.cart-icon-link .fas {
    font-size: 1.2rem;
}

.cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--brand);
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

/* Hero Section */
.hero {
    background: linear-gradient(180deg,var(--page-bg), #eaf8f6 60%);
    padding: 120px 20px 48px;
    text-align: center;
}

.hero-content h1 {
    font-size: 2.6rem;
    margin-bottom: 0.6rem;
    color: var(--text-color);
}

.cta-button {
    background: var(--brand);
    color: white;
    padding: 10px 22px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    display: inline-block;
    box-shadow: 0 6px 18px rgba(231,76,60,0.12);
}

.cta-button:hover {
    transform: translateY(-3px);
}

/* Categories & Products Section */
.categories, .products {
    padding: 4rem 0;
}

h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.category-grid, .product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.category-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-card i {
    font-size: 3rem;
    color: #e74c3c;
    margin-bottom: 1rem;
}

/* Product Card */
.product-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 18px 40px rgba(15,23,42,0.12);
}

.product-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-image img:hover {
    transform: scale(1.03);
}

.product-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
    color: var(--text-color);
}

.product-info .price {
    font-weight: 700;
    color: var(--brand);
    margin-bottom: 1rem;
}

.add-to-cart, .product-info .add-to-cart {
    background: var(--brand);
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight:600;
}

.add-to-cart:hover { transform: translateY(-2px); }

.product-info p {
    flex-grow: 1;
    color: #666;
    margin-bottom: 1rem;
}

.product-info .price {
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 1rem;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.product-actions button {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.product-actions button.secondary {
    background: #f1f1f1;
    color: #333;
}

.product-actions button:hover {
    background: #c0392b;
}

/* Footer - modern, responsive */
footer {
    background: linear-gradient(180deg, #0f1724 0%, #071016 100%);
    color: #e6eef2;
    padding: 3rem 0 2rem;
    margin-top: 2rem;
}

.footer-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    padding-bottom: 1.5rem;
}

.footer-section {
    flex: 1 1 220px;
    min-width: 180px;
}

.footer-section h3, .footer-section h4 {
    color: #ffffff;
    margin-bottom: 0.8rem;
    font-size: 1.05rem;
}

.footer-section p, .footer-section ul, .footer-section a {
    color: #c8d6db;
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.6rem;
}

.footer-section a:hover {
    color: #02e6d9;
}

.social-icons {
    display: flex;
    gap: 0.6rem;
}

.social-icons i {
    background: rgba(255,255,255,0.06);
    padding: 8px;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #e6eef2;
    transition: transform 0.15s, background 0.15s;
}

.social-icons i:hover {
    transform: translateY(-3px);
    background: rgba(2,229,217,0.12);
    color: #02e6d9;
}

.social-link {
    display: inline-block;
    border-radius: 8px;
    outline: none;
}

.social-link:focus {
    box-shadow: 0 0 0 3px rgba(2,229,217,0.12);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.04);
    padding-top: 1rem;
    text-align: center;
    color: #98a6aa;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .hero {
        padding-top: 120px;
    }

    .footer-content {
        flex-direction: column;
        gap: 1.2rem;
    }

    .nav-menu {
        display: none;
    }

    /* collapsed mobile menu rules removed (no toggle) */

    .nav-right .search-input {
        width: 120px;
    }

    .search-input {
        width: 140px;
    }
}

/* Cart Page Styles */
.page-container h2 {
    margin: 1.5rem 0;
    font-size: 1.8rem;
}

/* Checkout Page Styles */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    align-items: start;
}

.checkout-form {
    background: var(--card-bg);
    padding: 1.2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.checkout-form h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--text-color);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.form-group label {
    font-size: 0.95rem;
    color: var(--text-color);
}

.form-group input, .form-group select, .form-group textarea {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e6e9eb;
    background: #fff;
    font-size: 0.95rem;
    color: #222;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    box-shadow: 0 4px 18px rgba(2,229,217,0.08);
    border-color: var(--brand);
}

.checkout-form .cta-button {
    margin-top: 8px;
    padding: 12px 16px;
    font-size: 1rem;
    border-radius: 8px;
}

.order-summary {
    /* keep existing dark summary but add spacing */
    padding: 1.6rem;
    min-height: 160px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    color: #dbe8ea;
}

.order-summary h3 { color: #fff; }

/* Two-column compact form layout for wider screens */
.checkout-form .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 900px) {
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .checkout-form .row {
        grid-template-columns: 1fr;
    }

    .order-summary {
        margin-top: 1rem;
        width: 100%;
    }
}

/* Payment section styles */
.payment-methods {
    display: flex;
    gap: 12px;
    align-items: center;
}

.pm-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f5f7f8;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
}

.pm-item input { accent-color: var(--brand); }

.payment-panel { margin-top: 12px; }

.qr-placeholder {
    background: linear-gradient(180deg,#fff 0%, #f1f5f6 100%);
    border: 1px dashed rgba(0,0,0,0.06);
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #6b7280;
    font-weight: 600;
}

#qr-reader { border-radius: 8px; overflow: hidden; max-width: 100%; box-shadow: 0 6px 18px rgba(0,0,0,0.06); }
#qr-scanner .cta-button { padding: 8px 12px; }

.payment-panel p { color: #445; margin-bottom: 8px; }

/* UPI specific */
.payment-panel #upi-id {
    width: 100%;
}

.payment-panel #upi-btn { margin-top: 8px; }

#cart-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    align-items: start;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    background: #fff;
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(2,13,23,0.06);
}

.cart-item img {
    width: 100px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.item-details h3 {
    font-size: 1rem;
    margin-bottom: 0.4rem;
}

.item-details p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 0.6rem;
}

.quantity-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f7f9fa;
    padding: 4px;
    border-radius: 6px;
}

.quantity-btn {
    background: transparent;
    border: none;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 700;
    color: #333;
}

.quantity-btn:hover {
    background: rgba(0,0,0,0.04);
    border-radius: 4px;
}

.remove-btn {
    background: transparent;
    color: #c0392b;
    border: 1px solid rgba(192,57,43,0.08);
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
}

.item-total {
    font-weight: 700;
    color: #111;
    margin-left: 0.5rem;
}

.order-summary {
    background: linear-gradient(180deg,#0b2230 0%, #071016 100%);
    color: #e6eef2;
    padding: 1.4rem;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(2,13,23,0.18);
}

.order-summary h3 {
    margin-bottom: 1rem;
}

.order-summary p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.order-summary .cta-button {
    display: block;
    text-align: center;
    width: 100%;
}

@media (max-width: 900px) {
    #cart-grid {
        grid-template-columns: 1fr;
    }

    .cart-item {
        grid-template-columns: 80px 1fr;
    }

    .item-total {
        margin-left: 0;
        margin-top: 8px;
    }
}

/* Modal styles for product detail popup */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal.show {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}

.modal-dialog {
    position: relative;
    background: #fff;
    border-radius: 10px;
    max-width: 900px;
    width: 90%;
    z-index: 2010;
    padding: 0.8rem;
}

.modal-close {
    position: absolute;
    right: 12px;
    top: 8px;
    background: transparent;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
}

.modal-content {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.modal-image img {
    max-width: 360px;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.modal-info {
    padding: 0.6rem 0.8rem;
}

.modal-info .cta-button, #modal-add {
    background: var(--brand);
    color: white;
    border-radius: 8px;
    padding: 8px 14px;
    border: none;
    cursor: pointer;
}

/* Focus outlines for keyboard users */
button:focus, a:focus, input:focus {
    outline: 3px solid rgba(2,229,217,0.14);
    outline-offset: 2px;
}

@media (max-width: 720px) {
    .modal-content {
        flex-direction: column;
        align-items: center;
    }

    .modal-image img {
        max-width: 100%;
    }
}

/* Processing spinner and order confirm modal tweaks */
.spinner {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 6px solid rgba(0,0,0,0.06);
    border-top-color: var(--brand);
    animation: spin 1s linear infinite;
    margin-top: 12px;
}

@keyframes spin { to { transform: rotate(360deg); } }

#order-confirm-modal .modal-dialog { max-width: 640px; }
#order-confirm-body { color: #133; margin-top: 8px; }
.order-confirm-actions .cta-button { background: linear-gradient(90deg,var(--brand), #8e44ad); }

