/* ============================================
   Computer Force - Main Stylesheet
   Color Scheme based on logo colors
   ============================================ */

/* CSS Variables for Color Scheme */
:root {
    --primaryColor: #1a5fb4;
    --primaryDark: #0d3b7a;
    --primaryLight: #3584e4;
    --secondaryColor: #26a269;
    --accentColor: #ff7800;
    --darkText: #1c1c1c;
    --lightText: #ffffff;
    --backgroundColor: #f5f5f5;
    --cardBackground: #ffffff;
    --borderColor: #ddd;
    --errorColor: #c01c28;
    --successColor: #26a269;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--backgroundColor);
    color: var(--darkText);
    line-height: 1.6;
    min-height: 100vh;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    color: var(--primaryColor);
    margin-bottom: 1rem;
    font-weight: 700;
}

h2 {
    font-size: 1.5rem;
    color: var(--primaryDark);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

h3 {
    font-size: 1.25rem;
    color: var(--primaryColor);
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primaryColor);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accentColor);
    text-decoration: underline;
}

/* ============================================
   Header Section
   ============================================ */
header {
    background: linear-gradient(135deg, var(--primaryColor), var(--primaryDark));
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header img {
    max-height: 80px;
    width: auto;
}

/* ============================================
   Navigation Menu Section
   ============================================ */
nav {
    background-color: var(--primaryDark);
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.navLinks {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.navLinks a {
    color: var(--lightText);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.navLinks a:hover,
.navLinks a.active {
    background-color: var(--accentColor);
    text-decoration: none;
}

.searchArea {
    display: flex;
    gap: 0.5rem;
}

.searchArea input[type="text"] {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    font-size: 0.9rem;
    min-width: 200px;
}

.searchArea button {
    padding: 0.5rem 1rem;
    background-color: var(--accentColor);
    color: var(--lightText);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.searchArea button:hover {
    background-color: #e66a00;
}

/* ============================================
   Main Content Container
   ============================================ */
.contentWrapper {
    display: flex;
    flex-wrap: wrap;
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1rem;
    gap: 2rem;
}

main {
    flex: 0 0 80%;
    max-width: 80%;
    background-color: var(--cardBackground);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

aside {
    flex: 0 0 calc(20% - 2rem);
    max-width: calc(20% - 2rem);
    background-color: var(--cardBackground);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

/* ============================================
   Aside Section - Purchases
   ============================================ */
aside h2 {
    color: var(--primaryColor);
    border-bottom: 2px solid var(--primaryLight);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.purchaseTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.purchaseTable td {
    padding: 0.5rem;
    text-align: center;
    border: 1px solid var(--borderColor);
}

.checkoutButton {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--secondaryColor);
    color: var(--lightText);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.checkoutButton:hover {
    background-color: #1e8256;
}

/* ============================================
   Footer Section
   ============================================ */
footer {
    background: linear-gradient(135deg, var(--primaryDark), var(--primaryColor));
    color: var(--lightText);
    text-align: center;
    padding: 1.5rem;
    margin-top: 2rem;
}

footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* ============================================
   Product Grid
   ============================================ */
.productGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.productCard {
    background-color: var(--backgroundColor);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.productCard:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.productCard a {
    display: block;
    text-decoration: none;
}

.productCard img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.productCard:hover img {
    transform: scale(1.05);
}

.productCard h2 {
    padding: 1rem;
    margin: 0;
    background-color: var(--primaryColor);
    color: var(--lightText);
    font-size: 1.1rem;
}

/* ============================================
   Forms
   ============================================ */
.formContainer {
    max-width: 600px;
    margin: 0 auto;
}

.formGroup {
    margin-bottom: 1.25rem;
}

.formGroup label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primaryDark);
}

.formGroup input,
.formGroup select,
.formGroup textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--borderColor);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.formGroup input:focus,
.formGroup select:focus,
.formGroup textarea:focus {
    outline: none;
    border-color: var(--primaryColor);
}

.formGroup input.error,
.formGroup select.error {
    border-color: var(--errorColor);
}

.radioGroup {
    display: flex;
    gap: 1.5rem;
    padding: 0.5rem 0;
}

.radioGroup label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    cursor: pointer;
}

.radioGroup input[type="radio"] {
    width: auto;
}

.buttonGroup {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.submitButton {
    flex: 1;
    padding: 0.75rem 1.5rem;
    background-color: var(--primaryColor);
    color: var(--lightText);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.submitButton:hover {
    background-color: var(--primaryDark);
}

.resetButton {
    flex: 1;
    padding: 0.75rem 1.5rem;
    background-color: #6c757d;
    color: var(--lightText);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.resetButton:hover {
    background-color: #545b62;
}

/* Error Messages */
.errorMessage {
    color: var(--errorColor);
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: block;
}

.errorBox {
    background-color: #fdecea;
    border: 1px solid var(--errorColor);
    border-radius: 5px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.errorBox h3 {
    color: var(--errorColor);
    margin-bottom: 0.5rem;
}

.errorBox ul {
    margin-left: 1.5rem;
    color: var(--errorColor);
}

.successBox {
    background-color: #d4edda;
    border: 1px solid var(--successColor);
    border-radius: 5px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: var(--successColor);
}

/* ============================================
   Cart Table
   ============================================ */
.cartTable {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.cartTable th {
    background-color: var(--primaryColor);
    color: var(--lightText);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.cartTable td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--borderColor);
}

.cartTable tr:nth-child(even) {
    background-color: var(--backgroundColor);
}

.cartTable .totalRow {
    background-color: var(--primaryLight);
    color: var(--lightText);
    font-weight: 600;
}

.cartTable .totalRow td {
    padding: 1rem;
}

/* ============================================
   About Page
   ============================================ */
.aboutContent {
    line-height: 1.8;
}

.aboutContent ul {
    margin: 1rem 0 1.5rem 2rem;
}

.aboutContent li {
    margin-bottom: 0.5rem;
    color: var(--primaryDark);
}

.contactInfo {
    background-color: var(--backgroundColor);
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 2rem;
}

.contactInfo h2 {
    margin-bottom: 1rem;
}

.contactInfo p {
    margin-bottom: 0.5rem;
}

.contactInfo strong {
    color: var(--primaryColor);
}

/* ============================================
   Privacy Link
   ============================================ */
.privacyLink {
    display: inline-block;
    margin: 1rem 0;
    padding: 0.5rem 1rem;
    background-color: var(--backgroundColor);
    border-radius: 5px;
    color: var(--primaryColor);
    font-weight: 500;
}

.privacyLink:hover {
    background-color: var(--primaryLight);
    color: var(--lightText);
    text-decoration: none;
}

/* ============================================
   Responsive Design
   ============================================ */
@media screen and (max-width: 1024px) {
    main {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    aside {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .contentWrapper {
        flex-direction: column;
    }
}

@media screen and (max-width: 768px) {
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    nav {
        flex-direction: column;
        padding: 1rem;
    }
    
    .navLinks {
        justify-content: center;
    }
    
    .searchArea {
        width: 100%;
        justify-content: center;
    }
    
    .searchArea input[type="text"] {
        flex: 1;
        min-width: auto;
    }
    
    .productGrid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .buttonGroup {
        flex-direction: column;
    }
}

@media screen and (max-width: 480px) {
    header {
        padding: 1rem;
    }
    
    header img {
        max-height: 60px;
    }
    
    main, aside {
        padding: 1rem;
    }
    
    .productGrid {
        grid-template-columns: 1fr;
    }
    
    .navLinks a {
        padding: 0.4rem 0.75rem;
        font-size: 0.9rem;
    }
}
