/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #222;
    background-color: #f5f5f5;
    padding: 0;
}

/* Header container for full-width background */
.header-container {
    width: 100%;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
}

/* Header content matches main content width */
.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

/* Update existing header styles */
header {
    background-color: transparent;
    box-shadow: none;
    padding: 0;
}

header img {
    max-width: 80%;
}

/* Adjust header padding for smaller screens */
@media (max-width: 480px) {
    header {
        padding: 15px 10px;
    }
    
    header img {
        max-width: 80%; /* Percentage of header on small screens */
    }
}

/* Main content container */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Filter form */
.filter-form {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
}

/* Simple filter layout */
.filter-group, .search-group {
    margin-bottom: 15px;
}

.filter-group label, .search-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

/* Input styling */
.filter-form input[type="text"],
.filter-form select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
}

.filter-form input[type="text"]:focus,
.filter-form select:focus {
    border-color: #e60000;
    outline: none;
}

/* Select dropdown styling */
.filter-form select {
    padding-right: 25px;
}

/* Submit button */
.filter-form input[type="submit"] {
    padding: 8px 15px;
    background-color: #e60000;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0;
}

.filter-form input[type="submit"]:hover {
    background-color: #cc0000;
}

/* Card container and cards */
.card-container {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.card {
    display: block !important;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    background-color: #fff;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.card-detail {
    margin-bottom: 8px;
}

.card-label {
    font-weight: 600;
    margin-right: 5px;
}

/* Stock status indicators */
.card-detail .in-stock {
    color: #000;
    font-weight: 600;
}

.card-detail .out-of-stock {
    color: #e60000;
    font-weight: 600;
}

.card-detail .limited-stock {
    color: #666;
    font-weight: 600;
}

/* Pagination styles */
.pagination-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    margin: 20px 0;
}

.page-link {
    display: inline-block;
    padding: 8px 12px;
    background-color: #fff;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    margin: 0 2px;
    border: 1px solid #ddd;
}

.page-link:hover {
    background-color: #f8f8f8;
}

.page-link.current {
    background-color: #e60000;
    color: white;
    border-color: #e60000;
}

.page-ellipsis {
    padding: 8px 5px;
    color: #777;
}

/* Refresh button styles */
.refresh-container {
    text-align: center;
    margin: 0 auto 20px;
}

.refresh-button {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: #444;
}

/* Clear unused desktop-specific styles - but keep filter grid visible */
.desktop-controls, 
.desktop-submit,
.desktop-clear,
.btn,
.btn-primary,
.btn-secondary,
.btn-tertiary,
.btn-full,
.form-control,
.form-select,
.form-label {
    display: none;
}

/* Make sure filter-grid is visible */
.filter-grid {
    display: block;
}

/* Remove any display:none that might be affecting cards */
@media (min-width: 768px) {
    .card-container,
    .card {
        display: block !important;
    }
    
    /* Restore grid layout for desktop */
    .card-container {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

/* Button group for actions */
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    align-items: center;
}

/* Base button styles to ensure consistency */
.filter-form input[type="submit"],
.clear-filters {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    font-size: 14px;
    text-decoration: none;
    min-width: 120px; /* Set a minimum width */
    line-height: 1.4; /* Standardize line height */
    height: auto;
}

/* Submit button specific styles */
.filter-form input[type="submit"] {
    background-color: #e60000;
    color: white;
    border: 1px solid #e60000; /* Add border for size consistency */
    margin-top: 0;
}

.filter-form input[type="submit"]:hover {
    background-color: #cc0000;
    border-color: #cc0000;
}

/* Clear button specific styles */
.clear-filters {
    background-color: #f8f8f8;
    color: #333;
    border: 1px solid #e60000;
}

.clear-filters:hover {
    background-color: #fff;
    color: #e60000;
}

/* Make pagination info text smaller */
.pagination-info {
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
    font-weight: normal;
}
