/* General Body and Layout Styles */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f4;
    color: #333;
}

/* Banner Image */
img[alt="cdbanner"] {
    display: block;
    margin: 0 auto 20px auto;
    max-width: 100%;
    height: auto;
}

/* Heading Styles */
h2 {
    color: #333;
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
}

/* Form Container */
form {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 1000px;
    margin: 20px auto;
}

/* Product Row Styling */
.product-row {
    margin-bottom: 30px;
}

/* BCS Row Styling */
.bcs-row {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 25px;
    margin-bottom: 20px;
    position: relative;
}

.bcs-row:before {
    content: "Bar, Chain, Scabbard, & File Guide Set";
    position: absolute;
    top: -10px;
    left: 15px;
    background-color: #fff;
    padding: 0 10px;
    font-weight: bold;
    color: #666;
    font-size: 14px;
}

/* Label Styles */
label {
    display: inline-block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #555;
    font-size: 16px;
}

/* Input Field Styles */
input[type="text"], 
input[type="number"], 
select,
textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

input[type="text"]:focus, 
input[type="number"]:focus, 
select:focus,
textarea:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 5px rgba(0,124,186,0.3);
}

/* Textarea specific styles */
textarea {
    min-height: 80px;
    resize: vertical;
    line-height: 1.4;
}

/* Special styling for description fields to make them larger */
input[name*="_desc"],
input[placeholder*="Description"] {
    min-height: 60px;
    padding: 12px;
    resize: vertical;
    line-height: 1.4;
}

/* Grid layout for form fields */
.bcs-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.bcs-row > * {
    grid-column: span 1;
}

/* Make description fields span full width */
.bcs-row textarea,
.bcs-row input[name*="_desc"],
.bcs-row input[placeholder*="Description"] {
    grid-column: span 2;
}

/* Type and Unit fields styling */
.product-row label,
.product-row select,
.product-row input[name="product"] {
    margin-bottom: 15px;
}

.product-row select {
    width: 200px;
}

.product-row input[name="product"] {
    width: 300px;
    margin-left: 10px;
}

/* Button Container */
.bottom_buttons {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

/* Button Base Styles */
button, input[type="submit"] {
    padding: 12px 25px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin: 0 10px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Add BCS Button - Blue */
#addProductBtn {
    background-color: #007cba;
    color: white;
}

#addProductBtn:hover {
    background-color: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,124,186,0.3);
}

/* Remove BCS Button - Red */
#removeProductBtn,
.remove_button {
    background-color: #dc3545;
    color: white;
}

#removeProductBtn:hover,
.remove_button:hover {
    background-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220,53,69,0.3);
}

/* Submit Button - Orange */
input[type="submit"] {
    background-color: #fd7e14;
    color: white;
}

input[type="submit"]:hover {
    background-color: #e66a00;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(253,126,20,0.3);
}

/* Welcome message and instructions styling */
div[style*="font-size: 22px"] {
    background-color: #e8f4fd;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #007cba;
}

/* Instructions list styling */
ul {
    background-color: #fff3cd;
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid #ffc107;
    margin-bottom: 20px;
}

ul li {
    margin-bottom: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .bcs-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .bcs-row textarea,
    .bcs-row input[name*="_desc"],
    .bcs-row input[placeholder*="Description"] {
        grid-column: span 1;
    }
    
    .bottom_buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    button, input[type="submit"] {
        width: 100%;
        margin: 5px 0;
    }
    
    .product-row select,
    .product-row input[name="product"] {
        width: 100%;
        margin-left: 0;
    }
}

/* Required field indicator */
input[required]:invalid {
    border-color: #dc3545;
}

input[required]:valid {
    border-color: #28a745;
}

/* Improved focus states for accessibility */
button:focus,
input:focus,
select:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}