/* BASIC RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background: #eaeded;
    color: #111;
}

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

/* TOP BAR (like Amazon) */
.top-bar {
    background: #131921;
    color: #fff;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    position: fixed;
    top: 0;
    z-index: 100;
    width: 100%;
}

.logo {
    font-size: 24px;
    font-weight: 700;
}

.logo a {
    gap: 10px;
    display: flex;
    color: white;
    text-decoration: none;
    align-items: center;
}

.search-box {
    flex: 1;
    display: flex;
}

.upbar-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.upbar_name {
    width: 100px;
    border-radius: .5rem;
}

.search-box input {
    flex: 1;
    padding: 8px 10px;
    border: none;
    outline: none;
    border-radius: 3px 0 0 3px;
    font-size: 14px;
}
.search-box button, .sidebar button {
    border: none;
    padding: 8px 15px;
    background: #006bb4;
    border-radius: 0 3px 3px 0;
    cursor: pointer;
    font-weight: 600;
    color: white;
}
.search-box button:hover {
    background: #035083;
}

.top-links {
    display: flex;
    gap: 15px;
    font-size: 14px;
}
.top-links a {
    color: #fff;
    text-decoration: none;
}
.top-links a:hover {
    text-decoration: underline;
}

.downbar_icons {
    
    
    display: grid;
    justify-items: center;
    font-size: 11px;

}

/* CATEGORY NAV */
.nav-cats {
    background: #006bb4;
    padding: 8px 20px;
    display: none;
    gap: 18px;
    overflow-x: auto;    
    position: fixed;
    z-index: 100;
    width: 100%;
    top: 70px;
}
.nav-cats a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}
.nav-cats a:hover {
    text-decoration: underline;
}

.top-bar form {
    display: flex;
    flex: 1;
}


/* LAYOUT WRAPPER FOR PRODUCTS PAGE */
.page {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 15px;
    padding: 15px 20px;
}

/* SIDEBAR FILTERS */
.sidebar {
    position: fixed;
    left: 0;
    width: 200px;
    height: 100vh;
    overflow: auto;
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    top: 70px;
    z-index: 100;
}


.container {
    margin-left: 210px;
    margin-right: 10px
}

.sidebar h3 {
    margin-bottom: 10px;
}
.filter-group {
    margin: 12px 0;
}
.filter-group h4 {
    font-size: 18px;
    margin-bottom: 4px;
}
.filter-group label {
    display: block;
    font-size: 16px;
    margin: 2px 0;
    text-transform: capitalize;
}


/* downbar */

.downbar {
    display: none;
    width: 100%;
    position: fixed;
    bottom: 0;
    height: 40px;
    background-color: #035083;
    z-index: 100;
    color: white;
}

.downbar ul {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-around;
    list-style-type: none;
}

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

/* PRODUCTS GRID */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

.product-card {
    background: #fff;
    border-radius: 4px;
    padding: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.product-card form {
    display: flex;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.18);
}
.product-card img {
    max-width: 100%;
    height: 150px;
    margin: 0 auto 8px;
    min-width: 200px;
    object-fit: cover;
    border-radius: .5rem;
}
.product-card h2 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #007185;
}
.product-card a {
    text-decoration: none;
}

.price {
    margin: 4px 0 6px;
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}
.price .current {
    font-size: 18px;
    font-weight: 600;
}
.price .old {
    font-size: 12px;
    text-decoration: line-through;
    color: #565959;
}
.price .offer {
    font-size: 12px;
    color: #b12704;
    font-weight: 600;
}
.product-card .delivery {
    font-size: 12px;
    color: #565959;
    margin-bottom: 8px;
}


.cart_side {
    position: fixed;
    right: 0px;
    background: white;
    width: 230px;
    height: 100%;
    padding: .5rem;
    display: none;
    overflow-y: auto;
}

.cart_side.active {
    display: block;
}

.cart_img_all {
    width: 100%;
    height: 100px;
}


.cart {
    border-radius: .5rem;
    border: 1px solid black;
    padding: .5rem;
    margin: .5rem;
    text-align: center;
    margin-right: 1rem;
}

.cart_side.active ~ .container {
    margin-right: 200px;
}


.inc_dec_btn {
    background: #006bb4;
    color: white;
    cursor: pointer;
    padding: .3rem;
    border-radius: .5rem;
}



.cart_side .btns {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    margin-top: .5rem;
    margin-bottom: .5rem;
}

/* BUTTONS */
.btn-primary,
.btn-secondary {
    border: none;
    padding: 8px 10px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 500;
}

.btn-primary {
    background: #006bb4;
    color: white;
    flex: 1;
}
.btn-primary:hover {
    background: #035083;
}
.btn-secondary {
    background: #035083;
}
.btn-secondary:hover {
    background: #035083;
}

.btn-primary.big,
.btn-secondary.big {
    width: 100%;
    padding: 10px 0;
    font-size: 15px;
}

/* PRODUCT PAGE LAYOUT */
.product-page {
    display: grid;
    grid-template-columns: minmax(250px, 1.2fr) 2fr 1.1fr;
    gap: 20px;
    padding: 20px;
}

/* GALLERY */
.product-gallery {
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.product-gallery img#mainImage {
    width: 100%;
    object-fit: cover;
    border-radius: .5rem;
}
.thumb-row {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}
.thumb-row img {
    border-radius: 3px;
    border: 1px solid #ddd;
    cursor: pointer;
    background: #f3f3f3;
}
.thumb-row img:hover {
    border-color: #035083;
}

/* PRODUCT INFO */
.product-info {
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.product-info h1 {
    font-size: 22px;
    margin-bottom: 6px;
}
.rating.big {
    font-size: 15px;
    margin-bottom: 5px;
}
.rating.big span {
    font-size: 13px;
}
.brand {
    font-size: 13px;
    margin-bottom: 12px;
}
.brand a {
    color: #007185;
    text-decoration: none;
}

.price-block {
    margin-bottom: 15px;
}
.price-block .current {
    font-size: 24px;
    font-weight: 600;
    color: #b12704;
}
.price-block .row {
    display: flex;
    gap: 10px;
    font-size: 13px;
    margin-top: 2px;
}
.price-block .old {
    text-decoration: line-through;
}
.price-block .offer {
    color: #b12704;
    font-weight: 600;
}
.price-block .tax {
    font-size: 12px;
    color: #565959;
}

.price-block.small .current {
    font-size: 20px;
}

/* OPTIONS (SIZE, COLOR) */
.options {
    margin-bottom: 15px;
}
.option {
    margin: 10px 0;
}
.option h4 {
    font-size: 14px;
    margin-bottom: 4px;
}
.chip {
    border-radius: 18px;
    border: 1px solid #888;
    background: #fff;
    padding: 5px 12px;
    font-size: 13px;
    margin: 0 6px 6px 0;
    cursor: pointer;
    text-transform: uppercase;
}

.out_chip {
    margin-top: .5rem;
    color: red
}

.chip1 {
    text-transform: uppercase;
    border-radius: .5rem;
    border: 1px solid black;
    padding-left: .5rem;
    padding-right: .5rem

}

.chip.active,
.chip:hover {
    border-color: #035083;
    box-shadow: 0 0 0 1px #035083;
}

/* DETAILS */
.details h3 {
    margin: 10px 0 5px;
    font-size: 16px;
}
.details ul {
    margin-left: 18px;
    font-size: 13px;
}
.details li {
    margin: 4px 0;
}

/* BUY BOX */
.buy-box {
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    align-self: flex-start;
}
.buy-box .delivery {
    font-size: 13px;
    margin: 8px 0;
}
.buy-box .delivery a {
    color: #007185;
    text-decoration: none;
}
.stock {
    color: #007600;
    font-weight: 600;
    margin-bottom: 10px;
}
.qty {
    margin-bottom: 10px;
    font-size: 13px;
}
.qty select {
    margin-left: 5px;
}
.extra-info {
    margin-top: 10px;
    font-size: 12px;
}
.extra-info li {
    margin: 3px 0;
}

.img {
    width: 51px
}

/* FOOTER */
.footer {
    margin-top: 20px;
    padding: 15px 0;
    text-align: center;
    font-size: 12px;
    background: #232f3e;
    color: #ddd;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .page {
        grid-template-columns: 1fr;
    }
    .product-page {
        grid-template-columns: 1fr;
    }
}


@media only screen and (min-width: 0px) and (max-width: 600px) {
    .container {
        margin-left: 10px;
    }

    .sidebar {
        display: none;
    }

    .downbar {
        display: flex;
    }

    .nav-cats {
        top: 60px
    }

    .top-links {
        display: none;
    }

    .product-card {
        justify-items: center;
        align-items: center;
    }

    .product-card h2 {
        text-align: center;
    }

    .product-card form {
        flex: 1;
        width: 100%;
    }

    .logo a {
        gap: 7px;
        font-size: 20px;
    }

        
    .upbar-logo {
        width: 40px;
        height: 40px;
    }

    .search-box {
        display: none;
    }
}