/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600&family=Lato:wght@300;400;700&display=swap');

/* CSS Variables */
:root {
    --primary: #1A1A1A;
    --secondary: #8B4513;
    --accent: #D4AF37;
    --background: #FAFAFA;
    --text: #2C2C2C;
    --highlight: #4A5568;
    --white: #FFFFFF;
    --light-gray: #F8F9FA;
    --border: #E2E8F0;
    --shadow: rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--background);
    overflow-x: hidden;
    padding-top: 80px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--primary);
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.75rem; }
h3 { font-size: 2.25rem; }
h4 { font-size: 1.875rem; }
h5 { font-size: 1.5rem; }
h6 { font-size: 1.25rem; }

p {
    font-family: 'Lato', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    color: var(--text);
    line-height: 1.7;
}

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

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

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

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

/* Animation Classes */
.animate-fade-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-slide-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

.animate-slide-right {
    animation: slideInRight 0.8s ease-out forwards;
}

.animate-scale {
    animation: scaleIn 0.6s ease-out forwards;
}

/* Delays for staggered animations */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* Header and Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: var(--transition);
    padding: 1rem 0;
    box-shadow: 0 2px 20px var(--shadow);
    z-index: 1030;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 30px var(--shadow);
}

.navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary) !important;
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 1.2rem;
}

.logo {
    height: 50px;
    width: auto;
    margin-right: 1rem;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: var(--text) !important;
    margin: 0 0.5rem;
    padding: 0.75rem 1rem !important;
    position: relative;
    transition: var(--transition);
    border-radius: 0.375rem;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 100%;
}

.navbar-nav .nav-link:hover {
    color: var(--accent) !important;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--highlight) 100%);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    margin-top: -80px;
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="0.5" fill="rgba(255,255,255,0.03)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
}

.hero h1 {
    color: var(--white);
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    opacity: 0;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
    opacity: 0;
}

.hero-logo {
    max-width: 300px;
    height: auto;
    margin-bottom: 2rem;
    opacity: 0;
    transform: scale(0.8);
}

/* Buttons */
.btn {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--accent);
    color: var(--primary);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
    background: #C19B26;
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(212, 175, 55, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--white);
}

.btn-secondary:hover {
    background: #7A3E11;
    color: var(--white);
    transform: translateY(-2px);
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 1rem;
    box-shadow: 0 10px 30px var(--shadow);
    transition: var(--transition);
    border: none;
    overflow: hidden;
}

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

.card-body {
    padding: 2rem;
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
}

.card-text {
    color: var(--text);
    margin-bottom: 1.5rem;
}

/* Sections */
.section {
    padding: 5rem 0;
    position: relative;
    z-index: 2;
    background: var(--background);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.product-card {
    background: var(--white);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow);
    transition: var(--transition);
}

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

.product-image {
    height: 250px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.product-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.product-card:hover .product-image::before {
    transform: translateX(100%);
}

.product-info {
    padding: 2rem;
}

.product-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.product-description {
    color: var(--text);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.download-btn {
    background: var(--accent);
    color: var(--primary);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.download-btn:hover {
    background: #C19B26;
    color: var(--primary);
    transform: translateY(-2px);
    text-decoration: none;
}

/* Contact Form */
.contact-form {
    background: var(--white);
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: 0 20px 40px var(--shadow);
}

.form-group {
    margin-bottom: 2rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary);
}

.form-control {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    background: var(--white);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-control.is-invalid {
    border-color: #dc3545;
}

.invalid-feedback {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Footer */
.footer {
    background: var(--primary);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 5rem;
}

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

.footer-section h5 {
    color: var(--accent);
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* Admin Styles */
.admin-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.admin-header {
    background: var(--primary);
    color: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.stat-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 10px 30px var(--shadow);
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text);
    font-weight: 500;
}

.admin-section {
    background: var(--white);
    border-radius: 1rem;
    box-shadow: 0 10px 30px var(--shadow);
    margin-bottom: 2rem;
    overflow: hidden;
}

.admin-section-header {
    background: var(--light-gray);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
}

.admin-section-body {
    padding: 2rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    background: var(--light-gray);
    font-weight: 600;
    color: var(--primary);
}

.table tr:hover {
    background: var(--light-gray);
}

/* Alert Messages */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border: none;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-error,
.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-info {
    background: #cce7ff;
    color: #004085;
    border-left: 4px solid #007bff;
}

/* Mobile Navigation Improvements */
.navbar-toggler {
    border: 2px solid var(--primary);
    padding: 0.375rem 0.5rem;
    font-size: 1.1rem;
    border-radius: 0.375rem;
    transition: var(--transition);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(26, 26, 26, 0.25);
    border-color: var(--accent);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2826, 26, 26, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 1.2em;
    height: 1.2em;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.75rem; }
    
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar-nav {
        background: rgba(255, 255, 255, 0.98);
        margin-top: 1rem;
        padding: 1rem;
        border-radius: 0.5rem;
        box-shadow: 0 4px 15px var(--shadow);
    }
    
    .navbar-nav .nav-link {
        margin: 0.25rem 0;
        padding: 0.75rem 1rem !important;
        text-align: center;
        background: transparent;
        transition: var(--transition);
    }
    
    .navbar-nav .nav-link:hover {
        background: var(--light-gray);
        border-radius: 0.375rem;
    }
    
    .hero {
        min-height: 90vh;
        text-align: center;
        padding-top: 100px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .hero p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .hero-logo {
        max-width: 200px;
        margin-bottom: 1.5rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .contact-form {
        padding: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .admin-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .table-responsive {
        overflow-x: auto;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }
.hidden { display: none; }
.visible { display: block; }
