/* Prevent horizontal scroll globally */
html, body {
    overflow-x: hidden;
}
/* =====================================================
   GLOBAL RESET & BASE STYLES
===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

body {
    background: #f5f5f7;
    color: #111;
}

/* =====================================================
   CONTAINER (Common Wrapper)
===================================================== */

.container {
    max-width: 1200px;
    margin: auto;
    padding: 0 15px;
}

/* =====================================================
   HEADER (Premium Responsive Header)
===================================================== */

.main-header {
    position: sticky;
    top: 0;
    background: #fff;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    z-index: 1000;
}

.main-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
}

/* Logo */
.logo {
    font-size: 20px;
    font-weight: 600;
    text-decoration: none;
    color: #111;
}

/* Search Box */
.search-box {
    flex: 1;
    margin: 0 20px;
    display: flex;
    max-width: 500px;
    position: relative;
}

.search-box input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px 0 0 6px;
    outline: none;
}

.search-box button {
    padding: 10px 15px;
    border: none;
    background: #2563eb;
    color: #fff;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
}

/* ===============================
   HEADER LOGIN BUTTON STYLE
================================ */

.nav-right a.login-btn {
    padding: 3px 12px;
    border: 2px solid #dc2626;   /* Red Border */
    color: #dc2626;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s ease;
}

/* Hover Effect */
.nav-right a.login-btn:hover {
    background: #dc2626;
    color: #fff;
}

/* Search Dropdown */
#search-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    display: none;
    z-index: 1000;
}

#search-results div {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

#search-results div:hover {
    background: #f1f1f1;
    cursor: pointer;
}

/* Right Navigation */
.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart {
    position: relative;
    text-decoration: none;
    font-size: 18px;
    color: #111;
}

.cart-count {
    position: absolute;
    top: -6px;
    right: -10px;
    background: red;
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 50%;
}

/* ===============================
   HAMBURGER MENU
================================ */

/* Default hidden on desktop */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

/* Hamburger lines */
.hamburger span {
    width: 25px;
    height: 3px;
    background: #111;
    border-radius: 3px;
    transition: 0.3s;
}

/* Show hamburger on mobile */
@media (max-width: 768px) {

    .search-box {
        display: none; /* Hide search on mobile */
    }

    .hamburger {
        display: flex; /* Show hamburger */
    }
}

/* Mobile Slide Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 260px;
    height: 100%;
    background: #fff;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    padding: 80px 20px;
    display: flex;
    flex-direction: column;
    transition: 0.3s ease;
    z-index: 1100;
}

.mobile-menu a {
    padding: 15px 0;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #eee;
}

.mobile-menu.active {
    right: 0;
}

/* Overlay */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 1050;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ======================================
   HERO BANNER FIX (ALL MOBILE SAFE)
====================================== */

.hero-banner {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.hero-slide {
    display: none;
    position: relative;
}

.hero-slide.active {
    display: block;
}

/* ✅ FIXED IMAGE RATIO */
.hero-slide img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 6;   /* 🔥 key fix */
    object-fit: cover;      /* prevents vertical stretching */
    display: block;
}

/* Overlay Text */
.hero-text {
    position: absolute;
    left: 15px;
    bottom: 15px;
    color: #fff;
    background: rgba(0,0,0,0.45);
    padding: 10px 12px;
    border-radius: 8px;
    max-width: 80%;
}

.hero-text h2 {
    font-size: 18px;
    margin-bottom: 4px;
}

.hero-text p {
    font-size: 13px;
}

/* ================= MOBILE FIX ================= */

@media (max-width: 768px) {

    .hero-slide img {
        aspect-ratio: 16 / 8;  /* slightly taller for mobile */
    }

    .hero-text h2 {
        font-size: 15px;
    }

    .hero-text p {
        font-size: 12px;
    }
}

/* =====================================================
   RESPONSIVE PRODUCT GRID
===================================================== */

.products {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Mobile */
    gap: 20px;
    padding: 25px 15px;
}

/* Tablet */
@media (min-width: 768px) {
    .products {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .products {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* =====================================================
   PRODUCT CARD STYLE (FULL IMAGE WIDTH)
===================================================== */

.product-card {
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden; /* Important for rounded image */
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
    transition: 0.3s ease;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

/* Full Width Image */
.product-card img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    background: #f8fafc;
    display: block;
}

/* Content Section */
.product-content {
    padding: 15px;
}

/* =====================================================
   PRODUCT NAME & PRICE HORIZONTAL STYLE
===================================================== */

.product-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

/* Product Name */
.product-name {
    flex: 1;
    padding: 8px 12px;
    background: #f1f5f9;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: 0.3s ease;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hover Effect */
.product-card:hover .product-name {
    background: #e2e8f0;
}

/* Price Badge */
.product-price {
    padding: 8px 12px;
    background: #dc2626;
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* =====================================================
   VIEW BUTTON
===================================================== */

.view-btn {
    margin-top: 15px;
    display: block;
    width: 100%;
    padding: 10px;
    background: #2563eb;
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    transition: 0.3s ease;
}

.view-btn:hover {
    background: #1e4fd1;
    transform: translateY(-2px);
}

/* =====================================================
   FOOTER
===================================================== */

.footer {
    background: #0f172a;
    color: #fff;
    padding: 50px 20px 20px;
    margin-top: 50px;
}

.footer-container {
    max-width: 1200px;
    margin: auto;
    display: grid;
    gap: 30px;
}

@media (min-width: 768px) {
    .footer-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

.footer-col h3 {
    font-size: 22px;
    margin-bottom: 15px;
}

.footer-col h4 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #ddd;
}

.footer-col p {
    font-size: 14px;
    color: #ccc;
    line-height: 1.6;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    text-decoration: none;
    color: #bbb;
    transition: 0.3s;
}

.footer-col ul li a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #1e293b;
    font-size: 13px;
    color: #aaa;
}

/* =====================================================
   AUTH PAGES (Login / Register)
===================================================== */

.auth-wrapper {
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 15px;
    background: linear-gradient(135deg, #f5f7fa, #e4ecf7);
}

.auth-card {
    background: #fff;
    width: 100%;
    max-width: 400px;
    padding: 35px 30px;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    transition: 0.3s ease;
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 25px;
}

.auth-card input {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 18px;
    border-radius: 8px;
    border: 1px solid #ddd;
    transition: 0.3s;
}

.auth-card input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    outline: none;
}

.auth-card button {
    width: 100%;
    padding: 12px;
    background: #2563eb;
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

.auth-card button:hover {
    background: #1e4fd1;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

.auth-link {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
}

.auth-link a {
    color: #2563eb;
    text-decoration: none;
}

/* ======================================
   PROFESSIONAL ADD TO CART BUTTON
====================================== */

.add-to-cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 12px 22px;
    margin-top: 15px;

    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: #fff;
    font-size: 15px;
    font-weight: 600;

    border: none;
    border-radius: 10px;

    cursor: pointer;
    transition: all 0.3s ease;

    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}

/* Hover Effect */
.add-to-cart-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.35);
}

/* Click Effect */
.add-to-cart-btn:active {
    transform: scale(0.97);
}

/* Optional Icon Before Text */
.add-to-cart-btn::before {
    content: "🛒";
    font-size: 16px;
}

/* ======================================
   RESPONSIVE PROFESSIONAL CART PAGE
====================================== */

.cart-wrapper {
    max-width: 1100px;
    margin: 40px auto;
    padding: 20px;
}

.cart-wrapper h2 {
    margin-bottom: 25px;
}

/* Cart Item Card */
.cart-item {
    display: flex;
    gap: 20px;
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    align-items: center;
}

/* Image */
.cart-image {
    flex-shrink: 0;
}

.cart-image img {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

/* Details */
.cart-details {
    flex: 1;
}

.cart-details h4 {
    margin-bottom: 8px;
    font-size: 16px;
}

.cart-price {
    color: #dc2626;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Quantity Input */
.qty-input {
    width: 80px;
    padding: 6px;
    border-radius: 6px;
    border: 1px solid #ddd;
    margin-bottom: 8px;
}

/* Subtotal */
.subtotal {
    font-weight: 600;
    margin-bottom: 8px;
}

/* Remove Button */
.remove-btn {
    display: inline-block;
    color: #dc2626;
    font-size: 14px;
    text-decoration: none;
}

.remove-btn:hover {
    text-decoration: underline;
}

/* Summary Section */
.cart-summary {
    background: #fff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.05);
    margin-top: 30px;
    text-align: right;
}

.cart-summary h3 {
    margin-bottom: 15px;
}

/* Buttons */
.update-btn,
.checkout-btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s ease;
    margin: 5px;
}

.update-btn {
    background: #f59e0b;
    border: none;
    color: #fff;
    cursor: pointer;
}

.update-btn:hover {
    background: #d97706;
}

.checkout-btn {
    background: #2563eb;
    color: #fff;
}

.checkout-btn:hover {
    background: #1e40af;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    font-size: 18px;
    padding: 50px 0;
}
/* ==========================================
   FORCE MOBILE STACK FOR CART (ALL PHONES)
========================================== */

@media (max-width: 900px) {

    .cart-item {
        display: block !important;
        width: 100%;
        text-align: center;
    }

    .cart-image {
        width: 100%;
        margin-bottom: 15px;
    }

    .cart-image img {
        width: 100%;
        max-width: 180px;
        height: auto;
        margin: auto;
        display: block;
    }

    .cart-details {
        width: 100%;
    }

    .qty-input {
        width: 100%;
        max-width: 120px;
        margin: 10px auto;
        display: block;
    }

    .cart-summary {
        text-align: center;
    }

    .update-btn,
    .checkout-btn {
        width: 100%;
        display: block;
        margin: 10px 0;
    }
}

/* =========================================
   MOBILE PRODUCT CARD VERTICAL FIX
========================================= */

@media (max-width: 768px) {

    .product-info {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .product-name {
        width: 100%;
        white-space: normal;      /* allow multi-line */
        overflow: visible;
        text-overflow: unset;
        text-align: center;
    }

    .product-price {
        width: 100%;
        text-align: center;
    }

    .view-btn {
        width: 100%;
        text-align: center;
    }
}

/* ======================================
   PROFESSIONAL CHECKOUT PAGE
====================================== */

.checkout-wrapper {
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 15px;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

.checkout-card {
    width: 100%;
    max-width: 500px;
    background: #ffffff;
    padding: 35px 30px;
    border-radius: 18px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    transition: 0.3s ease;
}

.checkout-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 55px rgba(0,0,0,0.12);
}

.checkout-card h2 {
    text-align: center;
    margin-bottom: 25px;
    font-weight: 600;
}

/* Form Group */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 14px;
    transition: 0.3s ease;
}

/* Focus Effect */
.form-group input:focus,
.form-group textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    outline: none;
}

/* Submit Button */
.checkout-btn {
    width: 100%;
    padding: 14px;
    margin-top: 10px;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    border: none;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.3s ease;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
}

.checkout-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.35);
}

.checkout-btn:active {
    transform: scale(0.97);
}

/* Responsive */
@media (max-width: 768px) {
    .checkout-card {
        padding: 25px 20px;
    }
}
/* ======================================
   FLIPKART STYLE CATEGORY SCROLL
====================================== */

.category-strip {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 15px;
    background: #fff;
    scrollbar-width: none; /* Firefox */
}

.category-strip::-webkit-scrollbar {
    display: none; /* Chrome */
}

.category-item {
    min-width: 80px;
    text-align: center;
    flex-shrink: 0;
    cursor: pointer;
}

.category-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 50%;
    background: #f1f5f9;
    padding: 8px;
    transition: 0.3s;
}

.category-item span {
    display: block;
    font-size: 12px;
    margin-top: 6px;
    color: #333;
}

/* Hover Effect */
.category-item:hover img {
    transform: scale(1.1);
    background: #fff;
}

/* =========================================
   CART FOOTER - CLEAN 3 EQUAL COLUMNS (NO BG)
========================================= */

.cart-summary {
    display: flex;
    gap: 15px;
    padding: 20px;
    margin-top: 20px;
    align-items: stretch;
}

/* =========================================
   PERFECT EQUAL 3 COLUMN CART FOOTER
========================================= */
.cart-box {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}


.cart-total {
    font-size: 18px;
    font-weight: 600;
    color: #111;
    text-align: center;
    width: 100%;

    /* 🔥 NEW BORDER */
    border: 2px solid #e63946;
    padding: 10px 12px;
    border-radius: 10px;
    background: transparent;
}

/* Buttons */
.update-btn,
.checkout-btn {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    display: block;
    transition: 0.3s ease;
}

/* Update */
.update-btn {
    background: #f59e0b;
    color: #fff;
}

.update-btn:hover {
    background: #d97706;
}

/* Checkout */
.checkout-btn {
    background: #2563eb;
    color: #fff;
}

.checkout-btn:hover {
    background: #1e4fd1;
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {
    .cart-summary {
        flex-direction: column;
    }

    .cart-box {
        width: 100%;
        justify-content: center;
    }
}