/* =========================
   Color Palette & Variables
========================= */
:root {
    --c-white: #FCFDFB;
    --c-bg: #FCFDFB;
    --c-bg-soft: #E9F5EC;
    --c-accent-soft: #BEE3C6;
    --c-accent: #8FBC8F;
    --c-accent-deep: #2F6F52;
    --c-brown: #5D4E37;
    --c-brown-border: #E8D5C4;
    --c-muted: #6B5B47;
    --shadow-sm: 0 6px 20px rgba(93, 78, 55, 0.12);
    --shadow-lg: 0 14px 40px rgba(93, 78, 55, 0.18);
    --radius: 16px;
    --radius-sm: 12px;
    --container: 1200px;
    --gap-lg: 2rem;
    --gap-md: 1.25rem;
    --gap-sm: 0.75rem;
    --speed: 0.35s;
}

/* =========================
   Global Styles
========================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Raleway', sans-serif;
    background: var(--c-bg);
    color: var(--c-brown);
    margin: 0;
}

/* =========================
   Section Container
========================= */
.service-section {
    max-width: var(--container);
    margin: 48px auto;
    padding: 32px;
    background: var(--c-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    transition: transform var(--speed) ease, box-shadow var(--speed) ease;
}

.service-section:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* =========================
   Headers
========================= */
.service-header {
    text-align: center;
    margin-bottom: 28px;
    animation: fadeInDown 0.7s ease;
}

.service-title {
    font-size: 2.1rem;
    font-family: 'Prata', serif;
    font-weight: 400;
    color: var(--c-brown);
    margin: 0 0 10px;
}

.service-subtitle {
    font-size: 1rem;
    color: var(--c-muted);
    margin: 0;
}

/* =========================
   Forms & Blocks
========================= */
.service-form {
    display: flex;
    flex-direction: column;
    gap: var(--gap-lg);
}

.form-block {
    padding: 24px;
    background: var(--c-bg-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--c-brown-border);
    transition: transform var(--speed) ease, box-shadow var(--speed) ease;
}

.form-block:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.block-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 16px;
    font-family: 'Prata', serif;
    color: var(--c-accent-deep);
    position: relative;
}

.block-title::after {
    content: "";
    display: block;
    width: 50px;
    height: 3px;
    background: var(--c-accent);
    margin-top: 4px;
    border-radius: 2px;
}

/* =========================
   Grid Helpers
========================= */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap-md);
}

.grid-2 .form-group.full-width {
    grid-column: 1 / -1;
}

/* =========================
   Inputs & Textareas
========================= */
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--c-brown-border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    background: var(--c-white);
    transition: all var(--speed) ease;
}

.form-group textarea {
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--c-accent-deep);
    box-shadow: 0 0 0 3px rgba(47, 111, 82, 0.15);
    transform: scale(1.02);
}

/* =========================
   Upload Area & Preview
========================= */
.upload-area {
    position: relative;
    border: 2px dashed var(--c-accent);
    background: var(--c-accent-soft);
    border-radius: var(--radius-sm);
    padding: 18px;
    text-align: center;
    transition: background var(--speed) ease, border-color var(--speed) ease;
}

.upload-area:hover {
    background: var(--c-accent);
    color: var(--c-white);
    border-color: var(--c-accent-deep);
}

.single-preview .thumb,
.preview-grid img,
.preview-card img {
    border-radius: var(--radius-sm);
    max-height: 200px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.single-preview .thumb:hover,
.preview-grid img:hover,
.preview-card img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(93, 78, 55, 0.12);
}

.preview-grid {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.preview-card {
    background: var(--c-white);
    border: 1px solid var(--c-brown-border);
    border-radius: var(--radius-sm);
    padding: 8px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.preview-meta {
    font-size: 0.8rem;
    color: var(--c-muted);
    text-align: center;
    word-break: break-word;
}

/* Tombol hapus preview */
.preview-remove {
    background: transparent;
    border: 1px solid #c99;
    color: #a33;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preview-remove:hover {
    background: #ffe9e9;
}

/* =========================
   Buttons
========================= */
.btn-submit {
    background: var(--c-accent-deep);
    color: var(--c-white);
    font-size: 1.05rem;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    transition: all var(--speed) ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    opacity: 0.95;
}

.btn-submit:active {
    transform: translateY(1px);
    opacity: 0.9;
}

.btn-add {
    padding: 10px 18px;
    background: var(--c-accent);
    color: var(--c-white);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--speed) ease;
}

.btn-add:hover {
    opacity: 0.9;
}

/* =========================
   Divider & Remove Product
========================= */
.product-divider {
    height: 2px;
    background: var(--c-accent-soft);
    margin: 24px 0;
    border-radius: var(--radius-sm);
}

.remove-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
}

/* =========================
   Popup
========================= */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease forwards;
    z-index: 999;
}

.popup-box {
    background: var(--c-white);
    border-radius: var(--radius);
    padding: 24px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: scaleIn 0.3s ease forwards;
}

.popup-actions button {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    margin: 8px;
    cursor: pointer;
    transition: all var(--speed) ease;
}

.btn-yes {
    background: var(--c-accent-deep);
    color: var(--c-white);
    border: none;
}

.btn-yes:hover {
    opacity: 0.9;
}

.btn-no {
    background: var(--c-bg-soft);
    border: 1px solid var(--c-brown-border);
    color: var(--c-brown);
}

.btn-no:hover {
    background: var(--c-brown-border);
    color: var(--c-brown);
}

/* =========================
   Animations
========================= */
@keyframes fadeInDown {
    0% { opacity: 0; transform: translateY(-20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes scaleIn {
    0% { opacity: 0; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

/* =========================
   Responsive
========================= */
@media (max-width: 860px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
    .service-section {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .service-section {
        border-radius: var(--radius-sm);
    }
}
