:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #2d3748;
    --background-color: #f7f8fa;
    --card-background: #ffffff;
    --card-hover: #f1f5f9;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --border-color: #e2e8f0;
    --muted-text: #64748b;
    --gradient-start: #3498db;
    --gradient-end: #2c3e50;
    --button-hover: #2980b9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

/* Header */
.header {
    background-color: var(--card-background);
    color: var(--primary-color);
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.header h1 {
    font-size: 2.25rem;
    font-weight: 800;
    text-align: center;
    margin: 2rem 0 1rem;
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.header p {
    text-align: center;
    color: var(--muted-text);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Products grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1.5rem 0;
}

.product-card {
    background: var(--card-background);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--shadow-color);
    border: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px var(--shadow-color);
}

.product-image-container {
    position: relative;
    padding-top: 75%;
    overflow: hidden;
    background: #f9fafb;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1.5rem;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

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

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
    line-height: 1.4;
}

.view-details {
    display: inline-block;
    width: 100%;
    padding: 0.9rem 1.5rem;
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 1rem;
    letter-spacing: 0.02em;
    border: none;
    cursor: pointer;
}

.view-details:hover {
    background: var(--button-hover);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}

/* Product page */
.product-container {
    max-width: 1200px;
    margin: 2rem auto;
    background: var(--card-background);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.product-gallery {
    position: sticky;
    top: 2rem;
}

.product-detail-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: _px;
    object-fit: contain;
    background: linear-gradient(145deg, #f9fafb, #f1f5f9);
    padding: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.product-info {
    display: flex;
    flex-direction: column;
}

.product-detail-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.product-description {
    color: var(--text-color);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

.amazon-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(to right, var(--accent-color), #c0392b);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    letter-spacing: 0.02em;
    max-width: 250px;
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.2);
}

.amazon-button:hover {
    background: linear-gradient(to right, #d35400, #c0392b);
    box-shadow: 0 6px 15px rgba(231, 76, 60, 0.3);
    transform: translateY(-3px);
}

.back-link {
    display: inline-flex;
    align-items: center;
    margin-bottom: 2rem;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.back-link:hover {
    color: var(--button-hover);
}

.back-link svg {
    width: 20px;
    height: 20px;
    margin-right: 6px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 3rem 0;
    gap: 1rem;
}

.pagination a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.2);
}

.pagination a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.3);
}

.pagination-info {
    font-size: 1rem;
    color: var(--muted-text);
    font-weight: 500;
}

.product-count {
    text-align: center;
    color: var(--muted-text);
    font-size: 1rem;
}

/* Responsive styles */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .product-detail-layout {
        grid-template-columns: 1fr;
    }
    
    .product-container {
        padding: 1.5rem;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
}
