/* --- Global Styles --- */
:root {
    --primary-color: #00aeff; /* Tech Blue */
    --dark-bg: #0a0a0a;       /* Deep Black */
    --card-bg: #1a1a1a;       /* Dark Grey for Cards */
    --text-light: #f0f0f0;    /* Light Grey Text */
    --text-dark: #111;
    --status-new: #00aeff;
    --status-used: #ffab00;    /* Amber/Orange for Used */
    --border-color: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

h1, h2, h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

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

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

/* --- Header & Navigation --- */
header {
    background-color: #111;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px; /* Use the provided logo */
    width: 50px;
    margin-right: 15px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-light);
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    color: var(--text-light);
    font-weight: bold;
    font-size: 1rem;
    transition: color 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--primary-color);
}

/* --- Hero Section --- */
#hero {
    /* This path assumes your logo is in the 'images' folder */
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/logo.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 6rem 1rem;
}

#hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

#hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.btn {
    background-color: var(--primary-color);
    color: var(--text-dark);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.btn:hover {
    background-color: var(--text-light);
    color: var(--text-dark);
}

/* --- Products Section --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 174, 255, 0.1);
}

.product-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.product-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-status {
    font-size: 0.9rem;
    font-weight: bold;
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.status-new {
    background-color: var(--status-new);
    color: var(--text-dark);
}

.status-used {
    background-color: var(--status-used);
    color: var(--text-dark);
}

.product-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.product-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.product-card .btn {
    width: 100%;
    margin-top: auto; /* Pushes button to the bottom */
}

/* --- Payment Section (How it Works) --- */
#payment {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 2rem;
}

.payment-steps {
    display: flex;
    justify-content: space-around;
    text-align: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.step {
    flex-basis: 300px;
}

.step-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.step h3 {
    color: var(--text-light);
    font-size: 1.3rem;
}

/* --- Feedback Section --- */
.feedback-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.feedback-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
}

.feedback-card p {
    font-style: italic;
    margin-bottom: 1rem;
}

.feedback-card .author {
    font-weight: bold;
    color: var(--primary-color);
    text-align: right;
}

/* --- Contact & Forms --- */
#contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: flex-start;
}

.contact-form, .feedback-form, .contact-details {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--text-light);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    background-color: var(--dark-bg);
    color: var(--text-light);
    font-size: 1rem;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-details p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.contact-details strong {
    color: var(--primary-color);
    margin-right: 10px;
}

/* --- Footer --- */
footer {
    background-color: #111;
    color: #aaa;
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.footer-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: #aaa;
}
.footer-links a:hover {
    color: var(--primary-color);
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
    }

    nav ul {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    nav ul li {
        margin-left: 1rem;
    }

    #hero h1 {
        font-size: 2.5rem;
    }
    
    #contact {
        grid-template-columns: 1fr;
    }
}
/* --- This new code fixes the long product descriptions --- */
.product-description {
    /* Set a standard color and font size */
    color: var(--text-light);
    font-size: 0.95rem; /* You can adjust this */
    line-height: 1.4;
    
    /* This is the magic trick to limit text to 3 lines
      and add '...' at the end.
    */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Set the number of lines to show */
    -webkit-box-orient: vertical;
    
    /* This forces all description boxes to have the 
      same height, even if one has 1 line and another has 3.
      (1.4 line-height * 0.95rem font-size * 3 lines = approx 40px) 
    */
    min-height: 40px; 
}