* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    overflow-x: hidden;      /* Prevents any accidental horizontal scroll */
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9edf2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}

/* --- HEADER (sticky, full width) --- */
.header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: #f39c12;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i {
    font-size: 2rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links a:hover {
    color: #f39c12;
}

.cart-count {
    background: #f39c12;
    color: #1a1a2e;
    border-radius: 50%;
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    font-weight: bold;
    margin-left: 0.3rem;
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
}

/* --- FULL‑WIDTH HERO (covers entire viewport, no gaps) --- */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;                /* Full viewport height */
    min-height: 620px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    display: flex;
    align-items: center;
    overflow: hidden;
    margin: 0;                    /* Remove any default margins */
    padding: 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('https://source.unsplash.com/random/1920x1080/?heavy-machinery,excavator,construction-site') center/cover no-repeat;
    opacity: 0.28;
    z-index: 1;
    filter: brightness(0.85);
}

.hero-overlay {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    background: rgba(26, 26, 46, 0.45);  /* dark overlay for text contrast */
}

.hero-content-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-content {
    max-width: 720px;
}

.hero-title {
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 1.2rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(1.25rem, 2.5vw, 1.55rem);
    line-height: 1.4;
    opacity: 0.95;
    margin-bottom: 2.5rem;
    max-width: 520px;
}

.hero-buttons {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 16px 36px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(243, 156, 18, 0.35);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(243, 156, 18, 0.5);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2.5px solid rgba(255, 255, 255, 0.85);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: white;
    transform: translateY(-3px);
}

/* --- Products Section --- */
.products-section {
    margin-top: 4rem;
    background: transparent;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.6rem;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
}

.section-desc {
    color: #555;
    font-size: 1.1rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.product-image-wrapper {
    position: relative;
    height: 260px;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

.stock-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

.low-stock { background: #f39c12; }
.out-of-stock { background: #e74c3c; }

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1a1a2e;
}

.product-desc {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f39c12;
    margin-bottom: 1rem;
}

.product-stock {
    color: #27ae60;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.btn-add {
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-add:hover {
    transform: scale(1.02);
}

/* --- Cart & Admin (unchanged, but responsive) --- */
.cart-table {
    width: 100%;
    background: white;
    border-radius: 20px;
    overflow-x: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.cart-table table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th,
.cart-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.cart-table th {
    background: #1a1a2e;
    color: white;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 10px;
}

.quantity-input {
    width: 70px;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
}

.btn-update,
.btn-remove,
.btn-checkout {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-update {
    background: #3498db;
    color: white;
}

.btn-remove {
    background: #e74c3c;
    color: white;
}

.btn-checkout {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.cart-total {
    margin-top: 2rem;
    text-align: right;
    font-size: 1.3rem;
    font-weight: 600;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #1a1a2e;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #f39c12;
}

/* Admin Panel */
.admin-container {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-table {
    overflow-x: auto;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.btn-edit,
.btn-delete {
    padding: 0.3rem 0.8rem;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.85rem;
    margin: 0 0.2rem;
}

.btn-edit {
    background: #3498db;
    color: white;
}

.btn-delete {
    background: #e74c3c;
    color: white;
}

/* Messages */
.success-msg {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.error-msg {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

/* Footer */
.footer {
    background: #1a1a2e;
    color: white;
    margin-top: 4rem;
    width: 100%;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    padding: 1rem;
    border-top: 1px solid #333;
}

/* --- Responsive (Mobile & Tablet) --- */
@media (max-width: 768px) {
    .hero-section {
        height: 85vh;
        min-height: 520px;
    }
    
    .hero-content {
        text-align: center;
        margin: 0 auto;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hamburger {
        display: block;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #1a1a2e;
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .container {
        padding: 1rem;
    }
    
    .cart-table {
        overflow-x: auto;
    }
}