:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #0f172a;
    --accent: #f59e0b;
    --success: #10b981;
    --body-bg: #ffffff;
    --body-color: #334155;
    --card-bg: #ffffff;
    --section-bg: #f8fafc;
    --border-color: #e2e8f0;
    --navbar-bg: rgba(15, 23, 42, 0.95);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
    --radius: 12px;
    --transition: all 0.3s ease;
}

[data-bs-theme="dark"] {
    --body-bg: #0f172a;
    --body-color: #cbd5e1;
    --card-bg: #1e293b;
    --section-bg: #1e293b;
    --border-color: #334155;
    --navbar-bg: rgba(15, 23, 42, 0.98);
    --secondary: #f1f5f9;
}

* { box-sizing: border-box; }

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--body-color);
    background: var(--body-bg);
    padding-top: 76px;
    transition: var(--transition);
}

h1, h2, h3, .section-title {
    font-family: 'Playfair Display', serif;
    color: var(--secondary);
}

[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] .section-title {
    color: #f1f5f9;
}

/* Navbar */
#mainNav {
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    padding: 0.75rem 0;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.navbar-brand .site-logo {
    height: 52px;
    width: auto;
    display: block;
    flex-shrink: 0;
}

.navbar-brand .brand-title {
    color: #fff;
    font-weight: 700;
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    line-height: 1.25;
    letter-spacing: 0.02em;
    max-width: 180px;
}

@media (min-width: 992px) {
    .navbar-brand .brand-title {
        max-width: none;
        font-size: 1.2rem;
        white-space: nowrap;
    }
}

@media (max-width: 575px) {
    .navbar-brand .brand-title {
        font-size: 0.85rem;
        max-width: 140px;
    }

    .navbar-brand .site-logo {
        height: 44px;
    }
}

.navbar-brand .brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    margin-right: 0.5rem;
}

.brand-text {
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: 1px;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
}

.nav-link:hover { color: var(--primary-light) !important; }

.theme-toggle {
    border-radius: 50%;
    width: 38px;
    height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Hero */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
    color: #fff;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%236366f1' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-badge {
    display: inline-block;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: var(--primary-light);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.15rem;
    opacity: 0.85;
    max-width: 540px;
}

.hero-search .form-control {
    border: none;
    padding: 1rem 1.25rem;
    border-radius: var(--radius) 0 0 var(--radius);
}

.hero-search .btn {
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 0 2rem;
    background: var(--primary);
    border-color: var(--primary);
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
}

.stat-item strong {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-light);
}

.stat-item span {
    font-size: 0.85rem;
    opacity: 0.7;
}

.hero-visual {
    position: relative;
    height: 400px;
}

.hero-card {
    position: absolute;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    font-weight: 600;
    animation: float 6s ease-in-out infinite;
}

.hero-card i { font-size: 1.5rem; color: var(--primary-light); }
.hero-card-1 { top: 10%; left: 10%; animation-delay: 0s; }
.hero-card-2 { top: 30%; right: 5%; animation-delay: 1s; }
.hero-card-3 { bottom: 30%; left: 5%; animation-delay: 2s; }
.hero-card-4 { bottom: 10%; right: 15%; animation-delay: 3s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Sections */
.section-padding { padding: 5rem 0; }
.bg-section { background: var(--section-bg); }

.section-badge {
    display: inline-block;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    margin-bottom: 0.75rem;
}

.section-subtitle {
    color: var(--body-color);
    opacity: 0.7;
    max-width: 600px;
    margin: 0 auto;
}

.page-header {
    background: linear-gradient(135deg, #0f172a, #312e81);
    color: #fff;
    padding: 4rem 0 3rem;
    text-align: center;
}

.page-header h1 { color: #fff; margin-bottom: 0.5rem; }
.page-header p { opacity: 0.8; }
.page-header .breadcrumb { justify-content: center; }
.page-header .breadcrumb-item a { color: var(--primary-light); }
.page-header .breadcrumb-item.active { color: rgba(255,255,255,0.7); }

/* Template Cards */
.template-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.template-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.template-card-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.template-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.template-card:hover .template-card-img img { transform: scale(1.05); }

.template-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.template-card:hover .template-card-overlay { opacity: 1; }

.template-card-body { padding: 1.25rem; }

.template-card-title a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
}

[data-bs-theme="dark"] .template-card-title a { color: #f1f5f9; }
.template-card-title a:hover { color: var(--primary); }

.template-card-desc {
    font-size: 0.875rem;
    opacity: 0.7;
    margin: 0.5rem 0;
}

.template-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
}

.template-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Category Cards */
.category-card {
    display: block;
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-card-img {
    aspect-ratio: 4/3;
    overflow: hidden;
}

.category-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-card:hover .category-card-img img { transform: scale(1.08); }

.category-card-body {
    padding: 1rem;
    text-align: center;
}

.category-card-body h6 {
    margin: 0;
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.9rem;
}

[data-bs-theme="dark"] .category-card-body h6 { color: #f1f5f9; }

/* Reviews */
.review-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.review-text {
    font-style: italic;
    opacity: 0.85;
    margin-bottom: 1rem;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.review-avatar {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
}

/* Contact */
.contact-info-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-item:last-child { margin-bottom: 0; }

.contact-icon {
    width: 48px;
    height: 48px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-item h6 { margin-bottom: 0.25rem; font-weight: 600; }
.contact-item a { color: var(--primary); text-decoration: none; }
.contact-item p { margin: 0; opacity: 0.7; }

.contact-form {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

/* Template Detail */
.template-gallery .main-image img {
    box-shadow: var(--shadow-lg);
}

.gallery-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.6;
    transition: var(--transition);
    border: 2px solid transparent;
}

.gallery-thumb.active,
.gallery-thumb:hover {
    opacity: 1;
    border-color: var(--primary);
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.tech-badges .badge {
    margin: 0.25rem;
    padding: 0.5rem 0.75rem;
    font-weight: 500;
}

.price-box {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 1.5rem;
    border-radius: var(--radius);
    text-align: center;
}

.price-label { display: block; opacity: 0.8; font-size: 0.9rem; }
.price-value { font-size: 2.5rem; font-weight: 800; }

.order-form-box {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.filter-sidebar {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    position: sticky;
    top: 100px;
}

/* Footer */
.site-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 4rem 0 2rem;
}

.footer-brand {
    color: #fff;
    font-weight: 800;
    font-size: 1.3rem;
}

.footer-brand-link {
    display: inline-block;
    text-decoration: none;
    flex-shrink: 0;
}

.footer-brand-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer-brand-title {
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.3;
}

.footer-logo {
    height: 70px;
    width: auto;
    display: block;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.social-links a {
    display: inline-flex;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-right: 0.5rem;
    transition: var(--transition);
    text-decoration: none;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.contact-info-card .social-links a {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.contact-info-card .social-links a:hover {
    background: var(--primary);
    color: #fff;
}

.site-footer h6 {
    color: #fff;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li { margin-bottom: 0.5rem; }
.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover { color: var(--primary-light); }

.footer-contact {
    list-style: none;
    padding: 0;
}

.footer-contact li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-contact a {
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition);
}

.footer-contact a:hover { color: var(--primary-light); }

.footer-motto {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

.footer-contact i { color: var(--primary-light); width: 20px; flex-shrink: 0; }

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: var(--transition);
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    color: #fff;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 95px;
    right: 25px;
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    z-index: 1000;
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    text-decoration: none;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-stats { gap: 1.5rem; }
    .stat-item strong { font-size: 1.25rem; }
    .section-padding { padding: 3rem 0; }
    .template-card-actions { flex-direction: column; }
    .template-card-actions .btn { width: 100%; }
    .filter-sidebar { position: static; margin-bottom: 1.5rem; }
}
