/* ==================== CORE STYLES & VARIABLES ==================== */
:root {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-light: #eff6ff;
    --border-color: #f1f5f9;
    --premium-color: #f59e0b;
    --premium-text: #78350f;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.05), 0 10px 10px -5px rgba(0,0,0,0.04);
    --radius-lg: 1.25rem;
    --radius-xl: 2rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[x-cloak] { display: none !important; }

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

/* ==================== UTILITY ANIMATIONS ==================== */
@keyframes spin {
    to { transform: rotate(360deg); }
}
.animate-spin {
    width: 2.5rem;
    height: 2.5rem;
    border: 4px solid var(--accent);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

/* ==================== PROFILE / SHOP DESCRIPTION ==================== */
.shop-profile {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-md);
    text-align: center;
}
.shop-header h1 {
    font-size: 2.25rem;
    font-weight: 800;
    text-align: center;
    letter-spacing: -0.05em;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, lightblue, lightcyan);
    -webkit-background-clip: text;
    background-clip: text; /* PERBAIKAN: Menambahkan standard property */
    color: navy;
}
.shop-tagline {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}
.feature-card {
    background: lightblue;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: var(--transition);
}
.feature-card:hover {
    background: blue;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}
.feature-icon {
    background: var(--accent-light);
    color: var(--accent);
    padding: 0.75rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.feature-icon svg { width: 1.5rem; height: 1.5rem; stroke-width: 2.5; }
.feature-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.25rem; color:white; }
.feature-desc { color: var(--text-muted); font-size: 0.85rem; color: white;}

/* ==================== SEARCH & FILTERS CONTROLS ==================== */
.controls-bar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2.5rem;
}
@media (min-width: 768px) {
    .controls-bar { flex-direction: row; justify-content: space-between; align-items: center; }
}
.search-wrapper { position: relative; flex: 1; max-width: 400px; }
.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    background: var(--bg-card);
    transition: var(--transition);
}
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }
.search-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); width: 1.1rem; }

.selectors-group { display: flex; gap: 0.75rem; }
.select-custom {
    padding: 0.75rem 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background-color: var(--bg-card);
    font-family: inherit;
    font-size: 0.9rem;
    color: #475569;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
}
.select-custom:hover { border-color: #cbd5e1; }

/* ==================== PRODUCT GRID GALLERY ==================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
@media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }
@media (min-width: 1024px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1280px) { .gallery-grid { grid-template-columns: repeat(6, 1fr); } }

.app-card {
    background: var(--bg-card);
    border: 1px solid rgba(241, 245, 249, 0.8);
    border-radius: 20px;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
}
.app-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(37, 99, 235, 0.1);
    background: skyblue;
}
.app-card-thumb {
    aspect-ratio: 1;
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    background: #f8fafc;
    margin-bottom: 0.85rem;
}
.app-card-thumb img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; /* PERBAIKAN: Dari object-cover ke object-fit */
    transition: var(--transition); 
}
.app-card:hover .app-card-thumb img { transform: scale(1.08); }

.badge-premium {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--premium-color);
    color: var(--premium-text);
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.2rem 0.5rem;
    border-radius: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.app-card-meta { display: flex; margin-bottom: 0.35rem; }
.cat-tag {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--accent-light);
    padding: 0.2rem 0.5rem;
    border-radius: 0.35rem;
}
.app-card-title { font-size: 0.95rem; font-weight: 700; color: var(--text-main); margin-bottom: 0.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-card-desc { 
    font-size: 0.75rem; 
    color: var(--text-muted); 
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    line-clamp: 2; /* PERBAIKAN: Menambahkan standard property line-clamp */
    -webkit-box-orient: vertical; 
    overflow: hidden; 
    height: 2.25rem; 
    margin-bottom: 1rem; 
}

.app-card-footer {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid #f8fafc;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.price-text { font-size: 1rem; font-weight: 800; color: var(--accent); }
.arrow-action { background: #f8fafc; border-radius: 0.5rem; padding: 0.35rem; color: #94a3b8; transition: var(--transition); display: flex; }
.app-card:hover .arrow-action { background: var(--accent); color: white; }

/* ==================== STATE MESSAGES ==================== */
.state-container { text-align: center; padding: 6rem 0; }
.state-text { color: var(--text-muted); font-size: 0.95rem; font-weight: 500; }
.state-error { color: #ef4444; font-weight: 700; margin-bottom: 0.5rem; }

/* ==================== FULL PAGE DETAILS ==================== */
.detail-layout { 
    background: var(--bg-card); 
    border: 1px solid var(--border-color); 
    border-radius: var(--radius-xl); 
    box-shadow: var(--shadow-sm); 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
    max-width: 100%;
    margin: 0 auto;
}
@media (min-width: 1024px) {
    .detail-layout { 
        flex-direction: row; 
    } 
}

.back-btn {
    background: var(--bg-card);
    border: 1px solid #e2e8f0;
    padding: 0.65rem 1.25rem;
    border-radius: 0.85rem;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}
.back-btn:hover { border-color: #cbd5e1; color: var(--accent); box-shadow: var(--shadow-sm); }

.detail-left {
    width: 100%;
    background: #f8fafc;
    padding: 2rem;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}
@media (min-width: 1024px) { 
    .detail-left { 
        width: 450px; 
        border-bottom: none; 
        border-right: 1px solid var(--border-color); /* PERBAIKAN: Dari border-r ke border-right */
    } 
}

.slider-viewport { height: 350px; display: flex; align-items: center; justify-content: center; position: relative; }
.slide-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 1rem; box-shadow: var(--shadow-md); }

.slider-dots { display: flex; justify-content: center; gap: 0.4rem; margin-top: 1.5rem; }
.dot { height: 0.4rem; border: none; border-radius: 1rem; background: #cbd5e1; cursor: pointer; transition: var(--transition); }
.dot.active { background: var(--accent); width: 1.5rem; }
.dot.inactive { width: 0.4rem; }

.nav-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.9); border: none; padding: 0.6rem; border-radius: 50%; box-shadow: var(--shadow-sm); cursor: pointer; color: #475569; display: flex; transition: var(--transition); }
.nav-arrow:hover { background: white; color: black; }
.nav-arrow.prev { left: 0.5rem; }
.nav-arrow.next { right: 0.5rem; }

.detail-right { flex: 1; padding: 2.5rem; display: flex; flex-direction: column; }
.detail-app-header { display: flex; gap: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border-color); margin-bottom: 1.5rem; }
.detail-icon { width: 5rem; height: 5rem; border-radius: 1.25rem; object-fit: cover; border: 1px solid var(--border-color); }
.detail-app-title { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 0.5rem; }
.detail-sub-group { display: flex; align-items: center; gap: 0.75rem; font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }

.detail-body { flex-grow: 1; }
.section-title { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 800; color: var(--text-muted); margin-bottom: 0.5rem; }
.long-desc { font-size: 0.95rem; color: #334155; line-height: 1.7; white-space: pre-line; margin-bottom: 2rem; }

.spec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; padding: 1.25rem 0; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); margin-bottom: 2.5rem; }
.spec-label { font-size: 0.65rem; text-transform: uppercase; font-weight: 700; color: var(--text-muted); margin-bottom: 0.15rem; }
.spec-val { font-size: 0.9rem; font-weight: 600; color: #334155; }

/* ==================== ACTION CHECKOUT AREA ==================== */
.checkout-box { background: var(--bg-main); border: 1px solid var(--border-color); padding: 1.5rem; border-radius: var(--radius-lg); }
.checkout-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.checkout-label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.checkout-price { font-size: 1.75rem; font-weight: 900; color: var(--text-main); }
.btn-order { width: 100%; display: flex; align-items: center; justify-content: center; gap: 0.75rem; background: var(--accent); color: white; border: none; padding: 1.1rem; font-family: inherit; font-size: 1rem; font-weight: 700; border-radius: 1rem; cursor: pointer; text-decoration: none; box-shadow: 0 10px 15px -3px rgba(37,99,235,0.25); transition: var(--transition); }
.btn-order:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 12px 20px -3px rgba(37,99,235,0.35); }
.checkout-note { text-align: center; font-size: 0.75rem; font-style: italic; color: var(--text-muted); margin-top: 0.75rem; }

/* ==================== FOOTER COMPONENT ==================== */
footer { background: #0f172a; color: #94a3b8; border-top: 1px solid #1e293b; margin-top: 2rem; padding: 2rem 1.5rem 2rem; font-size: 0.9rem; }
.footer-grid { max-width: 1600px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 3rem; margin-bottom: 3rem; }
.footer-brand h3 { color: white; font-size: 1.5rem; font-weight: 800; margin-bottom: 0.75rem; letter-spacing: -0.03em; }
.footer-brand p { font-size: 0.85rem; line-height: 1.6; }
.footer-title-sub { color: white; font-weight: 700; font-size: 1rem; margin-bottom: 1.25rem; position: relative; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.75rem; }
.footer-links a { color: #94a3b8; text-decoration: none; transition: var(--transition); display: inline-flex; align-items: center; gap: 0.5rem; }
.footer-links a:hover { color: white; transform: translateX(3px); }
.footer-contact-item { display: flex; gap: 0.75rem; margin-bottom: 1rem; align-items: flex-start; font-size: 0.85rem; }
.footer-contact-item svg { width: 1.25rem; height: 1.25rem; color: var(--accent); flex-shrink: 0; }

.footer-bottom { max-width: 1600px; margin: 0 auto; padding-top: 2rem; border-top: 1px solid #1e293b; text-align: center; font-size: 0.8rem; color: #64748b; }
