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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #ffffff;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* General image animations */
img {
    animation: fadeIn 0.6s ease-out both;
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    img,
    .product-card,
    .product-name,
    .product-price,
    .btn-product,
    .section-title,
    .hero-title,
    .logo-image,
    .logo span,
    .nav-link,
    .footer-section,
    .footer-bottom {
        animation: none !important;
        opacity: 1 !important;
    }
}

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

@media (max-width: 1200px) {
    .container {
        padding: 0 15px;
    }
}

/* Header */
.header {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-image {
    height: 63px;
    width: auto;
    object-fit: contain;
    max-width: 100%;
    animation: fadeIn 0.6s ease-out;
}

.logo span {
    animation: slideInLeft 0.6s ease-out 0.2s both;
}

@media (max-width: 768px) {
    .logo-image {
        height: 45px;
    }
    
    .logo span {
        font-size: 20px !important;
    }
}

@media (max-width: 480px) {
    .logo-image {
        height: 36px;
    }
    
    .logo span {
        font-size: 18px !important;
    }
}

.nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 5px;
    animation: fadeIn 0.5s ease-out both;
}

.nav-link:nth-child(1) { animation-delay: 0.1s; }
.nav-link:nth-child(2) { animation-delay: 0.2s; }
.nav-link:nth-child(3) { animation-delay: 0.3s; }
.nav-link:nth-child(4) { animation-delay: 0.4s; }

.nav-link:hover {
    color: #667eea;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.nav-link.active {
    color: #667eea;
}

.cart-link {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-icon {
    font-size: 18px;
}

.cart-count {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

/* Hero Section */
.hero {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 100%;
    background-image: url('../img/Banner.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    animation: fadeIn 1s ease-out;
}

.hero-image::before {
    display: none;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 500px;
    z-index: 2;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    color: white;
    margin-bottom: 30px;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.8s ease-out 0.3s both;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    animation: scaleIn 0.6s ease-out 0.5s both;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

/* CTA Button Section */
.cta-section {
    padding: 20px 0;
    background-color: #ffffff;
    text-align: center;
}

.btn-buy-now {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px 50px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    animation: fadeIn 0.8s ease-out 0.3s both;
}

.btn-buy-now:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-buy-now:active {
    transform: translateY(-1px);
}

/* Products Section */
.products-section {
    padding: 40px 0 80px 0;
    background-color: #ffffff;
    scroll-margin-top: 80px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 50px;
    text-align: center;
    animation: slideUp 0.8s ease-out both;
    padding: 0 15px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

/* Ensure 2 columns on mobile */
@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeIn 0.6s ease-out both;
    opacity: 0;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; }
.product-card:nth-child(7) { animation-delay: 0.7s; }
.product-card:nth-child(8) { animation-delay: 0.8s; }
.product-card:nth-child(9) { animation-delay: 0.9s; }
.product-card:nth-child(10) { animation-delay: 1s; }
.product-card:nth-child(11) { animation-delay: 1.1s; }
.product-card:nth-child(12) { animation-delay: 1.2s; }
.product-card:nth-child(13) { animation-delay: 1.3s; }
.product-card:nth-child(14) { animation-delay: 1.4s; }
.product-card:nth-child(15) { animation-delay: 1.5s; }
.product-card:nth-child(16) { animation-delay: 1.6s; }
.product-card:nth-child(n+17) { animation-delay: 1.7s; }

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.product-image-link {
    display: block;
    text-decoration: none;
    cursor: pointer;
}

.product-image {
    width: 100%;
    height: 250px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.product-image img {
    animation: scaleIn 0.6s ease-out 0.2s both;
}

.product-image-link:hover .product-image {
    background-color: #e9ecef;
}

.product-image-placeholder {
    width: 100%;
    height: 100%;
    background-color: #f8f9fa;
}

.product-info {
    padding: 25px;
}

.product-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.4;
    animation: slideUp 0.5s ease-out 0.3s both;
}

.product-price {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    animation: slideUp 0.5s ease-out 0.4s both;
}

.btn-product {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 1s ease, transform 1s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

@keyframes buttonPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    }
}

.btn-product:hover {
    opacity: 0.9;
    transform: scale(1.01);
}

.btn-product:active {
    opacity: 0.8;
    transform: scale(0.99);
}

.btn-product:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    animation: none;
}

.btn-product-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-remove-from-cart {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-remove-from-cart:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653a8f 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-remove-from-cart:active {
    transform: scale(0.95);
}

/* Responsive Design */

/* Tablets and smaller desktops */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 25px;
    }
    
    .hero {
        height: 350px;
    }
    
    .hero-title {
        font-size: 42px;
        margin-bottom: 20px;
    }
    
    .section-title {
        font-size: 30px;
    }
    
    .product-info {
        padding: 20px;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        padding: 15px 0;
    }

    .nav {
        gap: 15px;
        font-size: 14px;
    }
    
    .nav-link {
        font-size: 14px;
    }

    .hero {
        height: 350px;
    }

    .hero-title {
        font-size: 32px;
        margin-bottom: 20px;
    }
    
    .hero-content {
        max-width: 100%;
        padding: 0 20px;
    }

    .cta-section {
        padding: 15px 0;
    }
    
    .btn-buy-now {
        padding: 16px 40px;
        font-size: 16px;
    }

    .products-section {
        padding: 30px 0 60px 0;
        scroll-margin-top: 70px;
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .section-title {
        font-size: 26px;
        margin-bottom: 40px;
    }
    
    .product-image {
        height: 200px;
    }
    
    .product-name {
        font-size: 16px;
    }
    
    .product-price {
        font-size: 22px;
    }
    
    .btn-primary {
        padding: 14px 32px;
        font-size: 15px;
    }
}

/* Mobile devices */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .header-content {
        padding: 10px 0;
    }
    
    .logo-image {
        height: 38px;
    }
    
    .logo span {
        font-size: 20px !important;
    }
    
    .nav {
        gap: 10px;
        font-size: 12px;
    }
    
    .nav-link {
        font-size: 12px;
        padding-bottom: 3px;
    }
    
    .cart-icon {
        font-size: 14px;
    }
    
    .cart-count {
        width: 18px;
        height: 18px;
        font-size: 11px;
    }

    .hero {
        height: 280px;
    }

    .hero-title {
        font-size: 22px;
        margin-bottom: 15px;
        line-height: 1.3;
        padding: 0 10px;
    }
    
    .btn-primary {
        padding: 11px 24px;
        font-size: 13px;
    }

    .cta-section {
        padding: 15px 0;
    }
    
    .btn-buy-now {
        padding: 14px 35px;
        font-size: 15px;
        border-radius: 8px;
    }

    .products-section {
        padding: 20px 0 35px 0;
        scroll-margin-top: 60px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .section-title {
        font-size: 22px;
        margin-bottom: 25px;
        padding: 0 15px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .product-card {
        border-radius: 8px;
    }
    
    .product-image {
        height: 140px;
    }
    
    .product-info {
        padding: 12px;
    }
    
    .product-name {
        font-size: 13px;
        margin-bottom: 8px;
        line-height: 1.3;
    }
    
    .product-price {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .btn-product {
        padding: 8px 12px;
        font-size: 12px;
        border-radius: 6px;
    }
}

/* Small mobile devices */
@media (max-width: 360px) {
    .container {
        padding: 0 10px;
    }
    
    .logo-image {
        height: 35px;
    }
    
    .logo span {
        font-size: 18px !important;
    }
    
    .nav {
        gap: 8px;
        font-size: 11px;
    }
    
    .nav-link {
        font-size: 11px;
    }
    
    .hero {
        height: 260px;
    }
    
    .hero-title {
        font-size: 20px;
        padding: 0 8px;
    }
    
    .btn-primary {
        padding: 10px 20px;
        font-size: 12px;
    }
    
    .cta-section {
        padding: 12px 0;
    }
    
    .btn-buy-now {
        padding: 12px 30px;
        font-size: 14px;
        border-radius: 8px;
    }
    
    .section-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }
    
    .product-image {
        height: 130px;
    }
    
    .product-info {
        padding: 10px;
    }
    
    .product-name {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .product-price {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .btn-product {
        padding: 7px 10px;
        font-size: 11px;
    }
}

/* Footer */
.footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 25px 20px 15px;
    margin-top: 0;
    animation: slideUp 0.8s ease-out both;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 20px;
}

.footer-section {
    animation: fadeIn 0.6s ease-out both;
}

.footer-section:nth-child(1) { animation-delay: 0.1s; }
.footer-section:nth-child(2) { animation-delay: 0.2s; }
.footer-section:nth-child(3) { animation-delay: 0.3s; }
.footer-section:nth-child(4) { animation-delay: 0.4s; }

.footer-section h3 {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    animation: slideUp 0.5s ease-out 0.2s both;
}

.footer-section p,
.footer-section a {
    font-size: 13px;
    color: #bdc3c7;
    text-decoration: none;
    line-height: 1.5;
    display: block;
    margin-bottom: 6px;
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: #667eea;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 6px;
}

.footer-links a {
    display: inline-block;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
    font-size: 18px;
}

.footer-social a:hover {
    background-color: #667eea;
    transform: translateY(-3px);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom {
    animation: fadeIn 0.6s ease-out 0.5s both;
}

.footer-bottom p {
    font-size: 12px;
    color: #95a5a6;
    margin: 0;
    animation: slideUp 0.5s ease-out 0.6s both;
}

@media (max-width: 768px) {
    .footer {
        padding: 20px 15px 12px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 15px;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-section h3 {
        margin-bottom: 10px;
    }
    
    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 18px 10px 10px;
    }
    
    .footer-content {
        gap: 18px;
        margin-bottom: 12px;
    }
    
    .footer-section h3 {
        font-size: 15px;
        margin-bottom: 8px;
    }
    
    .footer-section p,
    .footer-section a {
        font-size: 12px;
        margin-bottom: 5px;
    }
    
    .footer-links li {
        margin-bottom: 5px;
    }
    
    .footer-bottom {
        padding-top: 12px;
    }
    
    .footer-bottom p {
        font-size: 11px;
    }
}
