/* Reset CSS để loại bỏ các mặc định của trình duyệt */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Thiết lập nền tối và font chữ mạnh mẽ cho trang web */
body {
    font-family: "Impact", "Arial Black", Arial, sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    display: grid;
    grid-template-columns: 75% 25%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Phần tiêu đề trang web */
header {
    background-color: #1a1a1a;
    color: #fff;
    padding: 30px 20px;
    text-align: center;
    grid-column: 1 / span 2;
    border-bottom: 5px solid #4a5d23;
    text-transform: uppercase;
    letter-spacing: 4px;
}

/* Phần menu điều hướng */
nav {
    background-color: #2c3325;
    text-align: center;
    padding: 15px;
    grid-column: 1 / span 2;
    border-bottom: 1px solid #111;
}

nav ul {
    list-style: none;
}

nav ul li {
    display: inline;
    margin-right: 30px;
}

nav ul li a {
    color: #c4c4c4;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #fff;
    text-shadow: 0 0 8px #4a5d23;
}

/* Liên kết sản phẩm ở trang chủ */
.product-link {
    text-decoration: none;
}

/* Phần danh sách sản phẩm */
.product-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    padding: 30px;
    grid-column: 1;
    font-family: Arial, sans-serif;
}

/* ĐIỀU CHỈNH CARD SẢN PHẨM */
.product-card {
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 2px;
    padding: 15px;
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
    transition: transform 0.2s, border-color 0.2s;
    
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    border-color: #4a5d23;
    transform: translateY(-5px);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 2px solid #333;
    margin-bottom: 15px;
    filter: contrast(1.1) grayscale(0.2);
}

.product-card h2 {
    color: #fff;
    font-family: "Impact", Arial, sans-serif;
    font-size: 1.4rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Phần mô tả súng */
.product-card p {
    margin-bottom: 10px;
    color: #999;
}

/* --- ĐIỀU CHỈNH ĐỂ GIÁ VÀ NÚT MUA NGANG NHAU --- */
.product-card .price {
    margin-top: auto; /* Đẩy phần giá xuống sát đáy của khoảng trống */
    color: #c43232; /* Đổi màu giá cho ngầu và nổi bật */
    font-family: "Impact", Arial, sans-serif;
    font-size: 1.3rem;
    letter-spacing: 1px;
    margin-bottom: 15px; /* Tạo khoảng cách với nút mua ngay ở dưới */
}

/* Nút bấm (Buttons) */
.button {
    background-color: #8c1c1c;
    border: 1px solid #5a0000;
    color: white;
    padding: 12px 24px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    font-family: "Impact", Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0; /* Đã loại bỏ margin-top: auto để nút gắn liền với giá */
    cursor: pointer;
    box-shadow: 3px 3px 0px #000;
    transition: all 0.1s linear;
}

.button:hover {
    background-color: #a82222;
}

.button:active {
    transform: translate(3px, 3px);
    box-shadow: none;
}

.button1 { border-radius: 0; } 
.button3 { border-radius: 2px; }
.button4 { border-radius: 0; }
.button5 { border-radius: 50%; }

/* Phần sidebar */
.sidebar {
    background-color: #161616;
    color: #fff;
    padding: 20px;
    grid-column: 2;
    border-left: 2px solid #222;
}

.social-icons {
    margin-top: 20px;
}

.social-icons a {
    color: #888;
    text-decoration: none;
    display: block;
    margin-bottom: 15px;
    font-family: "Impact", Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-left: 3px solid transparent;
    padding-left: 10px;
    transition: all 0.3s;
}

.social-icons a:hover {
    color: #fff;
    border-left: 3px solid #4a5d23;
}

/* Chỉnh lại bố cục cho màn hình thiết bị di động */
@media (max-width: 576px) {
    .product-list {
        grid-template-columns: 1fr;
    }

    .product-card {
        width: 100%;
        margin-bottom: 20px;
    }

    .sidebar {
        grid-column: 1 / span 2;
        border-left: none;
        border-top: 2px solid #222;
    }

    .footer {
        grid-template-columns: 1fr;
    }
}

/* Phần footer */
.footer {
    background-color: #0a0a0a;
    color: #555;
    text-align: center;
    padding: 30px 20px;
    grid-column: 1 / span 2;
    display: grid;
    border-top: 5px solid #4a5d23;
    font-family: Arial, sans-serif;
}

.footer-item {
    padding: 10px;
}

.footer-item h3 {
    color: #888;
    text-transform: uppercase;
    margin-bottom: 10px;
}

@media (min-width: 768px) {
    .footer {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========================================================
   CSS CHO CÁC TRANG CHI TIẾT SẢN PHẨM (DETAIL PAGES)
   ======================================================== */

.detail-container {
    grid-column: 1 / span 2;
    padding: 30px;
    background-color: #121212;
}

.back-button {
    background-color: #2c3325;
    border: 1px solid #4a5d23;
    margin-bottom: 20px;
    box-shadow: 2px 2px 0px #000;
}

.back-button:hover {
    background-color: #4a5d23;
}

.detail-content {
    display: flex;
    gap: 40px;
    background-color: #1e1e1e;
    padding: 30px;
    border: 1px solid #333;
    border-radius: 2px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
}

.detail-image {
    flex: 1;
}

.detail-image img {
    width: 100%;
    max-width: 600px;
    border: 2px solid #333;
    filter: contrast(1.1) grayscale(0.2);
}

.detail-info {
    flex: 1;
}

.detail-info h2 {
    color: #fff;
    font-family: "Impact", Arial, sans-serif;
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 2px solid #4a5d23;
    padding-bottom: 10px;
}

.detail-info .price {
    font-size: 1.8rem;
    color: #8c1c1c;
    font-family: "Impact", Arial, sans-serif;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.detail-info .description {
    color: #bbb;
    line-height: 1.8;
    margin-bottom: 30px;
    font-family: Arial, sans-serif;
    font-size: 1.1rem;
}

.detail-info .description ul {
    margin-top: 15px;
    margin-left: 20px;
    color: #999;
}

.detail-info .description ul li {
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .detail-content {
        flex-direction: column;
        padding: 15px;
    }
    
    .detail-info h2 {
        font-size: 2rem;
    }
}