/* ============================================
   CEMERLANG KOMPUTER - CUSTOM STYLES
   ============================================ */

/* General */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #212529;
}

/* Header */
.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color);
}

.navbar-nav .nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Cards */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
}

/* Product Card */
.product-card {
    border-radius: 10px;
    overflow: hidden;
}

.product-card .card-img-top {
    transition: transform 0.3s ease;
}

.product-card:hover .card-img-top {
    transform: scale(1.05);
}

.product-card .card-title a {
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 48px;
}

.product-card .card-title a:hover {
    color: var(--primary-color) !important;
}

/* Buttons */
.btn {
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background-color: #25D366;
    border-color: #25D366;
}

.btn-success:hover {
    background-color: #128C7E;
    border-color: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

/* Badges */
.badge {
    font-weight: 600;
    padding: 0.35em 0.65em;
}

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-slide {
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
}

/* Category Card */
.category-card {
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 10px;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1) !important;
}

/* Service Card */
.service-card {
    border-radius: 10px;
    transition: all 0.3s ease;
}

.service-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

.icon-circle {
    transition: all 0.3s ease;
}

.service-card:hover .icon-circle {
    transform: scale(1.1);
}

/* Pagination */
.pagination {
    margin-top: 2rem;
}

.page-link {
    color: var(--primary-color);
    border: 1px solid #dee2e6;
    margin: 0 2px;
    border-radius: 5px;
}

.page-link:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1.5rem;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* Product Detail */
.thumbnail-image {
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail-image:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

/* Footer */
footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: white !important;
}

/* WhatsApp Floating Button */
.btn.position-fixed {
    z-index: 1000;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Alert */
.alert {
    border-radius: 10px;
    border: none;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    color: #842029;
}

.alert-warning {
    background-color: #fff3cd;
    color: #664d03;
}

.alert-info {
    background-color: #cff4fc;
    color: #055160;
}

/* Form Controls */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Table */
.table-hover tbody tr {
    transition: background-color 0.3s ease;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Modal */
.modal-content {
    border-radius: 15px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

/* Tooltip */
.tooltip-inner {
    background-color: #212529;
    border-radius: 5px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-slide {
        min-height: 300px !important;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
}

/* Admin Specific */
.sidebar .nav-link {
    border-radius: 5px;
    margin: 2px 10px;
}

.sidebar .nav-link:hover {
    background-color: #e9ecef;
}

.sidebar .nav-link.active {
    background-color: #e7f1ff;
    color: #0d6efd;
    font-weight: 600;
}

/* Image Upload Preview */
.image-preview {
    max-width: 200px;
    margin-top: 10px;
    border-radius: 5px;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .navbar,
    .footer,
    .btn,
    .breadcrumb {
        display: none !important;
    }
}

/* Utility Classes */
.cursor-pointer {
    cursor: pointer;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shadow-hover {
    transition: box-shadow 0.3s ease;
}

.shadow-hover:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    padding: 4rem 2rem;
    text-align: center;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    opacity: 0.3;
}

/* Price Display */
.price-large {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.price-old {
    text-decoration: line-through;
    color: #6c757d;
    font-size: 1.1rem;
}

/* Stock Badge */
.stock-available {
    background-color: #d1e7dd;
    color: #0f5132;
}

.stock-low {
    background-color: #fff3cd;
    color: #664d03;
}

.stock-out {
    background-color: #f8d7da;
    color: #842029;
}

/* Rating Stars */
.rating-stars {
    color: #ffc107;
    font-size: 1rem;
}

.rating-stars i {
    margin-right: 2px;
}

/* Testimonial Card */
.testimonial-card {
    border-left: 4px solid var(--primary-color);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 3rem;
}

/* Smooth Transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Focus Visible */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ============================================
   PREMIUM MODERN OVERRIDES
   ============================================ */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --accent-color: #7c3aed;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --surface: #ffffff;
    --bg-soft: #f8fafc;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    background: radial-gradient(1200px 400px at 50% -180px, rgba(37, 99, 235, 0.16), transparent 60%), var(--bg-soft);
}

.sticky-top {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.92) !important;
}

.navbar {
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.navbar-brand {
    letter-spacing: -0.02em;
}

.navbar-nav .nav-link {
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link:hover {
    background: rgba(37, 99, 235, 0.09);
    color: var(--primary-color);
}

.navbar .container {
    align-items: center;
}

#navbarMain {
    align-items: center;
}

.nav-main-links {
    gap: 0.2rem;
}

.nav-main-links .nav-item {
    display: flex;
    align-items: center;
}

.nav-main-links .nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    line-height: 1;
    white-space: nowrap;
}

.cart-link .badge {
    font-size: 0.68rem;
    line-height: 1;
    padding: 0.3em 0.45em;
}

.nav-wa-btn {
    min-height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 1rem;
    white-space: nowrap;
}

@media (max-width: 991.98px) {
    #navbarMain {
        margin-top: 0.65rem;
    }

    .nav-main-links {
        gap: 0;
    }

    .nav-main-links .nav-item {
        width: 100%;
    }

    .nav-main-links .nav-link,
    .nav-wa-btn {
        width: 100%;
        justify-content: flex-start;
        margin-top: 0.15rem;
    }

    .header-search {
        margin-bottom: 0.5rem;
    }
}

.hero-section {
    margin-top: 1rem;
}

.hero-slide-premium {
    min-height: 460px;
    border-radius: 1.25rem;
    overflow: hidden;
    position: relative;
    background: linear-gradient(120deg, #0f172a 0%, #1e3a8a 40%, #7c3aed 100%);
}

.hero-slide-premium::before,
.hero-slide-premium::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    animation: floatOrb 9s ease-in-out infinite;
}

.hero-slide-premium::before {
    width: 220px;
    height: 220px;
    background: rgba(255, 255, 255, 0.12);
    top: -70px;
    right: 7%;
}

.hero-slide-premium::after {
    width: 120px;
    height: 120px;
    background: rgba(37, 99, 235, 0.45);
    left: 8%;
    bottom: -36px;
    animation-delay: 1.4s;
}

.hero-content-wrap {
    min-height: 460px;
}

.carousel-indicators [data-bs-target] {
    width: 2.25rem;
    height: 0.25rem;
    border-radius: 999px;
}

.card {
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.product-card {
    overflow: hidden;
}

.product-card .card-img-top {
    height: 220px !important;
    object-fit: cover;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 22px 40px rgba(37, 99, 235, 0.22) !important;
}

.product-card .badge {
    border-radius: 999px;
    font-weight: 700;
}

.category-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12) !important;
}

.btn {
    border-radius: 0.8rem;
    font-weight: 600;
}

.btn-primary,
.bg-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color)) !important;
    border-color: transparent !important;
}

.btn-outline-primary {
    border-color: rgba(37, 99, 235, 0.35);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.featured-products,
.promo-products,
.testimonials,
.why-us,
.categories-section,
.cta-section {
    position: relative;
}

.featured-products::before,
.promo-products::before,
.testimonials::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(37, 99, 235, 0.04), transparent 20%);
    pointer-events: none;
}

.text-muted {
    color: var(--text-muted) !important;
}

.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes floatOrb {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(14px); }
}

@media (max-width: 992px) {
    .hero-slide-premium,
    .hero-content-wrap {
        min-height: 360px;
    }

    .product-card .card-img-top {
        height: 190px !important;
    }
}