@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;900&display=swap');

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


html, body { 
    height: 100%; 
    overflow-x: hidden !important; 
    width: 100%; 
}

body { 
    margin: 0; 
    min-height: 100vh; 
    display: grid; 
    grid-template-rows: auto 1fr auto; 
    background-color: #f4f4f4;
}

.main-wrapper { width: 100%; min-height: 400px; }
footer { width: 100%; margin-top: 0; }


.top-header { background-color: #df0000; padding: 15px 0; }
.header-container { width: 90%; max-width: 1400px; margin: auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.logo { font-size: 32px; font-weight: 900; color: #fff; text-decoration: none; letter-spacing: -1px; }
.logo span { color: #222; }

.search-bar { flex-grow: 1; display: flex; max-width: 600px; }
.search-bar input { width: 100%; padding: 12px 15px; border: none; border-radius: 4px 0 0 4px; font-size: 15px; outline: none; }
.search-bar button { padding: 12px 25px; background-color: #222; color: white; border: none; border-radius: 0 4px 4px 0; cursor: pointer; font-weight: bold; transition: 0.2s; }
.search-bar button:hover { background-color: #444; }

.header-actions { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.action-btn { color: #fff; text-decoration: none; font-weight: 500; font-size: 15px; display: flex; align-items: center; gap: 5px; }
.action-btn:hover { text-decoration: underline; }


.bottom-header { background-color: #222; }
.nav-container { width: 90%; max-width: 1400px; margin: auto; display: flex; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.nav-container::-webkit-scrollbar { display: none; }
.nav-container a { color: #fff; text-decoration: none; padding: 15px 20px; font-weight: 500; font-size: 14px; text-transform: uppercase; transition: 0.3s; }
.nav-container a:hover, .nav-container a.active { background-color: #df0000; }


.hero-banner { width: 90%; max-width: 1400px; margin: 20px auto; background: linear-gradient(90deg, #111 0%, #333 100%); color: white; padding: 40px; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.hero-banner h2 { font-size: 48px; color: #df0000; margin-bottom: 10px; text-transform: uppercase; }
.main-container { width: 90%; max-width: 1400px; margin: auto; padding-bottom: 50px; }
.section-title { font-size: 24px; margin-bottom: 20px; color: #222; display: flex; align-items: center; }
.section-title::before { content: ''; display: inline-block; width: 5px; height: 25px; background-color: #df0000; margin-right: 10px; }


.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.product-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 4px; padding: 20px; transition: 0.3s; display: flex; flex-direction: column; }
.product-card:hover { box-shadow: 0 5px 15px rgba(0,0,0,0.1); border-color: #df0000; }
.img-box { height: 200px; display: flex; align-items: center; justify-content: center; margin-bottom: 15px; }
.img-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.p-cat { font-size: 12px; color: #888; margin-bottom: 5px; }
.p-name { font-size: 15px; color: #0071e3; margin-bottom: 15px; line-height: 1.4; flex-grow: 1; font-weight: bold; }
.price { font-size: 24px; font-weight: 900; color: #df0000; margin-bottom: 15px; }
.btn-cart { background: #df0000; color: #fff; border: none; padding: 12px; border-radius: 4px; font-weight: bold; font-size: 16px; cursor: pointer; transition: 0.3s; width: 100%; }
.btn-cart:hover { background: #b30000; }


.cart-table { width: 100%; border-collapse: collapse; background: #fff; margin-top: 20px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.cart-table th, .cart-table td { padding: 15px; text-align: left; border-bottom: 1px solid #eee; }
.cart-table th { background: #222; color: #fff; }
.cart-summary { background: #fff; padding: 20px; margin-top: 20px; text-align: right; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.total-price { font-size: 24px; font-weight: bold; color: #df0000; }
.btn-checkout { background: #28a745; color: #fff; padding: 15px 30px; border: none; font-size: 18px; font-weight: bold; cursor: pointer; border-radius: 4px; display: inline-block; text-decoration: none; margin-top:15px; }
.checkout-container { display: flex; gap: 30px; margin-top: 40px; }
.form-section { flex: 2; background: #fff; padding: 30px; border-radius: 8px; }
.summary-section { flex: 1; background: #f9f9f9; padding: 30px; border-radius: 8px; border: 1px solid #ddd; height: fit-content; }
.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: bold; margin-bottom: 8px; color: #333; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 4px; font-size: 16px; }


@media screen and (max-width: 860px) {
    .header-container { flex-direction: column; text-align: center; gap: 15px; width: 95%; }
    .search-bar { width: 100%; max-width: 100%; }
    .header-actions { justify-content: center; width: 100%; }
    
    .hero-banner { width: 95%; padding: 30px 20px; text-align: center; }
    .hero-banner h2 { font-size: 32px; }
    
    .checkout-container { flex-direction: column; }
    .card-grid { grid-template-columns: 1fr; }
    
    .cart-table { display: block; overflow-x: auto; white-space: nowrap; }
}


@media screen and (max-width: 500px) {
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important; 
        margin: 0 !important;
        padding: 0 !important;
    }

    .header-container, 
    .main-container, 
    .hero-banner, 
    .nav-container {
        width: 100% !important;
        max-width: 100vw !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    .products-grid {
        display: flex !important;
        flex-direction: column !important; 
        width: 100% !important;
        gap: 15px !important;
    }

    .product-card {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .img-box img {
        max-width: 100% !important;
        height: auto !important;
    }

    .search-bar {
        width: 100% !important;
        display: flex !important;
        box-sizing: border-box !important;
    }
    
    .search-bar input {
        width: 75% !important;
    }
    .search-bar button {
        width: 25% !important;
        padding: 10px !important;
    }

    .logo { font-size: 26px !important; }
    .action-btn { font-size: 13px !important; }
}