/* style.css for Bulldog Polishes (student style) */

body {
    font-family: Arial, sans-serif;
    background-color: white;
    color: black;
    margin: 0;
    padding: 0;
}

/* Header section */
.site-header {
    background-color: black;
    color: goldenrod;
    padding: 15px;
    border-bottom: 2px solid goldenrod;
}

.header-row {
    display: grid;
    grid-template-columns: 140px 1fr 140px; /* left logo, centered title, right spacer */
    align-items: center;
}

.logo {
    width: 120px;
    height: 120px;
    justify-self: start; /* keep logo on the left */
}

.titles {
    text-align: center;   /* center company name */
    justify-self: center; /* keep centered regardless of logo */
}

.titles h1 {
    font-size: 38px;     /* bigger company name */
    margin: 5px 0;
    color: goldenrod;
}

.tagline {
    font-size: 14px;
    font-style: italic;
    color: silver;
}

.header-spacer { /* empty on purpose to balance the grid */ }

/* Controls */
.controls {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.controls select,
.controls input {
    padding: 6px;
    border: 1px solid silver;
    border-radius: 4px;
    background-color: white;
    color: black;
}

.button-style {
    background-color: goldenrod;
    color: black;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.2s;
}

.button-style:hover {
    background-color: red;
    color: white;
}

.button-style.danger {
    background-color: red;
    color: white;
}

/* Layout */
.layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    padding: 20px;
}

@media (max-width: 960px) {
    .layout {
        grid-template-columns: 1fr;
    }
}

/* Products */
.products-section h2 {
    color: goldenrod;
    margin-bottom: 10px;
    text-align: left;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.card {
    background-color: goldenrod;
    color: black;
    text-align: center;
    border-radius: 6px;
    padding: 10px;
    box-shadow: 0 2px 6px black;
    transition: 0.2s;
}

.card:hover {
    transform: scale(1.02);
}

.card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.price {
    font-weight: bold;
}

/* Cart */
.cart-section {
    background-color: black;
    color: white;
    padding: 10px;
    border: 1px solid silver;
    border-radius: 6px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

.cart-table th,
.cart-table td {
    border: 1px solid silver;
    padding: 6px;
    text-align: left;
}

.qty-input {
    width: 50px;
    padding: 4px;
}

.remove-btn {
    background-color: red;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
}

/* Footer */
.site-footer {
    background-color: black;
    color: silver;
    text-align: center;
    padding: 12px;
    border-top: 2px solid goldenrod;
    margin-top: 20px;
}

/* Dark mode */
body.dark {
    background-color: #121212;
    color: white;
}

body.dark .card {
    background-color: #222;
    color: white;
}

body.dark .cart-section {
    background-color: #1a1a1a;
    border-color: #444;
}

body.dark .controls select,
body.dark .controls input {
    background-color: #1f1f1f;
    color: white;
    border-color: #444;
}

body.dark .site-header,
body.dark .site-footer {
    background-color: #000;
    color: goldenrod;
}
