:root {
    --primary: #ff5722;
    --secondary: #2196f3;
    --dark: #333;
    --light: #f5f5f5;
    --danger: #f44336;
    --success: #4caf50;
    --warning: #ff9800;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.hero {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 30px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn {
    padding: 10px 20px;
    background-color: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-secondary {
    background-color: white;
    color: var(--primary);
}

.categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.category-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-img {
    height: 200px;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-content {
    padding: 20px;
    text-align: center;
}

.form-control{
    height: 35px;
    padding: 5px;
    border: 2px solid black;
    border-radius: 4px;
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
    position: relative;
}

.section-title::after {
    content: "";
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--primary);
    margin: 10px auto;
}

.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.product-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--danger);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    z-index: 1;
}

.product-img {
    height: 250px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
    position: relative; /* Ensure this is relative to place badge correctly */
}

.product-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-content {
    padding: 15px;
}

.product-title {
    font-size: 16px;
    margin-bottom: 10px;
    height: 80px;
    overflow: hidden;
}

.product-price {
    font-weight: bold;
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
    margin-left: 8px;
}

.product-actions {
    display: flex;
}

.add-to-cart {
    flex: 1;
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 8px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 4px;
}

.wishlist-btn {
    width: 40px;
    background-color: transparent;
    border: 1px solid #ddd;
    margin-left: 10px;
    cursor: pointer;
    border-radius: 4px;
}

.deals-timer {
    text-align: center;
    background-color: var(--warning);
    color: white;
    padding: 10px;
    margin-bottom: 30px;
    border-radius: 4px;
    font-weight: bold;
}

footer {
    background-color: var(--dark);
    color: white;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-column h3 {
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #bbb;
    text-decoration: none;
}

.footer-links a:hover {
    color: white;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    color: #bbb;
    font-size: 14px;
}


/* DISCOUT BANNER */

.discount-banner {
    position: relative;
    background-color: var(--warning);
    color: white;
    text-align: center;
    padding: 10px;
    font-weight: bold;
    animation: slide 0.5s ease;
}
.close-banner {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}
nav .active{
    background-color: var(--danger);
}

@keyframes flashBtn {
    0% {background-color: var(--warning);color:white}
    50% {background-color: #dd8500;color:white}
    100% {background-color: var(--warning);color:white}
}

.btn-flashing{
    animation: flashBtn 1s infinite;
    font-weight: bold;
}

@media (max-width: 992px) {
    .products {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .checkout-container,
    .product-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .categories,
    .products {
        grid-template-columns: repeat(2, 2fr);
    }
    
    .cart-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .products {
        grid-template-columns: 1fr;
    }
    
}
a.product-link {
    text-decoration: none; /* For normal state */
    color: var(--dark);
}
