/* Centralized styles extracted from index.html and pages */
:root {
    --primary-color: #34495e;
    --secondary-color: #2d3436;
    --background-color: #f9f9f9;
    --card-background: #ffffff;
    --text-color: #2d3436;
    --light-gray: #ede3e3;
    --box-shadow: 0 4px 15px rgba(194, 189, 214, 0);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Poppins', sans-serif; background-color: var(--background-color); color: var(--text-color); line-height: 1.6; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

h1,h2,h3 { color: var(--primary-color); margin-bottom: 20px; font-weight: 600; }
section { padding: 60px 0; }

/* Header */
.header { background-color: var(--card-background); box-shadow: var(--box-shadow); padding: 15px 0; position: sticky; top: 0; z-index: 1000; width: 100%; }
.navbar { display: flex; justify-content: space-between; align-items: center; }
.nav-logo { font-size: 24px; font-weight: 700; color: var(--primary-color); text-decoration: none; }
.nav-links { list-style: none; display: flex; gap: 25px; }
.nav-links a { text-decoration: none; color: var(--text-color); font-weight: 600; transition: color 0.3s ease; }
.nav-links a:hover { color: var(--secondary-color); }

/* Active nav link */
.nav-links a.active,
.nav-links a[aria-current="page"] {
    background: var(--primary-color);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

/* Hamburger (mobile) */
.hamburger{display:none;background:transparent;border:0;cursor:pointer;padding:8px;align-items:center}
.hamburger span{display:block;width:22px;height:2px;background:var(--primary-color);margin:4px 0;border-radius:2px;transition:transform .2s ease,opacity .2s ease}
.hamburger[aria-expanded="true"] span:nth-child(1){transform:translateY(6px) rotate(45deg)}
.hamburger[aria-expanded="true"] span:nth-child(2){opacity:0}
.hamburger[aria-expanded="true"] span:nth-child(3){transform:translateY(-6px) rotate(-45deg)}


/* Hero */
.hero { background: linear-gradient(rgba(255,255,255,0), rgba(0,0,0,0.5)), url('WhatsApp Image 2025-10-04 at 10.57.01.jpeg') no-repeat center center/cover; color: white; text-align: center; padding: 100px 0; }
.hero h1 { color: white; font-size: 48px; margin-bottom: 10px; }
.hero p { font-size: 18px; max-width: 600px; margin: 0 auto 30px; }
.cta-button { display: inline-block; background-color: var(--secondary-color); color: white; padding: 12px 25px; border-radius: 5px; text-decoration: none; font-weight: 600; transition: background-color 0.3s ease; }
/* Inspirasi gallery removed */
.blog-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
    padding: 24px 20px;
    transition: box-shadow 0.3s;
}
.blog-item:hover {
    box-shadow: 0 8px 32px rgba(46,139,198,0.13);
}
.blog-item h3 {
    color: var(--primary-color);
    font-size: 20px;
    margin-bottom: 12px;
}
.blog-item p {
    color: var(--text-color);
    font-size: 15px;
    margin: 0;
}
/* Inspirasi gallery fully removed */
.cta-button:hover { background-color: #2980b9; }

/* Simple inspiration gallery (compact and safe) */
.simple-inspirasi { padding: 28px 0; background: transparent; }
.simple-inspirasi h2 { text-align:center; margin-bottom:16px; font-size:28px; }
.simple-gallery { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }
.simple-gallery-item { display:block; width: calc(33.333% - 12px); max-width:320px; border-radius:10px; overflow:hidden; box-shadow: 0 6px 20px rgba(0,0,0,0.06); }
.simple-gallery-item img { width:100%; height:160px; object-fit:cover; display:block; }
@media (max-width:800px){ .simple-gallery-item { width: calc(50% - 12px); } .simple-gallery-item img{ height:140px } }
@media (max-width:420px){ .simple-gallery-item { width:100%; } .simple-gallery-item img{ height:120px } }

/* Caption Section */
.caption-section {
    background-color: var(--card-background);
    padding: 60px 0;
    margin: 40px 0;
}

.caption-content {
    align-items: stretch;
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    
}

.caption-text {
    flex: 1;
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-color);
    text-align: justify;
    text-justify: inter-word;
    margin: 0;/* ensure consistent spacing with surrounding elements */
}

.caption-img {
    flex: 1;
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.caption-img:hover {
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .caption-content {
        flex-direction: column;
        text-align: center;
    }
    
    .caption-img {
        width: 100%;
        margin-top: 20px;
    }
}

/* Hero animated */
.hero-animated { display: inline-block; color: #fff; background: rgba(0,0,0,0.15); padding: 4px 10px; border-radius: 6px; transition: opacity 0.5s ease, transform 0.5s ease; }
.hero-animated.fade-out { opacity: 0; transform: translateY(-6px); }
.hero-animated.fade-in { opacity: 1; transform: translateY(0); }

/* --- Product slider (auto-play banner) --- */
.product-slider{position:relative;overflow:hidden;border-radius:12px;margin-bottom:22px;background:#000}
.product-slider .slides{display:flex;transition:transform 520ms ease;will-change:transform}
.product-slider .slide{min-width:100%;height:260px;background-size:cover;background-position:center;display:flex;align-items:flex-end;padding:18px;color:#fff;position:relative}
.product-slider .slide::after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,transparent 30%, rgba(0,0,0,0.45));border-radius:12px}
.product-slider .slide-caption{position:relative;z-index:2}
.product-slider .slide-caption h3{margin:0 0 6px;font-size:20px}
.product-slider .slide-caption p{margin:0;opacity:0.95}
.product-slider .slider-prev,.product-slider .slider-next{position:absolute;top:50%;transform:translateY(-50%);background:rgba(255,255,255,0.95);border:none;padding:8px 12px;border-radius:8px;cursor:pointer;font-size:22px;line-height:1;color:#222}
.product-slider .slider-prev{left:12px}
.product-slider .slider-next{right:12px}
.product-slider .slider-dots{position:absolute;left:50%;transform:translateX(-50%);bottom:12px;display:flex;gap:8px}
.product-slider .slider-dots button{width:10px;height:10px;border-radius:50%;border:none;background:rgba(255,255,255,0.6);cursor:pointer}
.product-slider .slider-dots button.active{background:var(--secondary-color)}
@media (min-width:900px){
    .product-slider .slide{height:360px}
}

/* Product gallery */
#products h2 { text-align: center; font-size: 36px; }
.product-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 25px; margin-top: 40px; }
.product-card { background-color: var(--card-background); border-radius: 10px; box-shadow: var(--box-shadow); overflow: hidden; cursor: pointer; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.product-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 16px 40px rgba(46,139,198,0.18);
    border: 2px solid var(--secondary-color);
}
.product-card img {
    transition: transform 0.3s ease;
}
.product-card:hover img {
    transform: scale(1.10) rotate(-2deg);
}
/* Badge harga */
.product-badge {
    display: inline-block;
    background: linear-gradient(90deg, #7eaccb 60%, #2c3e50 100%);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    padding: 6px 18px;
    border-radius: 18px;
    margin: 10px 0 0 0;
    box-shadow: 0 2px 8px rgba(46,139,198,0.10);
    letter-spacing: 1px;
}
/* Fade-in animasi produk */
.fade-in {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    animation: fadeInUp 0.8s cubic-bezier(.42,0,.58,1.0) forwards;
}
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.product-desc {
    font-size: 15px;
    color: #666;
    margin: 10px 0 0 0;
    min-height: 38px;
}
.product-action {
    display: inline-block;
    margin-top: 14px;
    background-color: var(--secondary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 18px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(46,139,198,0.08);
    transition: background 0.3s, transform 0.3s;
}
.product-action:hover {
    background-color: #2980b9;
    transform: scale(1.05);
}
/* Fade-in animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.7s forwards;
}
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.product-card img { width: 100%; height: 220px; object-fit: cover; }
.product-info { padding: 20px; }
.product-info h3 { font-size: 18px; margin-bottom: 10px; }
.product-price { font-size: 16px; font-weight: 700; color: var(--secondary-color); }

/* Product search */
.product-controls { display: flex; justify-content: center; margin-top: 10px; gap: 10px; }
#searchInput { width: 100%; max-width: 480px; padding: 10px 14px; border-radius: 8px; border: 1px solid rgba(0,0,0,0.12); box-shadow: 0 4px 12px rgba(0,0,0,0.04); outline: none; font-size: 15px; }
#searchInput:focus { border-color: var(--secondary-color); box-shadow: 0 6px 18px rgba(46,139,198,0.08); }

/* Modal */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.6); align-items: center; justify-content: center; }
.modal-content { background-color: var(--card-background); margin: auto; padding: 30px; border-radius: 10px; max-width: 800px; width: 90%; display: flex; gap: 30px; position: relative; animation: fadeIn 0.5s; }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
.modal-close { position: absolute; top: 15px; right: 25px; color: var(--light-gray); font-size: 30px; font-weight: bold; cursor: pointer; transition: color 0.3s ease; }
.modal-close:hover { color: var(--text-color); }
#modal-img { width: 50%; height: auto; object-fit: cover; border-radius: 10px; }
.modal-details { width: 50%; }
#modal-title { font-size: 28px; }
#modal-price { font-size: 22px; color: var(--secondary-color); margin-bottom: 20px; }
#modal-description { font-size: 16px; }

/* Cart and modal actions */
.nav-actions { display: flex; align-items: center; gap: 12px; }
.cart-button { background: transparent; border: none; font-size: 18px; cursor: pointer; position: relative; }
.cart-count { background: var(--secondary-color); color: white; font-weight: 700; padding: 2px 8px; border-radius: 12px; margin-left: 8px; font-size: 13px; }
.modal-actions { margin-top: 18px; display: flex; align-items: center; gap: 8px; }

/* Cart modal specifics */
#cartItems { display: flex; flex-direction: column; gap: 12px; }
.cart-row { display:flex; gap:12px; align-items:center; padding:8px; border-radius:8px; background: #fafafa; border: 1px solid rgba(0,0,0,0.04); }
.cart-row img { width:64px; height:64px; object-fit:cover; border-radius:6px; }
.cart-row .row-info { flex:1; }
.cart-row .row-info h4 { margin:0 0 6px 0; font-size:15px; }
.cart-row .row-info p { margin:0; font-size:13px; color:#666; }
.cart-row button.remove { background:transparent; border:none; color:#c0392b; cursor:pointer; font-weight:700; }

/* About */
#about { background-color: var(--card-background); }
.about-content { display: flex; align-items: center; gap: 50px; }
.about-image { width: 45%; border-radius: 10px; }
.about-text { width: 55%; }

/* Footer */
.footer { background-color: var(--primary-color); color: white; text-align: center; padding: 40px 0; }
.footer h3 { color: white; }

.contact-info p { margin-bottom: 10px; }
.contact-info a { color: white; text-decoration: none; transition: opacity 0.3s ease; }
.contact-info a:hover { opacity: 0.8; }
.social-icons { margin-top: 20px; }
.social-icons a { margin: 0 15px; text-decoration: none; }
.social-icons img { width: 32px; height: 32px; transition: transform 0.3s ease; }
.social-icons a:hover img { transform: scale(1.2); }
.footer-bottom { margin-top: 20px; font-size: 14px; opacity: 0.7; }

/* Responsive */
@media (max-width: 768px) { .nav-links { display: none; } .modal-content { flex-direction: column; padding: 20px; max-width: 90%; } #modal-img, .modal-details { width: 100%; } .about-content { flex-direction: column; } .about-image, .about-text { width: 100%; } }

/* Mobile improvements */
@media (max-width: 900px) {
    .hamburger{display:flex}
    .nav-links{position:fixed;top:64px;right:12px;background:var(--card-background);box-shadow:0 8px 30px rgba(0,0,0,0.12);padding:14px;border-radius:10px;display:flex;flex-direction:column;gap:8px;z-index:1500;min-width:180px;transform:translateY(-10px);opacity:0;visibility:hidden;transition:opacity .18s ease,visibility .18s ease,transform .18s ease}
    .nav-links.show{opacity:1;visibility:visible;transform:translateY(0)}
    .nav-links a{padding:8px 12px;border-radius:8px}
    .hero{padding:48px 0}
    .product-card img{height:160px}
    .product-action{padding:12px 18px;font-size:16px}
}

@media (max-width: 420px){
    .product-card img{height:140px}
    .hero{padding:36px 0}
}

/* Caption section (home) */
.caption-section { background: none; padding: 40px 20px 24px; }
.caption-content { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; align-items: stretch; }
.caption-text { font-size: 22px; color: #2c3e50; margin: 0 0 28px 0; line-height: 1.8; font-weight: 500; text-align: justify; text-justify: inter-word; }
.caption-img { width: 100%; max-width: 1200px; height: 340px; object-fit: cover; border-radius: 18px; box-shadow: 0 4px 24px rgba(44,62,80,0.10); margin-bottom: 8px; display: block; margin-left: auto; margin-right: auto; }
@media (max-width: 900px) { .caption-img { height: 220px; } }
@media (max-width: 600px) { .caption-text { font-size: 17px; } .caption-img { width: 98vw; height: 140px; } }
@media (max-width: 600px) { .caption-text { font-size: 17px; } .caption-img { width: 98vw; } }

/* Prevent sticky header from overlapping anchored content (adjusted at runtime) */
html { scroll-padding-top: var(--header-height, 80px); }
