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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 1.2rem 0;
    text-align: center;
    margin-bottom: 1.5rem;
}

header h1 {
    color: white;
    font-size: 2rem;
    margin-bottom: 0.3rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.2rem;
    padding: 1.5rem 0;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.18);
}

.product-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.product-info {
    padding: 1rem;
}

.product-title {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 0.4rem;
    color: #333;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description {
    color: #777;
    margin-bottom: 0.8rem;
    line-height: 1.4;
    font-size: 0.82rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 0.8rem;
}

.button-group {
    display: flex;
    gap: 6px;
    margin-top: 0.6rem;
}

.presel-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 8px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.25s ease;
    flex: 1;
}

.presel-btn:hover {
    background: linear-gradient(45deg, #45a049, #4CAF50);
    transform: scale(1.04);
}

.direct-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 8px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.25s ease;
    flex: 1;
}

.direct-btn:hover {
    background: linear-gradient(45deg, #ee5a24, #ff6b6b);
    transform: scale(1.04);
}

.affiliate-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.affiliate-btn:hover {
    background: linear-gradient(45deg, #ee5a24, #ff6b6b);
    transform: scale(1.05);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

.close:hover {
    color: #333;
}

.modal-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.modal-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #333;
}

.modal-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.modal-price {
    font-size: 2rem;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 1.5rem;
}

/* Admin Button */
.admin-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #333;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.admin-btn:hover {
    background: #555;
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    header h1 { font-size: 1.5rem; }
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 1rem;
    }
}

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