/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* Navigation */
.navbar {
    background: #333;
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #ff6b6b;
}

.nav-cart {
    position: relative;
}

.nav-cart a {
    color: white;
    font-size: 1.2rem;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff6b6b;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-primary {
    background: #ff6b6b;
    color: white;
}

.btn-primary:hover {
    background: #ff5252;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background: #e9ecef;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-large {
    padding: 12px 30px;
    font-size: 1.1rem;
}

.btn-block {
    display: block;
    width: 100%;
    margin-bottom: 10px;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.product-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.product-description {
    color: #666;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ff6b6b;
    margin-bottom: 15px;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.product-actions .btn {
    flex: 1;
    text-align: center;
    font-size: 0.9rem;
    padding: 8px;
}

/* Product Details Page */
.product-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin: 40px 0;
}

.product-details-image img {
    width: 100%;
    border-radius: 10px;
}

.product-details-price {
    font-size: 2rem;
    color: #ff6b6b;
    margin: 20px 0;
}

.product-details-stock {
    margin-bottom: 20px;
}

.in-stock {
    color: #28a745;
    font-weight: 500;
}

.out-of-stock {
    color: #dc3545;
    font-weight: 500;
}

/* Cart Page */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
}

.cart-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.cart-table td {
    padding: 15px;
    border-bottom: 1px solid #ddd;
}

.cart-product {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-product img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
}

.quantity-input {
    width: 70px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.cart-summary {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin-top: 30px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.summary-row.total {
    font-size: 1.3rem;
    font-weight: bold;
    border-top: 2px solid #ddd;
    padding-top: 15px;
}

/* Checkout Page */
.checkout-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin: 40px 0;
}

.checkout-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff6b6b;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 60px 0 20px;
    margin-top: auto;
}

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

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

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

.footer-section ul li {
    margin-bottom: 10px;
}

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

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

.footer-section i {
    margin-right: 10px;
    color: #ff6b6b;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #ccc;
}

/* About Page */
.about-content {
    max-width: 800px;
    margin: 40px auto;
}

.about-section {
    margin-bottom: 40px;
}

.about-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.benefits-list {
    list-style: none;
}

.benefits-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.benefits-list i {
    color: #28a745;
}

/* Contact Page */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    margin: 40px 0;
}

.contact-details {
    margin-top: 30px;
}

.contact-detail {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-detail i {
    font-size: 1.5rem;
    color: #ff6b6b;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-menu {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .product-details {
        grid-template-columns: 1fr;
    }
    
    .checkout-container {
        grid-template-columns: 1fr;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .cart-table {
        font-size: 0.9rem;
    }
    
    .cart-product {
        flex-direction: column;
        text-align: center;
    }
    
    .cart-table th:nth-child(2),
    .cart-table td:nth-child(2) {
        display: none;
    }
}

/* Utility Classes */
.page-title {
    text-align: center;
    margin: 40px 0;
    font-size: 2.5rem;
    color: #333;
}

.section-title {
    text-align: center;
    margin: 60px 0 40px;
    font-size: 2rem;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

.empty-cart {
    text-align: center;
    padding: 60px 0;
}

.empty-cart i {
    font-size: 5rem;
    color: #ccc;
    margin-bottom: 20px;
}

.empty-cart h2 {
    margin-bottom: 10px;
}

.empty-cart p {
    color: #666;
    margin-bottom: 30px;
}

/* User Navigation */
.nav-user-cart {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-user-dropdown {
    position: relative;
    display: inline-block;
}

.nav-user {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-user:hover {
    background: #444;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background: white;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 5px;
    overflow: hidden;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s;
}

.dropdown-content a:hover {
    background: #f5f5f5;
}

.nav-user-dropdown:hover .dropdown-content {
    display: block;
}

.nav-login, .nav-register {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 5px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-login {
    background: #ff6b6b;
}

.nav-login:hover {
    background: #ff5252;
}

.nav-register {
    background: transparent;
    border: 1px solid white;
}

.nav-register:hover {
    background: white;
    color: #333;
}

@media (max-width: 768px) {
    .nav-user-cart {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .dropdown-content {
        right: auto;
        left: 0;
    }
}

/* Add to your existing CSS */
#mainProductImage {
    cursor: pointer;
    transition: transform 0.2s;
}

#mainProductImage:hover {
    transform: scale(1.02);
}

.thumbnail-item {
    cursor: pointer;
    transition: all 0.2s;
}

.thumbnail-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.thumbnail-item.active {
    border-color: #2563eb;
    border-width: 2px;
}

/* Add this to your existing CSS */
select:disabled {
    background-color: #f1f5f9;
    cursor: wait;
    opacity: 0.7;
}

/* Digital Products Section */
.digital-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
}

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

.digital-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
}

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

.digital-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.digital-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.digital-card:hover .digital-image img {
    transform: scale(1.05);
}

.file-type-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.95);
    color: #10b981;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border: 1px solid #10b981;
}

.digital-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.digital-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #1e293b;
}

.digital-description {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.5;
}

.digital-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
}

.free-badge {
    background: #10b981;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.digital-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #10b981;
}

.file-info {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f0fdf4;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #10b981;
}

.digital-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.digital-actions .btn {
    flex: 1;
    text-align: center;
    padding: 10px;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.payment-status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
}

.payment-pending {
    background: #fff3cd;
    color: #856404;
}

.payment-verified {
    background: #d4edda;
    color: #155724;
}

.payment-failed {
    background: #f8d7da;
    color: #721c24;
}

.transaction-id {
    font-family: monospace;
    background: #f5f5f5;
    padding: 3px 6px;
    border-radius: 3px;
}