/* =====================================================
   SKINCARE RECOMMENDATION WEBSITE - STYLESHEET
   For Skripsi Project
   
   Colors: Primary #6C63FF, Secondary #FF6584
   Font: Poppins (Google Fonts)
   ===================================================== */

/* =====================================================
   RESET & BASE STYLES
   ===================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6C63FF;
    --secondary: #FF6584;
    --light: #F8F9FA;
    --dark: #2D3436;
    --success: #00B894;
    --warning: #FDCB6E;
    --danger: #E74C3C;
    --gradient: linear-gradient(135deg, #6C63FF 0%, #FF6584 100%);
    --gradient-hover: linear-gradient(135deg, #5A52E0 0%, #E55A75 100%);
    --shadow: 0 5px 20px rgba(108, 99, 255, 0.15);
    --shadow-hover: 0 10px 30px rgba(108, 99, 255, 0.25);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* =====================================================
   NAVIGATION
   ===================================================== */
.navbar {
    background: white;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.8rem 5%;
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.logo:hover {
    color: var(--secondary);
    transform: scale(1.02);
}

.logo i {
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    color: var(--dark);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    background: rgba(108, 99, 255, 0.08);
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu {
    display: none;
    background: white;
    padding: 1rem 5%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav-links a {
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
}

.mobile-nav-links a:hover {
    background: rgba(108, 99, 255, 0.08);
    color: var(--primary);
}

/* =====================================================
   HERO SECTION
   ===================================================== */
.hero {
    background: var(--gradient);
    padding: 5rem 5%;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: heroFloat 15s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, 20px); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease;
}

.hero p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background: white;
    color: var(--primary);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary);
}

.btn-gradient {
    background: var(--gradient);
    color: white;
}

.btn-gradient:hover {
    background: var(--gradient-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================================
   FILTER SECTION
   ===================================================== */
.filter-section {
    background: white;
    padding: 2rem 5%;
    margin: 2rem 5%;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-header h2 {
    color: var(--primary);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-toggle {
    display: none;
    background: var(--gradient);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    transition: var(--transition);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
}

.filter-group input,
.filter-group select {
    padding: 0.8rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    background: white;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

.filter-group input::placeholder {
    color: #aaa;
}

.filter-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: flex-end;
}

.filter-actions .btn {
    padding: 0.8rem 1.5rem;
}

.btn-reset {
    background: #e0e0e0;
    color: var(--dark);
}

.btn-reset:hover {
    background: #d0d0d0;
}

/* =====================================================
   PRODUCTS GRID
   ===================================================== */
.products-section {
    padding: 2rem 5%;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.products-header h2 {
    color: var(--dark);
    font-size: 1.8rem;
}

.products-count {
    color: #666;
    font-size: 0.95rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    transition: var(--transition);
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.image-container {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--secondary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 1;
}

.product-badge.best {
    background: var(--success);
}

.product-info {
    padding: 1.5rem;
}

.product-brand {
    color: var(--secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0.5rem 0;
    line-height: 1.4;
}

.product-description {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: #FFD700;
    font-size: 0.95rem;
}

.product-rating span {
    color: #666;
    font-size: 0.8rem;
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background: var(--light);
    padding: 0.3rem 0.7rem;
    border-radius: 15px;
    font-size: 0.75rem;
    color: #666;
    font-weight: 500;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-detail {
    flex: 1;
    padding: 0.8rem;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.btn-detail:hover {
    background: var(--gradient-hover);
}

/* =====================================================
   LOADING & EMPTY STATES
   ===================================================== */
.loading {
    display: none;
    text-align: center;
    padding: 4rem 2rem;
}

.loading.active {
    display: block;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #666;
    font-size: 1rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    grid-column: 1 / -1;
}

.empty-state i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #666;
    margin-bottom: 1.5rem;
}

/* =====================================================
   QUIZ SECTION
   ===================================================== */
.quiz-section {
    background: white;
    padding: 3rem 5%;
    margin: 2rem 5%;
    border-radius: 20px;
    box-shadow: var(--shadow);
    text-align: center;
}

.quiz-intro h2 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.quiz-intro p {
    color: #666;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.quiz-progress {
    width: 100%;
    max-width: 500px;
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    margin: 0 auto 2rem;
    overflow: hidden;
}

.quiz-progress-bar {
    height: 100%;
    background: var(--gradient);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.quiz-question {
    display: none;
}

.quiz-question.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.quiz-question h3 {
    color: var(--dark);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.quiz-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.quiz-option {
    padding: 1rem 2rem;
    border: 2px solid var(--primary);
    border-radius: 50px;
    background: white;
    color: var(--primary);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    font-size: 1rem;
}

.quiz-option:hover {
    background: rgba(108, 99, 255, 0.1);
    transform: translateY(-2px);
}

.quiz-option.selected {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

.quiz-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quiz-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.quiz-result {
    display: none;
    animation: fadeIn 0.5s ease;
}

.quiz-result.active {
    display: block;
}

.result-header {
    text-align: center;
    margin-bottom: 2rem;
}

.result-header i {
    font-size: 4rem;
    color: var(--success);
    margin-bottom: 1rem;
}

.result-header h3 {
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.result-details {
    background: var(--light);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.result-details h4 {
    color: var(--dark);
    margin-bottom: 1rem;
}

.result-details p {
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}

.result-details span {
    font-weight: 600;
    color: var(--primary);
}

.recommended-products {
    margin-top: 3rem;
}

.recommended-products h4 {
    color: var(--dark);
    margin-bottom: 1.5rem;
}

/* =====================================================
   PRODUCT DETAIL PAGE
   ===================================================== */
.product-detail {
    padding: 2rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.back-button:hover {
    color: var(--primary);
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.detail-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.detail-info h1 {
    color: var(--dark);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.detail-brand {
    color: var(--secondary);
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.detail-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.detail-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: #FFD700;
}

.detail-rating span {
    color: #666;
}

.detail-description {
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.detail-specs {
    background: var(--light);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
}

.detail-specs h4 {
    color: var(--dark);
    margin-bottom: 1rem;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.spec-item:last-child {
    border-bottom: none;
}

.spec-label {
    color: #666;
}

.spec-value {
    font-weight: 600;
    color: var(--dark);
}

.detail-actions {
    display: flex;
    gap: 1rem;
}

/* =====================================================
   FOOTER
   ===================================================== */
footer {
    background: var(--dark);
    color: white;
    padding: 4rem 5% 2rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
}

.footer-brand p {
    color: #aaa;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-links h4,
.footer-contact h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: white;
}

.footer-links ul li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #aaa;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #aaa;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: #666;
    margin: 0.3rem 0;
}

/* =====================================================
   NOTIFICATIONS
   ===================================================== */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 9999;
    animation: slideIn 0.3s ease;
    max-width: 350px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notification.success {
    border-left: 4px solid var(--success);
}

.notification.error {
    border-left: 4px solid var(--danger);
}

.notification i {
    font-size: 1.2rem;
}

.notification.success i {
    color: var(--success);
}

.notification.error i {
    color: var(--danger);
}

/* =====================================================
   RESPONSIVE STYLES
   ===================================================== */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .product-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .mobile-menu.active {
        display: block;
    }
    
    .hero {
        padding: 3rem 5%;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .filter-section {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .filter-toggle {
        display: block;
    }
    
    .filter-grid {
        display: none;
    }
    
    .filter-grid.active {
        display: grid;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .filter-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .quiz-section {
        margin: 1rem;
        padding: 2rem 1.5rem;
    }
    
    .quiz-option {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .detail-image {
        height: 300px;
    }
    
    .detail-info h1 {
        font-size: 1.5rem;
    }
    
    .detail-price {
        font-size: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-contact p {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-card {
        max-width: 320px;
        margin: 0 auto;
    }
    
    .quiz-options {
        flex-direction: column;
    }
    
    .quiz-option {
        width: 100%;
    }
    
    .detail-actions {
        flex-direction: column;
    }
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden { display: none !important; }
.visible { display: block !important; }

.d-flex { display: flex; }
.d-grid { display: grid; }
.d-block { display: block; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* =====================================================
   ANIMATIONS
   ===================================================== */
.fade-in {
    animation: fadeIn 0.5s ease;
}

.slide-up {
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* =====================================================
   SCROLLBAR STYLING
   ===================================================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5A52E0;
}

/* =====================================================
   SELECTION
   ===================================================== */
::selection {
    background: var(--primary);
    color: white;
}

