/* =========================================
   1. BASE STYLES (Global)
   ========================================= */

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
    color: white;
}

/* Side Search Panel */
.side-search-panel {
    position: fixed;
    top: 0;
    right: -500%;
    width: 300px;
    height: 100%;
    background: white;
    z-index: 2000;
    transition: right 0.3s ease;
    padding: 20px;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
}

.side-search-panel.active {
    right: 0;
}

.side-search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Mobile Nav Items */
.mobile-nav-item {
    color: white;
}

.mobile-navbar {
    width: 100%;
    display: none;
    margin-top: 1px;
    background-color: black;
}


/* =========================================
   2. MEDIA QUERIES (Largest -> Smallest)
   ========================================= */

/* Large Screens / Laptops */
@media (max-width: 1200px) {
    .fe {
        flex: 0 0 5%;
        background-color: #ffff;
        height: 180px;
        padding: 10px;
        font-family: arial;
        border-radius: 10px;
        border: 1px solid gray;
    }
}

@media (max-width: 1024px) {
    .hero-section {
        background-position: 65% center;
        background-size: cover;
    }
}

/* Tablets / Small Laptops */
@media (max-width: 900px) {
    .hero-section {
        background-position: center center;
        background-size: cover;
    }

    .hero-left {
        width: 480px;
    }

    .social-icon i {
        font-size: 30px;
        margin: 0px;
    }

    .fe {
        flex: 0 0 5%;
        background-color: #ffff;
        height: 180px;
        padding: 10px;
        font-family: arial;
        border-radius: 10px;
        border: 1px solid gray;
    }
}

@media (max-width: 820px) {
    .comparision-table-container {
        padding-bottom: 40px;
        margin-bottom: 80px;
    }

    body {
        padding-bottom: 90px !important;
    }

    .whatsapp-float {
        bottom: 100px !important;
    }

    .cart-summary,
    .checkout-container {
        margin-bottom: 20px;
    }
    .prodetails {
        display: flex;
        flex-direction: column; 
        width: 100%; 
    }

    .single-pro-image {
        width: 100%;
        margin-right: 0px; 
        margin-bottom: 30px;
        display: flex;
        flex-direction: column;
        align-items: center; 
    }

    .main-img {
        width: 100%;
        max-width: 500px; 
        object-fit: contain; 
    }

    .single-pro-details {
        width: 100%;
    }
    .button-container{
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    .add-cart-btn { 
        width: 44%;
    }
    .buy-now-btn {
        width: 47%;
    }
    .comparision-table-container{
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
    }
    .comparision-table-container h3{
        font-size: 18px;
        margin-bottom: 0px;
    }
    .comparision-table-container p{
        font-size: 18px;
        margin-top: 10px;
    }
    .comparison-table {
        border: 1px solid #000;
    }
    .main{
        padding: 10px 20px;
        font-size: 15px;
    }
    .feature-name{
        font-size: 16px;
    }
    .check,.cross{
        font-size: 16px;
    }
}

/* =========================================
   CRITICAL UPDATE: Mobile Header Logic (799px)
   ========================================= */
@media (max-width: 799px) {

    /* 1. HIDE Search Bar */
    .header-right-section .search-container {
        display: none !important;
    }

    /* 2. HIDE Header Cart Icon (Moved to Hamburger) */
    .header-right-section .cart-button {
        display: none !important;
    }
    
    /* 3. SHOW Hamburger Cart Link */
    .nav-cart-link {
        display: block !important;
    }

    /* 4. FIX Right Section to be VISIBLE on the header bar */
    .header-right-section {
        position: static;      
        right: auto;           
        height: auto;          
        width: auto;           
        background-color: transparent; 
        box-shadow: none;      
        padding: 0;
        display: flex;
        flex-direction: row;   
        align-items: center;
        justify-content: flex-end;
    }

    /* 5. SHOW Hamburger Menu Button */
    .mobile {
        display: flex !important; 
        align-items: center;
        margin-left: 20px;
        font-size: 24px;
        cursor: pointer;
        color: white; 
    }

    /* 6. TURN .center-nav INTO the Side Menu */
    .center-nav {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        position: fixed;
        top: 0;
        right: -300px; 
        height: 100vh;
        width: 250px;
        background-color: white;
        padding: 80px 0 0 20px;
        box-shadow: 0 40px 60px rgba(0, 0, 0, .1);
        transition: right .3s linear;
        z-index: 1000;
    }

    .center-nav.active {
        right: 0px; 
    }

    .center-nav a {
        width: 100%;
        margin-bottom: 5px;
        border-bottom: 1px solid #eee;
    }

    .center-nav .menu {
        color: black; 
        font-size: 18px;
        display: block;
        padding-bottom: 5px;
    }

    #close {
        display: initial;
        position: absolute;
        top: 30px;
        left: 20px;
        color: black;
        font-size: 25px;
        cursor: pointer;
    }
    
    /* --- General Responsive Fixes --- */
    .hero-section {
        margin: 10px 0;
        height: 70vh;
        margin: 10px 30px;
        border-radius: 15px;
        box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3);
        background-position: top 40% right 30%;
    }

    .hero-left {
        margin-left: 20px;
    }

    .hero-left h2 {
        width: 500px;
        font-size: 40px;
    }

    .hero-left button {
        margin: 30px 10px;
        box-shadow: 3px 3px 7px gray;
    }

    .products-grid {
        display: grid;
        padding: 20px 20px;
        column-gap: 25px;
        row-gap: 10px;
    }

    .footer-left-section {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 250px;
        margin-left: 20px;
    }

    .footer-left-section img {
        width: 180px;
    }

    .footer-text {
        font-size: 12px;
    }

    .footer-middle-section h2,
    .footer-right-section h2 {
        font-size: 34px;
        margin-top: 50px;
        margin-right: 0px;
    }

    .footer-middle-section .links p {
        font-size: 20px;
        line-height: 15px;
    }

    .footer-right-section {
        width: 280px;
    }

    .footer-right-section p {
        font-size: 18px;
        margin-left: 5px;
    }

    .social-icon i {
        font-size: 30px;
        margin: 0px;
    }
}

/* Tablets / Large Phones */
@media (max-width: 768px) {
  .hero-section{
    margin: 10px;
    box-shadow: 0px 0px 40px black;
    height: 80vh;
  }
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 80px;
        right: 20px;
        font-size: 25px;
    }

    .slide p {
        font-size: 16px;
    }

    .reviews-grid-container {
        padding: 20px 10px;
    }

    .review-card {
        padding: 20px;
    }
}

/* Mobile Devices */
@media (max-width: 600px) {
    .hero-section {
        margin-left: 0px;
        margin-right: 0px;
        margin-top: 10px;
        background-size: cover;
        background-position: top 30% right 35%;
        background-repeat: no-repeat;
    }

    .header {
        left: 0;
        margin-bottom: 0px;
    }

    .hero-left h4,
    .hero-left {
        width: 70%;
    }

    .products {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        box-shadow: 10px 10px 30px gray;
        border-radius: 10px;
        transition: box-shadow .15s linear;
        cursor: pointer;
        background-color: white;
        height: auto;
    }

    .product-image {
        width: 200px;
    }

    .products:hover {
        box-shadow: 5px 5px 15px gray;
        .product-name {
            color: rgb(37, 37, 37);
            text-decoration: underline;
        }
    }
}

@media (max-width: 550px) {
    .hero-section {
        margin-left: 10px;
        margin-right: 10px;
        margin-top: 10px;
        width: 100%;
        background-size: cover;
        background-position-x: 76%;
        background-repeat: no-repeat;
    }

    .header {
        left: 0;
    }

    .products-grid {
        column-gap: 7px;
        padding: 30px 10px;
        grid-template-columns: 1fr 1fr;
    }

    .products {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        box-shadow: 10px 10px 30px gray;
        border-radius: 10px;
        transition: box-shadow .15s linear;
        cursor: pointer;
        background-color: white;
        height: auto;
        padding: 10px 10px;
    }

    .product-image {
        width: 100%;
    }

    .products:hover {
        box-shadow: 5px 5px 15px gray;
        .product-name {
            color: rgb(37, 37, 37);
            text-decoration: underline;
        }
    }

    .hero-left {
        width: 68%;
    }

    .hero-section h2 {
        font-size: 30px;
        width: 80%;
    }

    .hero-section h4 {
        font-size: 15px;
        font-style: normal;
        margin-top: 15px;
        width: 85%;
    }

    .hero-left button {
        font-size: 14px;
        margin: 10px 7px;
        padding: 8px 14px;
    }
}

@media (max-width: 480px) {
    .review-card {
        flex: 0 0 85%;
    }
    .prodetails {
        padding: 20px;
        width: 100%;
    }
    
    .pro-name { font-size: 22px; }
    .pro-price { font-size: 20px; }

    .add-cart-btn, .buy-now-btn {
        width: 100%;
        display: block; 
        text-align: center;
    }

    .comparision-table-container{
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
    }
    .comparision-table-container h3{
        font-size: 18px;
        margin-bottom: 0px;
    }
    .comparision-table-container p{
        font-size: 18px;
        margin-top: 10px;
    }
    .comparison-table {
        border: 1px solid #000;
    }
    .main{
        padding: 10px 20px;
        font-size: 15px;
    }
    .feature-name{
        font-size: 16px;
    }
    .check,.cross{
        font-size: 16px;
    }
}

@media (max-width: 430px) {
    .header {
        height: 50px;
        width: 100%;
        margin-bottom: 0px;
    }

    .header h1 {
        font-size: 24px;
    }

    .hero-section {
        border-radius: 0px;
        width: 100%;
        height: 300px;
        margin: 10px 0px;
        box-shadow: none;
        background-position-x: 78%;
        background-size: cover;
    }

    .hero-left {
        width: 65%;
        line-height: 30px;
    }

    .hero-section h2 {
        font-size: 22px;
        width: 80%;
    }

    .hero-section h4 {
        line-height: 12px;
        font-size: 12px;
        font-style: normal;
        margin-top: 15px;
    }

    .hero-left button {
        font-size: 12px;
        margin: 10px 7px;
        padding: 8px 14px;
    }

    .product-heading {
        font-size: 20px;
    }

    .products-grid {
        grid-template-columns: 1fr 1fr;
        padding: 0px 0px;
    }

    .products {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        box-shadow: 10px 10px 30px gray;
        border-radius: 10px;
        transition: box-shadow .15s linear;
        cursor: pointer;
        background-color: white;
        height: auto;
        width: auto;
    }

    .product-image {
        width: 100%;
    }

    .product-name {
        font-size: 14px;
    }

    .product-price {
        font-size: 14px;
    }

    .footer {
        display: none !important;
    }

    .mobile-navbar {
        display: flex;
        justify-content: space-around;
        align-items: center;
        position: fixed;
        bottom: 0;
        left: 0px;
        width: 100%;
        height: 65px;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 2000;
        border-top: 1px solid #ddd;
        margin-top: 1px;
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        flex: 1;
    }

    .mobile-nav-item i {
        font-size: 20px;
        margin-bottom: 4px;
    }

    .mobile-nav-item .label {
        font-size: 11px;
        font-family: Arial, sans-serif;
        font-weight: 500;
    }

    .mobile-nav-item:active,
    .mobile-nav-item:hover {
        color: #666;
    }

    body {
        padding-bottom: 70px;
    }
}

@media (max-width: 400px) {
    .header-right-section .search-container {
        display: none !important;
    }

    .footer {
        display: none !important;
    }
    .mobile-navbar {
        display: flex;
        justify-content: space-around;
        align-items: center;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 65px;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 2000;
        border-top: 1px solid #ddd;
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: white;
        flex: 1;
        cursor: pointer;
    }

    .mobile-nav-item i {
        font-size: 20px;
        margin-bottom: 4px;
    }

    .mobile-nav-item .label {
        font-size: 11px;
        font-family: Arial, sans-serif;
    }

    .search-side-panel {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: white;
        z-index: 3000;
        transition: right 0.3s ease-in-out;
        display: flex;
        flex-direction: column;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .search-side-panel.active {
        right: 0;
    }

    .panel-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px;
        border-bottom: 1px solid #eee;
        background: #f9f9f9;
    }

    .panel-header h2 {
        margin: 0;
        font-size: 20px;
        font-family: 'Times New Roman', serif;
    }

    .panel-header i {
        font-size: 24px;
        padding: 10px;
    }

    .panel-body {
        padding: 20px;
        overflow-y: auto;
    }

    .mobile-search-box {
        display: flex;
        border-bottom: 2px solid #333;
        margin-bottom: 20px;
    }

    .mobile-search-box input {
        flex: 1;
        border: none;
        outline: none;
        padding: 10px;
        font-size: 18px;
    }

    .mobile-search-box button {
        background: none;
        border: none;
        font-size: 20px;
    }

    #sideSearchSuggestions {
        position: static;
        box-shadow: none;
        border: none;
        display: block;
    }

    .header {
        height: 50px;
        width: 100%;
    }

    .header h1 {
        font-size: 24px;
    }

    .hero-section {
        width: 100%;
        height: 300px;
        margin: 0px 0px;
        background-position-x: 80%;
        background-size: cover;
    }

    .hero-left {
        width: 60%;
    }

    .hero-section h2 {
        font-size: 16px;
        line-height: 24px;
        width: 80%;
    }

    .hero-section h4 {
        font-size: 8px;
        font-style: normal;
        margin-top: 15px;
        line-height: 10px;
    }

    .hero-left button {
        font-size: 8px;
        margin: 10px 7px;
        padding: 8px 14px;
    }

    .product-deal {
        letter-spacing: 2px;
        font-size: 12px;
        padding: 10px 0px;
    }

    .carousel-wrapper {
        width: 100%;
    }

    .product-heading {
        font-size: 20px;
        width: 100%;
    }

    .heading-container {
        width: auto;
        height: auto;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .products-grid {
        grid-template-columns: 1fr 1fr;
        padding: 0px 0px;
        column-gap: 5px;
    }

    .products {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        border-radius: 10px;
        transition: box-shadow .15s linear;
        cursor: pointer;
        background-color: white;
        height: auto;
        width: 160px;
    }

    .products-top {
        width: 100%;
    }

    .product-bottom {
        width: 100%;
    }

    .product-image {
        width: 100%;
    }

    .product-name {
        font-size: 14px;
    }

    .product-price {
        margin-top: 5px;
        font-size: 16px;
    }

    .product-bottom button {
        position: absolute;
        bottom: 0px;
        right: 0%;
    }

    .product-bottom button i {
        font-size: 12px;
    }

    a {
        color: black;
        text-decoration: none;
    }

    i {
        border: none;
    }
}

@media (max-width: 360px) {
    body {
        padding-bottom: 70px;
    }
    .hero-section{
        margin: 10px 0px;
        box-shadow: none;
    }
    .hero-section button{
        font-size: 14px;
        padding: 10px 15px;
    }
    .hero-left {
        width: 240px;
        line-height: 20px;
    }
    .products-grid{
        column-gap: 5px;
        row-gap: 5px;
        padding: 0px;
    }
    .products{
        height: auto;
        width: auto;
    }
    .product-price{
        font-size: 14px;
    }
    .price-button-container i{
        font-size: 22px;
    }
}