/*
	Studnet Name: Huy Pho
	File Name: css
	Date: 01/29/2026
*/
/* ==========================================================================
   1. RESET 
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container, main {
    padding: 0 15px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ==========================================================================
   2. MOBILE-FIRST 
   ========================================================================== */

/* Header & Nav */
header {
    background: #000;
    color: #fff;
    padding: 20px 10px;
    text-align: center;
}

header h1 { font-size: 1.5rem; margin-bottom: 10px; color: #d4af37; }

.user-nav ul {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 0.8rem;
}

.category-nav {
    background: #f4f4f4;
    position: sticky;
    top: 0;
    z-index: 1000;
    overflow-x: auto; 
}

.category-nav ul {
    display: flex;
    padding: 10px;
    white-space: nowrap;
}

.category-nav li { margin-right: 20px; }
.category-nav a { font-weight: bold; color: #555; font-size: 0.9rem; }

/* Main Content */
.section-title {
    text-align: center;
    margin: 30px 0;
    font-size: 1.8rem;
    text-transform: uppercase;
}

/* Product & Category Grid */
.product-grid, .category-grid {
    display: grid;
    grid-template-columns: 1fr; 
    gap: 20px;
	align-items: stretch;
}

.product-card {
   display: flex;
    flex-direction: column; 
    justify-content: space-between; 
    height: 100%;
    padding: 15px;
    border: 1px solid #eee;
    background: #fff;
    transition: transform 0.3s ease;
}

.product-card img {
    width: 100%;
    height: 250px; 
    object-fit: contain; 
    margin-bottom: 15px;
}
.product-card h1, 
.product-card h2, 
.product-card h3, 
.product-card h4, 
.product-card h5 {
    font-size: 1rem;
    min-height: 2.5em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.price { color: #d4af37; font-weight: bold; font-size: 1.2rem; margin: 10px 0; }

.badge-new {
    background: #27ae60;
    color: white;
    padding: 5px 10px;
    position: absolute;
    top: 10px; left: 10px;
    font-size: 0.7rem;
    font-weight: bold;
}

.btn-buy {
    background: #d4af37;
    color: #000;
    border: none;
    padding: 12px;
    width: 100%;
    font-weight: bold;
    cursor: pointer;
	margin-top: auto;
}

/* Device List */
.device-brand { margin-bottom: 30px; border-bottom: 1px solid #eee; padding-bottom: 15px; }
.device-brand h3 { color: #d4af37; margin-bottom: 10px; }
.device-brand ul li { padding: 8px 0; }

/* Footer */
footer {
    background: #1a1a1a;
    color: #fff;
    padding: 40px 20px;
    margin-top: 50px;
    text-align: center;
}

footer h, footer h3 { display: block; margin-bottom: 15px; color: #d4af37; font-size: 1.2rem; }
.footer-contact { margin-top: 30px; }
.contact-link { color: #d4af37; word-break: break-all; }

/* ==========================================================================
   3. TABLET VIEW
   ========================================================================== */
@media (min-width: 768px) {
    .product-grid, .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero {
        display: flex;
        align-items: center;
        background: #f9f9f9;
        padding: 20px;
    }

    .hero img { width: 50%; }
    .hero-text { font-size: 1.5rem; padding: 20px; text-align: left; }

    .device-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* ==========================================================================
   4. DESKTOP VIEW
   ========================================================================== */
@media (min-width: 1024px) {
    header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px 50px;
    }

    .category-nav ul { justify-content: center; padding: 15px; }
    
    .product-grid {
        grid-template-columns: repeat(4, 1fr); 	
    }

    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    footer {
        display: flex;
        justify-content: space-around;
        text-align: left;
    }

    .btn-buy:hover {
        background: #000;
        color: #d4af37;
        transition: 0.3s;
    }
}