* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    background: #f4f9ff;
    color: #333;
}

.topbar {
    background: #1261a0;
    color: white;
    text-align: center;
    padding: 10px;
    font-size: 14px;
    font-weight: bold;
}

.header {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6%;
    background: white;
    border-bottom: 1px solid #dceaf7;
    gap: 30px;
}

.logo {
    font-size: 26px;
    font-weight: bold;
    color: #1261a0;
    white-space: nowrap;
}

.logo span {
    color: #f39a24;
}

.search {
    display: flex;
    width: 45%;
}

.search input {
    width: 100%;
    padding: 13px;
    border: 1px solid #cddfed;
    border-radius: 25px 0 0 25px;
    outline: none;
    font-size: 15px;
}

.search button {
    width: 55px;
    border: none;
    background: #1261a0;
    color: white;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
}

.header-right {
    display: flex;
    gap: 10px;
}

.header-right button {
    background: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.cart-button {
    position: relative;
}

#cartCount {
    background: #f39a24;
    color: white;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.menu {
    display: flex;
    justify-content: center;
    gap: 28px;
    padding: 17px 10px;
    border-bottom: 1px solid #dceaf7;
    background: white;
    flex-wrap: wrap;
}

.menu a {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: bold;
}

.menu a:hover {
    color: #1261a0;
}

.banner {
    width: 100%;
    height: 450px;
    position: relative;
    overflow: hidden;
}

.banner-slides {
    display: flex;
    width: 300%;
    height: 100%;
    animation: bannerSlide 12s infinite;
}

.banner-slides img {
    width: 33.3333%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
}

.banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 40, 80, 0.25);
    z-index: 1;
}

.banner-content {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 8%;
    transform: translateY(-50%);
    color: white;
}

.banner-content h1 {
    font-size: 45px;
    margin-bottom: 15px;
}

.banner-content p {
    font-size: 20px;
    margin-bottom: 25px;
}

.banner-content button {
    background: #1261a0;
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.banner-content button:hover {
    background: #0d4f84;
    transform: translateY(-2px);
}

@keyframes bannerSlide {
    0%, 30% {
        transform: translateX(0);
    }

    35%, 65% {
        transform: translateX(-33.3333%);
    }

    70%, 95% {
        transform: translateX(-66.6666%);
    }

    100% {
        transform: translateX(0);
    }
}

.benefits {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 35px 7%;
    text-align: center;
    background: #eaf4fc;
}

.benefits h3 {
    color: #1261a0;
    margin: 8px 0;
}

.benefits p {
    color: #777;
    font-size: 14px;
}

.benefit-icon {
    font-size: 30px;
}

.product-section {
    padding: 55px 7%;
    background: #f4f9ff;
}

.section-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 25px;
}

.section-title h2 {
    color: #1261a0;
    font-size: 32px;
    transition: 0.3s;
    cursor: pointer;
}

.section-title h2:hover {
    transform: translateY(-3px) scale(1.03);
    text-shadow: 0 5px 15px rgba(18, 97, 160, 0.3);
}

.section-title p {
    margin-top: 8px;
    color: #777;
    font-size: 17px;
    transition: 0.3s;
}

.section-title p:hover {
    color: #1261a0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    max-width: 1200px;
    margin: auto;
}

.product-card {
    background: white;
    border: 1px solid #dceaf7;
    border-radius: 10px;
    overflow: hidden;
    transition: 0.3s;
    position: relative;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(18, 97, 160, 0.2);
}

.product-card:active {
    transform: scale(0.98);
}

.product-image {
   width: 100%;
    height: 200px;
    overflow: hidden;
}


.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-info {
    padding: 16px;
}

.product-name {
    font-size: 16px;
    min-height: 42px;
    line-height: 1.4;
}

.product-price {
    color: #f39a24;
    font-weight: bold;
    font-size: 18px;
    margin: 10px 0;
}

.buy-button {
    width: 100%;
    border: 1px solid #1261a0;
    color: #1261a0;
    background: white;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.buy-button:hover {
    background: #1261a0;
    color: white;
}

.about {
    background: #eaf4fc;
    padding: 70px 10%;
}

.about-content {
    max-width: 800px;
    margin: auto;
    text-align: center;
}

.about h2 {
    color: #1261a0;
    margin-bottom: 20px;
}

.about p {
    line-height: 1.8;
    margin-bottom: 15px;
    color: #555;
}

.about button {
    background: #1261a0;
    color: white;
    border: none;
    padding: 13px 25px;
    cursor: pointer;
    border-radius: 5px;
}

.review-section {
    padding: 60px 7%;
    background: #f4f9ff;
}

.rating-average {
    font-size: 20px;
    font-weight: bold;
}

.review-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 35px;
}

.review {
    border: 1px solid #dceaf7;
    padding: 20px;
    border-radius: 8px;
    background: #fff;
}

.review h4 {
    color: #1261a0;
    margin-bottom: 8px;
}

.review p {
    margin-top: 10px;
    color: #555;
}

.review-form {
    max-width: 650px;
    margin: auto;
}

.review-form h3 {
    margin-bottom: 15px;
}

.review-form input,
.review-form select,
.review-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #cddfed;
    border-radius: 4px;
}

.review-form textarea {
    height: 100px;
    resize: vertical;
}

.review-form button {
    background: #1261a0;
    color: white;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    border-radius: 5px;
}

.contact {
    background: #eaf4fc;
    padding: 60px 7%;
    text-align: center;
}

.contact h2 {
    color: #1261a0;
    margin-bottom: 30px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.contact-grid div {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #dceaf7;
}

.contact-grid h3 {
    color: #1261a0;
    margin-bottom: 10px;
}

footer {
    background: #0d3f68;
    color: white;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding: 50px 8%;
}

.footer-content h3 {
    margin-bottom: 15px;
}

.footer-content a {
    display: block;
    color: #ddd;
    text-decoration: none;
    margin: 10px 0;
}

.copyright {
    text-align: center;
    padding: 15px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 20;
    display: none;
}

.cart-drawer {
    position: fixed;
    right: -450px;
    top: 0;
    width: 420px;
    height: 100vh;
    background: white;
    z-index: 30;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}

.cart-drawer.active {
    right: 0;
}

.overlay.active {
    display: block;
}

.cart-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
}

.cart-header button {
    border: none;
    background: none;
    font-size: 22px;
    cursor: pointer;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

.cart-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 5px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: bold;
    font-size: 14px;
}

.cart-item-price {
    color: #f39a24;
    font-weight: bold;
    margin: 5px 0;
}

.quantity {
    display: flex;
    gap: 5px;
    align-items: center;
}

.quantity button {
    width: 25px;
    height: 25px;
    cursor: pointer;
}

.remove {
    color: red;
    border: none;
    background: none;
    cursor: pointer;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #ddd;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    margin-bottom: 15px;
}

.cart-total strong {
    color: #f39a24;
}

.checkout-btn {
    width: 100%;
    padding: 14px;
    border: none;
    background: #1261a0;
    color: white;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-box {
    width: 420px;
    max-width: 100%;
    background: white;
    padding: 35px;
    border-radius: 8px;
    position: relative;
}

.modal-box h2 {
    color: #1261a0;
    margin-bottom: 20px;
}

.modal-box input,
.modal-box textarea,
.modal-box select {
    width: 100%;
    padding: 13px;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.modal-box textarea {
    height: 100px;
}

.modal-box > div > button:not(.close-btn),
.modal-box > button:not(.close-btn) {
    width: 100%;
    padding: 13px;
    background: #1261a0;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

.close-btn {
    position: absolute;
    top: 12px;
    right: 15px;
    border: none;
    background: none;
    font-size: 20px;
    cursor: pointer;
}

.link {
    color: #1261a0;
    font-weight: bold;
    cursor: pointer;
}

.checkout-total {
    padding: 15px 0;
    font-size: 18px;
}

.checkout-total strong {
    color: #f39a24;
}

.admin-box {
    width: 800px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.admin-stats div {
    background: #eaf4fc;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
}

.admin-stats span {
    display: block;
    color: #777;
}

.admin-stats strong {
    display: block;
    color: #1261a0;
    font-size: 25px;
    margin-top: 8px;
}

.admin-order {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

@media (max-width: 1000px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .benefits {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .header {
        height: auto;
        padding: 20px;
        flex-direction: column;
    }

    .search {
        width: 100%;
    }

    .menu {
        gap: 15px;
    }

    .banner {
        height: 320px;
    }

    .banner-content h1 {
        font-size: 28px;
    }

    .banner-content p {
        font-size: 15px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .review-list {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .cart-drawer {
        width: 100%;
    }

    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .benefits {
        grid-template-columns: 1fr;
    }

    .section-title h2 {
        font-size: 22px;
    }
}