/*
	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 {
    text-align: left;
    margin: 30px 0;
    font-size: 1.8rem;
    text-transform: uppercase;
    scroll-margin-top: 100px;
}
/* Product & Category Grid */
.product-grid, .category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 20px;
	align-items: start;
}

.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; }

/* Contact form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    text-align: left;
}
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="phone"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 4px;
}

/* Back to Top button */
html {
    scroll-behavior: smooth;
}

.back-to-top-btn {
    position: fixed;
    bottom: 30px; 
    right: 30px; 
    width: 50px;
    height: 50px;
    background-color: #d4af37; 
    color: rgb(255, 191, 0);
    border-radius: 50%; 
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000; 
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.back-to-top-btn:hover {
    background-color: #b8962d;
    transform: scale(1.1);
}
.arrow-up {
    border: solid white;
    border-width: 0 3px 3px 0;
    display: inline-block;
    padding: 6px;
    transform: rotate(-135deg);
    margin-top: 5px;
}

/* Follow with Icon */
.social-icons {
    display: flex;
    gap: 15px; 
    justify-content: center; 
    margin-top: 10px;
}

.social-img {
    width: 30px;  
    height: 30px;
    transition: transform 0.3s ease;
}

.social-img:hover {
    transform: scale(1.2);
    filter: brightness(1.2);
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    padding: 20px;
    background-color: #333;
    color: white;
}
/* ==========================================================================
   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;
    }
}