* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #2c3e50;
    line-height: 1.6;
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 5%;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo span {
    color: #00d4ff;
    font-weight: bold;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #00d4ff;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: #00d4ff;
    transform: translateY(-2px);
}

.search-icon {
    background: rgba(0, 212, 255, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.search-box {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    width: 180px;
    transition: all 0.3s ease;
}

.search-box::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-box:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.6);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

/* Hero Section */
.hero {
    height: 60vh;
    background: linear-gradient(135deg, rgba(15, 12, 41, 0.8) 0%, rgba(48, 43, 99, 0.8) 100%), url('https://images.unsplash.com/photo-1526733158173-e1b231f394c1?q=80&w=1000') no-repeat center/cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: fadeIn 1s ease-in;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.8s ease-out;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    opacity: 0.95;
    animation: slideUp 0.8s ease-out 0.2s backwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn {
    margin-top: 20px;
    padding: 14px 40px;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.3);
    border: none;
    cursor: pointer;
    animation: slideUp 0.8s ease-out 0.4s backwards;
    display: inline-block;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 212, 255, 0.5);
    background: linear-gradient(135deg, #00ffff 0%, #00d4ff 100%);
}

.btn:active {
    transform: translateY(-1px);
}

/* Product Section */
main {
    background: white;
    margin: 60px 0;
    padding: 60px 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
    font-weight: 800;
    color: #0f0c29;
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #00d4ff, #0099cc);
    border-radius: 2px;
}

/* Filter Buttons */
.filters {
    background: white;
    padding: 30px 0;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.filter-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    padding: 0 20px;
}

.filter-btn {
    padding: 10px 25px;
    background: white;
    border: 2px solid rgba(0, 212, 255, 0.2);
    color: #0f0c29;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.filter-btn:hover {
    border-color: #00d4ff;
    color: #00d4ff;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.3);
}

/* Blog Grid & Article Cards */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    padding: 0 5%;
    margin-bottom: 50px;
}

.article-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 212, 255, 0.1);
    animation: fadeInUp 0.6s ease-out;
    display: flex;
    flex-direction: column;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 212, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.3);
}

.article-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 200px;
    cursor: pointer;
}

.article-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-image-wrapper img {
    transform: scale(1.08);
}

.category-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: capitalize;
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.article-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-content h3 {
    font-size: 1.4rem;
    color: #0f0c29;
    margin-bottom: 12px;
    line-height: 1.4;
    transition: color 0.3s ease;
    cursor: pointer;
}

.article-card:hover .article-content h3 {
    color: #00d4ff;
}

/* Price & Actions */
.price-tag {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.current-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: #0f0c29;
}

.old-price {
    font-size: 1rem;
    color: #95a5a6;
    text-decoration: line-through;
}

.card-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.add-cart-btn {
    flex: 1;
    padding: 10px;
    background: #0f0c29;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-cart-btn:hover {
    background: #302b63;
}

.view-btn {
    width: 40px;
    padding: 10px;
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn:hover {
    background: #00d4ff;
    color: white;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    color: white;
    padding: 40px 0;
    text-align: center;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100%;
    background: white;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    padding: 0;
}

.cart-sidebar.open {
    right: 0;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1500;
    display: none;
    backdrop-filter: blur(2px);
}

.cart-overlay.open {
    display: block;
}

.cart-header {
    padding: 20px 25px;
    background: #0f0c29;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.cart-header h2 {
    font-size: 1.4rem;
    font-weight: 600;
}

.close-cart {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.3s;
}

.close-cart:hover {
    transform: rotate(90deg);
    color: #00d4ff;
}

.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.empty-cart-msg {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #7f8c8d;
    text-align: center;
    padding: 20px;
    font-size: 1.1rem;
}

.empty-cart-msg i {
    font-size: 4rem;
    margin-bottom: 15px;
    color: #e0e0e0;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    transition: all 0.3s;
}

.cart-item:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.cart-item img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #2c3e50;
    margin-bottom: 4px;
}

.cart-item-price {
    color: #00d4ff;
    font-weight: 600;
    font-size: 0.9rem;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid #ced4da;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: #00d4ff;
    border-color: #00d4ff;
    color: white;
}

.remove-btn {
    color: #e74c3c;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    margin-left: 10px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.remove-btn:hover {
    opacity: 1;
}

.cart-footer {
    padding: 25px;
    background: white;
    border-top: 1px solid #e9ecef;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
}

.total-price {
    display: flex;
    justify-content: space-between;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #2c3e50;
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.open {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 900px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.modal-overlay.open .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.close-modal:hover {
    background: #f1f1f1;
    transform: rotate(90deg);
}

.modal-body {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .modal-body {
        flex-direction: row;
        height: 500px;
    }
    
    .modal-image {
        width: 50%;
        height: 100%;
    }
    
    .modal-info {
        width: 50%;
        overflow-y: auto;
    }
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info {
    padding: 40px;
    display: flex;
    flex-direction: column;
}

#modal-title {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

#modal-price {
    font-size: 1.5rem;
    color: #00d4ff;
    font-weight: 700;
    margin-bottom: 20px;
}

#modal-desc {
    color: #555;
    line-height: 1.8;
    margin-bottom: 30px;
}

.modal-actions {
    margin-top: auto;
}

.add-to-cart-btn {
    width: 100%;
    padding: 16px;
    background: #0f0c29;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.add-to-cart-btn:hover {
    background: #302b63;
    transform: translateY(-2px);
}

/* Toast Notification */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 5000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInRight 0.3s ease-out;
}

.toast.success {
    border-left: 4px solid #00d4ff;
}

.toast.error {
    border-left: 4px solid #ff4757;
}

.toast.info {
    border-left: 4px solid #ffa502;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.2rem;
    color: white;
    transition: color 0.3s;
}

.cart-icon:hover {
    color: #00d4ff;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #00d4ff;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: bold;
}
