/* css/style.css */
:root {
    --primary: #ff4757;
    --secondary: #2f3542;
    --accent: #ffa502;
    --background: #f1f2f6;
    --card-bg: #ffffff;
    --text: #2f3542;
    --text-light: #747d8c;
    --success: #2ed573;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
    --radius: 12px;
}

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

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

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

/* Header */
.main-header {
    background: var(--card-bg);
    padding: 15px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
    color: var(--secondary);
}

.logo span {
    color: var(--primary);
}

.main-nav {
    display: flex;
    gap: 20px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: var(--primary);
}

.search-bar {
    display: flex;
    flex-grow: 1;
    max-width: 400px;
}

.search-bar input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px 0 0 20px;
    outline: none;
}

.search-bar button {
    padding: 10px 20px;
    background: var(--primary);
    border: none;
    color: white;
    border-radius: 0 20px 20px 0;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    padding: 60px 0;
    border-radius: 0 0 50px 50px;
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 42px;
    margin-bottom: 10px;
}

/* Grid & Cards */
.section-title {
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card-image {
    position: relative;
    padding-top: 75%;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
}

.card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.platform-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: white;
}

.badge-shopee { background: #ee4d2d; }
.badge-aliexpress { background: #e62e04; }
.badge-mercadolibre { background: #fff159; color: #333; }

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 700;
}

.card-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 38px; /* Fixed height for alignment */
}

.card-price {
    margin-top: auto;
}

.current-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.old-price {
    font-size: 14px;
    text-decoration: line-through;
    color: var(--text-light);
    margin-left: 5px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-light);
}

.store-info {
    display: flex;
    align-items: center;
    gap: 5px;
}

.rating {
    color: var(--accent);
}

.btn-buy {
    display: block;
    text-align: center;
    padding: 10px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    margin-top: 15px;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-buy:hover {
    background: #ff6b81;
}

/* Footer */
.main-footer {
    background: var(--secondary);
    color: white;
    padding: 50px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: #a4b0be;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.copyright {
    border-top: 1px solid #3f4a5c;
    padding-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #a4b0be;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
    }
    .main-nav {
        order: 3;
    }
    .search-bar {
        order: 2;
        max-width: 100%;
    }
}
