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

:root {
    --bg-main: #e2e7e6;
    --bg-box: white;
    --text-main: black;
    --text-box-title: black;
    --nav-bg: #0f1111;
    --panel-bg: #222f3d;
}

.dark-mode {
    --bg-main: #121212;
    --bg-box: #1e1e1e;
    --text-main: #e0e0e0;
    --text-box-title: #ffffff;
    --nav-bg: #000000;
    --panel-bg: #121212;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* NAVBAR */
.navbar {
    height: 60px;
    background-color: var(--nav-bg);
    color: white;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
}

.nav-logo {
    height: 50px;
    width: 100px;
}
.add-first {
    color: #cccccc;
    font-size: 0.85rem;
    margin-left: 15px;
}

.add-second {
    font-size: 1rem;
    margin-left: 3px;
}

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

.nav-search {
    display: flex;
    justify-content: space-evenly;
    width: 620px;
    height: 40px;
    border-radius: 4px;
}

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

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

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

.nav-search:hover {
    border: 2px solid orange;
}

.span {
    font-size: 0.7rem;
}

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

.nav-dark-mode {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    cursor: pointer;
    font-size: 1.5rem;
}

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

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

#cart-count {
    color: #f08804; 
    font-weight: 700;
    font-size: 1.1rem;
    margin-left: 5px;
}

/* PANEL */
.panel {
    height: 40px;
    background-color: var(--panel-bg);
    display: flex;
    justify-content: space-evenly;
    color: white;
    align-items: center;
}

.panel-options p {
    display: inline;
    margin-left: 15px;
    cursor: pointer;
}

.panel-options {
    width: 70%;
    font-size: 0.85rem;
}

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

/* HERO SECTION */
.hero-section {
    background-image: url("hero_image.jpg");
    height: 380px;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    position: relative;
    transition: background-image 0.3s ease-in-out;
}

.hero-arrow {
    position: absolute;
    top: 40%; 
    background-color: transparent;
    border: none;
    color: white; 
    font-size: 3rem;
    cursor: pointer;
    padding: 10px 20px;
    transition: 0.2s;
}

.left-arrow { left: 20px; }
.right-arrow { right: 20px; }

.hero-arrow:hover {
    color: #febd68; 
    transform: scale(1.1);
}

.hero-message {
    background-color: var(--bg-box);
    color: var(--text-box-title);
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.85rem ;
    width: 80%;
    margin-bottom: 25px;
}

.hero-message a {
    color: #007185;
    cursor: pointer;
}

/* SHOP SECTION */
.shop-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    background-color: var(--bg-main);
}

.browsing-header-container {
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.browsing-title {
    color: var(--text-box-title);
}

.box {
    height: 400px;
    width: 23%;
    background-color: var(--bg-box);
    padding: 20px 0px 15px;
    margin-top: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.category-box {
    cursor: pointer;
}

.box-image {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.category-image {
    height: 260px;
    pointer-events: none;
}

.product-image {
    height: 220px;
}

.box-content {
    margin-left: 1rem;
    margin-right: 1rem;
}

.box-content h2 {
    color: var(--text-box-title);
    min-height: 55px;
}

.product-title {
    font-size: 1.1rem;
}

.category-shop-now {
    color: #007185;
    text-decoration: none;
    display: block;
    margin-top: 10px;
    margin-bottom: 15px;
    font-weight: 600;
}

.product-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.product-price {
    font-weight: 700;
    color: #B12704;
    font-size: 1.2rem;
    margin: 0;
}

.product-actions {
    width: 120px;
    height: 36px;
}

/* BUTTONS & CONTROLS */
.add-to-cart-btn {
    width: 100%;
    height: 100%;
    background-color: #ffd814;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
    padding: 0;
    transition: 0.2s ease;
}

.add-to-cart-btn:hover {
    background-color: #f7ca00;
    transform: scale(1.02);
}

.qty-controls {
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: space-between;
    background: #f0f2f2;
    border-radius: 50px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.shop-decrease-btn, .shop-increase-btn {
    padding: 0 12px;
    height: 100%;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2rem;
    color: #0f1111;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-item-qty {
    font-weight: bold;
    font-size: 1rem;
    color: #0f1111;
    line-height: 1;
}

.back-to-categories-btn {
    background-color: transparent;
    border: 1px solid #565959;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-main);
    transition: background-color 0.2s;
}

.back-to-categories-btn:hover {
    background-color: rgba(0,0,0,0.05);
}

/* FOOTER */
footer {
    margin-top: 15px;
}
.foot-panel1 {
    background-color: #37475a;
    color: white;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.85rem;
    cursor: pointer;
}

.foot-panel2 {
    background-color: var(--panel-bg);
    color: white;
    height: 500px;
    display: flex;
    justify-content: space-evenly;
}

ul { margin-top: 20px; }

ul a {
    display: block;
    font-size: 0.85rem;
    margin-top: 10px;
    color: #dddddd;
    cursor: pointer;
}

.foot-panel3 {
    background-color: var(--panel-bg);
    color: white;
    border-top: 0.5px solid white;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.foot-panel4 {
    background-color: #0f1111;
    color: white;
    height: 80px;
    font-size: 0.7rem;
    text-align: center;
}

.pages {
    padding-top: 25px;
    display: flex;
    justify-content: center; 
    gap: 20px;
}
.pages a {
    cursor: pointer;
}
.copyright { padding-top: 5px; }

/* CART SIDEBAR */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 350px;
    height: 100vh;
    background-color: var(--bg-box);
    color: var(--text-box-title);
    box-shadow: -4px 0 15px rgba(0,0,0,0.5);
    z-index: 2000;
    transition: right 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open { right: 0; }

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    z-index: 1999;
    display: none;
}

.cart-overlay.open { display: block; }

.cart-header, .cart-footer {
    padding: 20px;
    background-color: var(--bg-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#close-cart {
    color: var(--text-box-title);
    cursor: pointer;
    font-size: 1.8rem;
    border: none;
    background: none;
}

#cart-items-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-empty { padding: 20px; }

.cart-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 15px;
}

.cart-item-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.cart-item-details { flex-grow: 1; }

.cart-item-title {
    font-weight: bold;
    font-size: 0.9rem;
}

.cart-item-price {
    color: #B12704;
    margin-top: 5px;
    font-weight: bold;
}

.cart-qty-row {
    display: flex;
    align-items: center;
    margin-top: 5px;
    gap: 10px;
}

.cart-qty-btn {
    padding: 2px 8px;
    cursor: pointer;
    border: 1px solid #ccc;
    background: #f0f2f2;
    border-radius: 4px;
    font-weight: bold;
    color: black;
}

.cart-qty-text {
    font-size: 0.85rem;
    color: #565959;
    font-weight: bold;
    margin: 0;
}

.checkout-btn {
    background-color: #ffd814;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

/* RESPONSIVE */
@media (max-width: 800px) {
    .nav-search { display: none; }
    .box { width: 45%; }
}

@media (max-width: 500px) {
    .box { width: 100%; }
    .navbar {
        justify-content: space-between;
        padding: 0 10px;
    }
}

.student-warning {
    background-color: #e22626;
    color: white;
    text-align: center;
    padding: 10px;
    font-size: 0.9rem;
    font-weight: bold;
    letter-spacing: 1px;
    width: 100%;
    z-index: 10000;
}

.text-logo {
    color: white;
    font-size: 1.75rem;
    font-weight: bold;
    letter-spacing: 1px;
    margin: 0;
    padding: 5px 10px;
    cursor: pointer;
}

.nav-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}