* {
    margin: 0;
    font-family: Arial;
    box-sizing: border-box; 
}

body {
    background-color: #e3e6e6;
    width: 100%;
}


/*      NAVBAR      */
.Navbar {
    height: 60px;
    background-color: #0F1111;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap; 
    padding: 0 8px;
}

.Navbar > * {
    padding: 4px 4px;
}

.nav-logo {
    height: 50px;
    width: 100px;
    flex-shrink: 0; 
}

.logo {
    background-image: url("Images/amazon logo.png");
    height: 50px;
    width: 100%;
    background-size: cover;
}

.border {
    border: 1.5px solid transparent;
}

.border:hover {
    border: 1.5px solid white;
    border-radius: 4px;
}

.add-icon {
    display: flex;
    align-items: center;
}

.add1 {
    color: #cccccc;
    font-size: 0.80rem;
    font-weight: 500;
    margin-left: 20px;
}

.add2 {
    font-size: 1rem;
    font-weight: 700;
}

.nav-search {
    display: flex;
    justify-content: space-evenly;
    background-color: #febd68;
    flex: 1;              
    min-width: 120px;     
    max-width: 700px;     
    height: 2.5rem;
    border-radius: 4px;
    padding: 0px 0px;
}

.nav-search:hover {
    border: 3px solid #F08804;
}

.search-select {
    background-color: #E6E6E6;
    width: 50px;
    text-align: center;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
    border: none;
    flex-shrink: 0;
}

.search-input {
    width: 100%;
    font-size: 1rem;
    border: none;
    min-width: 0; 
}

.search-icon {
    width: 45px;
    flex-shrink: 0; 
    display: flex;
    align-self: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #0F1111;
    background-color: #febd68;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.nav-lang {
    display: flex;
}

.flag {
    background-image: url("Images/flag.png");
    height: 1.7rem;
    width: 1.7rem;
    background-size: contain;
}

.lang-select {
    height: 1.4rem;
    width: 3rem;
    background-color: #0F1111;
    color: #cccccc;
    border: none;
    font-size: 0.8rem;
}

span {
    font-size: 0.76rem;
    font-weight: 530;
}

.nav2 {
    font-size: 0.85rem;
    font-weight: 700;
}

.nav-cart {
    font-size: 0.85rem;
    font-weight: 700;
}

.nav-cart i {
    font-size: 30px;
}


/*        PANEL        */
.panel > * {
    padding: 8px 8px;
}

.panel {
    height: auto;         
    min-height: 40px;
    background-color: #222F3d;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;     
    padding: 4px 0;
}

.all {
    color: white;
    text-decoration: none;
}

.panel-ops a {
    display: inline;
    margin: 15px;
    color: white;
    text-decoration: none;
    padding: 8px 8px;
}

.panel-ops {
    width: 70%;
    font-size: 0.85rem;
    font-weight: 500;
    flex-wrap: wrap;      
}

.panel-deals {
    font-size: 0.9rem;
    font-weight: 700;
}


/*      HERO SECTION      */
.hero-section {
    background-image: url("Images/slideshow img1.jpg");
    background-size: cover;
    background-position: center top; 
    min-height: 400px;      
    height: 40vw;           
    max-height: 570px;   
    width: 100%;    
    display: flex;
    justify-content: center;
    align-items: flex-end;
    position: relative;
    z-index: 2;
    isolation: isolate;
}

.hero-section::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;             
    background: linear-gradient(to bottom, rgba(227, 230, 230, 0), #e3e6e6);
    z-index: 1;
}


/*      SHOP SECTION     */
.shop {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    justify-content: space-evenly;
    z-index: 3;
    position: relative;
    margin-top: -200px;     
    padding: 0 8px;          
}

.hero-msg {
    background-color: #e3e6e6;
    color: black;
    min-height: 40px;       
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 500;
    width: 90%;              
    max-width: 90%;        
    margin: 0 ;
    margin-bottom: 20px;
    position: relative;
    z-index: 4;
    padding: 8px 16px;       
    text-align: center;     
}

.hero-msg a {
    color: #216281;
    text-decoration: none;
}


.box {
    min-height: 400px;      
    height: auto;            
    background-color: white;
    width: 23%;              
    padding: 20px 0px 15px;
    margin-bottom: 1.4rem;
}

.box h2 {
    font-size: 1.2rem;
}

.box-content {
    margin-left: 1.3rem;
    margin-right: 1.3rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.box-img {
    margin-top: 0.8rem;
    margin-bottom: 1rem;
    height: 280px;           
    width: 100%;
    background-size: cover;
    object-fit: cover;       
}

.box-content a {
    color: #216281;
    text-decoration: none;
    font-size: 0.8rem;
}

.quad-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1rem;
    margin-top: 0.8rem;
}

.quad-items {
    display: flex;
    flex-direction: column;
}

.image2 {
    height: 130px;
    width: 100%;
    object-fit: cover;
}

.quad-items a {
    font-size: 0.7rem;
    color: #111111;
}

.main_link {
    margin-top: auto;
    margin-bottom: 0px;
    font-size: 0.8rem;
}


/*       FOOTER     */
.foot-panel1 {
    background-color: #37475a;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
}

.foot-panel1 a {
    color: white;
    text-decoration: none;
}

.foot-panel2 {
    background-color: #222f3d;
    color: white;
    min-height: 300px;       
    height: auto;            
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    padding-bottom: 40px;    
}

.foot-panel2 ul {
    margin-left: 10px;
    margin-top: 50px;
    min-width: 150px;        
}

.foot-panel2 ul a {
    color: #e3e6e6;
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 10px;
}

.foot-panel3 {
    height: 70px;
    background-color: #222f3d;
    color: white;
    border-top: 0.2px solid white;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo2 {
    background-image: url("Images/logo2.png");
    background-size: cover;
    height: 50px;
    width: 100px;
}

.foot-panel4 {
    min-height: 80px;        
    height: auto;            
    background-color: #131A22;
    color: #e3e6e6;
    font-size: 0.8rem;
    font-weight: 500;
    padding-bottom: 16px;    
}

.pages {
    padding-top: 20px;
    text-align: center;
    display: flex;           
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;               
}

.copyright {
    padding-top: 10px;
    text-align: center;
}


/*    MEDIA QUERIES
     - Desktop: > 768px 
     - Tablet:  481px – 768px
     - Mobile:  ≤ 480px
*/

/* TABLET  (≤ 768px)
   Key changes:
   - Navbar hides address and lang selector (low priority)
   - Search bar stays, gets slightly smaller
   - Shop boxes go 2-per-row 
   - Footer columns shrink but stay side-by-side
 */
@media (max-width: 769px) {

    html, body {
        width: 100%;
        overflow-x: hidden;  /* ADD: prevents any horizontal overflow */
    }

    /* --- Navbar --- */
    .Navbar {
        height: auto;
        padding: 6px 8px;
        gap: 6px;
    }

    /* Hides lower-priority nav items on tablet */
    .nav-address,
    .nav-lang {
        display: none;
    }

    .nav-search {
        order: 3;           /* Push search to second row */
        flex-basis: 100%;   /* Full width on its own row */
        max-width: 100%;
    }

    /* --- Panel --- */
    .panel{
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        gap: 4px;
    }
    .panel-ops {
        width: auto;
        font-size: 0.78rem;
    }

    .panel-ops a {
        margin: 6px;
        padding: 6px 6px;
    }

    /* --- Hero --- */
    .hero-section {
        min-height: 280px;
        height: 50vw;
    }

    /* --- Shop --- */
    .shop {
        margin-top: -150px; /* reduced since hero is shorter */
    }

    .box {
        width: 45%;         /* 2 boxes per row on tablet */
    }

    /* --- Footer --- */
    .foot-panel2 ul {
        flex: 0 0 40%;      /* 2 columns per row */
        margin-top: 30px;
    }
}


/*   MOBILE  (≤ 480px)
   Key changes:
   - Navbar becomes logo + cart only, search on new row
   - Hero is compact
   - Shop boxes are full width (1 per row)
   - Footer columns stack vertically
 */
@media (max-width: 480px) {

    /* --- Navbar --- */
    .Navbar {
        justify-content: space-between;
        padding: 6px 12px;
    }

    /* Hides lower-priority nav items on mobiles */
    .nav-signin,
    .nav-return {
        display: none;
    }

    .nav-search {
        order: 3;
        flex-basis: 100%;
        max-width: 100%;
        height: 2.2rem;
    }

    .search-select {
        font-size: 0.75rem;
        width: 44px;
    }

    /* --- Panel --- */
    .panel {
        justify-content: flex-start;
        padding: 4px 8px;
    }

    .panel-ops {
        width: 100%;
        font-size: 0.75rem;
        overflow-x: auto;       /* Scroll panel links horizontally on very small screens */
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .panel-ops a {
        margin: 4px 8px;
        padding: 4px;
    }

    /* --- Hero --- */
    .hero-section {
        min-height: 200px;
        height: 60vw;
    }

    .hero-msg {
        font-size: 0.75rem;
        padding: 6px 12px;
    }

    /* --- Shop --- */
    .shop {
        margin-top: -80px;  
        padding: 0 12px;
    }

    .box {
        width: 100%;        
        min-height: auto;  
    }

    .box h2 {
        font-size: 1rem;
    }

    .box-img {
        height: 200px;      /* Reduced image height on mobile */
    }

    .image2 {
        height: 100px;      /* Reduced quad-grid images */
    }

    /* --- Footer --- */
    .foot-panel2 {
        flex-direction: column;   /* Stack columns vertically */
        padding: 0 16px 24px;
    }

    .foot-panel2 ul {
        width: 100%;
        margin-top: 24px;
    }

    .pages {
        flex-direction: column;   /* Stack footer links vertically */
        align-items: center;
        gap: 8px;
        padding: 16px;
    }

    .foot-panel4 {
        font-size: 0.75rem;
    }
}