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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

body.loaded {
    opacity: 1;
}

/* Header Styles */
header {
    background: rgba(255, 255, 255, 0.95);
    text-align: center;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

header h1 {
    color: #764ba2;
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

header p {
    color: #666;
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}

.tagline {
    font-style: italic;
    color: #888;
    font-size: 1.1rem !important;
}

.product-header h1 {
    font-size: 2.2rem;
}

/* Navigation */
nav {
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

nav a, .back-btn {
    text-decoration: none;
    color: #764ba2;
    margin: 0 1rem;
    padding: 0.7rem 1.5rem;
    border-radius: 30px;
    transition: all 0.3s ease;
    border: 2px solid #764ba2;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    display: inline-block;
}

nav a:hover, .back-btn:hover, nav a.active {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(118, 75, 162, 0.3);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    padding: 3rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

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

.product-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.product-overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.category {
    background: rgba(255, 255, 255, 0.9);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    color: #764ba2;
    backdrop-filter: blur(10px);
}

.product-info {
    padding: 1.5rem;
}

.product-card h3 {
    color: #333;
    margin-bottom: 0.8rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.price {
    font-size: 1.8rem;
    font-weight: bold;
    color: #764ba2;
    margin-bottom: 1rem;
}

.description-preview {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.view-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 30px;
    transition: all 0.3s ease;
    display: inline-block;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.view-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

/* Product Detail Page */
.product-detail {
    max-width: 1200px;
    margin: 2rem auto;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

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

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

.image-zoom {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 2px solid #764ba2;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    pointer-events: none;
    display: none;
    backdrop-filter: blur(2px);
}

.product-info {
    padding: 2.5rem;
}

.breadcrumb {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: #764ba2;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.product-info h2 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 2.2rem;
    font-weight: 700;
}

.category-badge {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 1rem;
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.feature-badge {
    background: rgba(118, 75, 162, 0.1);
    color: #764ba2;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.description {
    margin-bottom: 2rem;
}

.description h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.description p {
    color: #666;
    line-height: 1.8;
    font-size: 1rem;
}

.action-buttons {
    margin-bottom: 2rem;
}

.buy-now-btn {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    padding: 1.2rem 2.5rem;
    border: none;
    border-radius: 30px;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.buy-now-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(40, 167, 69, 0.4);
}

.buy-now-btn.clicked {
    transform: scale(0.95);
}

.share-section h4 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.share-buttons {
    display: flex;
    gap: 1rem;
}

.share-btn {
    flex: 1;
    text-align: center;
    padding: 1rem;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.facebook {
    background: #3b5998;
    color: white;
}

.whatsapp {
    background: #25d366;
    color: white;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.care-instructions {
    background: rgba(118, 75, 162, 0.05);
    padding: 1.5rem;
    border-radius: 15px;
    border-left: 4px solid #764ba2;
}

.care-instructions h4 {
    color: #764ba2;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.care-instructions ul {
    list-style: none;
    padding: 0;
}

.care-instructions li {
    color: #666;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.care-instructions li::before {
    content: "✨";
    position: absolute;
    left: 0;
}

/* About and Contact Sections */
.about-section, .contact-section {
    background: rgba(255, 255, 255, 0.95);
    margin: 3rem 0;
    padding: 3rem 0;
    text-align: center;
}

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

.about-section h2, .contact-section h2 {
    color: #764ba2;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.about-section p, .contact-section p {
    font-size: 1.2rem;
    color: #666;
    max-width: 800px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature h3 {
    color: #764ba2;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.contact-btn {
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.contact-btn.whatsapp {
    background: #25d366;
    color: white;
}

.contact-btn.facebook {
    background: #3b5998;
    color: white;
}

.contact-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Related Products */
.related-products {
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem 0;
    margin-top: 2rem;
}

.related-products h3 {
    text-align: center;
    color: #764ba2;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.related-item {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.related-item:hover {
    transform: translateY(-5px);
}

.related-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.related-item h4 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* Admin Styles */
.admin-container {
    max-width: 1000px;
    margin: 2rem auto;
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.admin-header h2 {
    color: #764ba2;
    font-size: 2.2rem;
    font-weight: 700;
}

.admin-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-nav span {
    color: #666;
    font-weight: 500;
}

.view-site-btn, .logout-btn {
    padding: 0.6rem 1.2rem;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-site-btn {
    background: #007bff;
    color: white;
}

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

.view-site-btn:hover, .logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Login Form */
.login-form, .product-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    position: relative;
}

.login-form input, .product-form input, .product-form textarea, .product-form select {
    width: 100%;
    padding: 1.2rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.login-form input:focus, .product-form input:focus, .product-form textarea:focus, .product-form select:focus {
    outline: none;
    border-color: #764ba2;
    box-shadow: 0 0 0 3px rgba(118, 75, 162, 0.1);
}

.login-btn, .add-product-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 1.2rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-btn:hover, .add-product-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.login-btn:disabled, .add-product-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.back-link {
    color: #764ba2;
    text-decoration: none;
    font-size: 0.95rem;
    margin-top: 1rem;
    display: inline-block;
    transition: color 0.3s ease;
}

.back-link:hover {
    text-decoration: underline;
}

/* Admin Sections */
.admin-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #f0f0f0;
}

.admin-section:last-child {
    border-bottom: none;
}

.admin-section h3 {
    color: #764ba2;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    font-weight: 600;
}

/* Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h4 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 1rem;
    opacity: 0.9;
}

/* Form Styles */
.form-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group small {
    color: #666;
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

.image-preview {
    margin-top: 1rem;
    text-align: center;
}

.image-preview img {
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Products Management */
.products-table {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    border: 2px solid #f0f0f0;
    border-radius: 15px;
    background: #fafafa;
    transition: all 0.3s ease;
}

.product-row:hover {
    border-color: #764ba2;
    background: white;
    box-shadow: 0 5px 20px rgba(118, 75, 162, 0.1);
}

.product-image-admin {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.product-image-admin img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-details {
    flex: 1;
}

.product-details h4 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.product-price {
    color: #764ba2;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.product-category {
    margin-bottom: 0.3rem;
}

.product-date {
    color: #888;
    font-size: 0.9rem;
}

.product-actions {
    display: flex;
    gap: 0.8rem;
    flex-shrink: 0;
}

.action-btn {
    padding: 0.7rem 1.2rem;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.view-btn {
    background: #007bff;
    color: white;
}

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

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Category Statistics */
.category-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.category-stat {
    background: rgba(118, 75, 162, 0.1);
    padding: 1rem 1.5rem;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.category-name {
    color: #764ba2;
    font-weight: 600;
}

.category-count {
    background: #764ba2;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: bold;
}

/* Messages */
.success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #28a745;
    font-weight: 500;
}

.error, .error-message {
    background: linear-gradient(135deg, #f8d7da, #f1b0b7);
    color: #721c24;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #dc3545;
    font-weight: 500;
}

.error-message {
    max-width: 1200px;
    margin: 2rem auto;
    text-align: center;
}

.no-products, .no-products-admin {
    text-align: center;
    padding: 3rem;
    color: #666;
    background: rgba(118, 75, 162, 0.05);
    border-radius: 15px;
    border: 2px dashed #764ba2;
}

.no-products h3, .no-products-admin p {
    color: #764ba2;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 2rem;
    background: rgba(255, 255, 255, 0.95);
    color: #666;
    margin-top: 3rem;
    backdrop-filter: blur(10px);
}

footer p {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

footer p:last-child {
    font-style: italic;
    color: #888;
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
        margin: 1rem;
    }
    
    .product-detail .product-image {
        height: 300px;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
        padding: 2rem 1rem;
        gap: 2rem;
    }
    
    .share-buttons {
        flex-direction: column;
    }
    
    .product-row {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .product-actions {
        justify-content: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .admin-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .admin-nav {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .contact-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 2.2rem;
    }
    
    nav a, .back-btn {
        margin: 0.3rem;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .admin-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .product-info {
        padding: 1.5rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card h4 {
        font-size: 2rem;
    }
    
    header {
        padding: 1.5rem 1rem;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
}

/* Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card, .feature, .stat-card, .related-item {
    animation: fadeInUp 0.6s ease-out;
}

.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; }

/* Scroll Behavior */
html {
    scroll-behavior: smooth;
}