/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f5f5f5;
    color: #222;
    padding: 20px;
}

.container {
    max-width: 500px;
    margin: 0 auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

header h1 {
    font-size: 1.8rem;
}

header a {
    text-decoration: none;
    font-size: 0.9rem;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid #ccc;
    background: #fff;
}

.post-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.post-card {
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.post-media img,
.post-media video {
    width: 100%;
    border-radius: 10px;
    display: block;
}

.post-title {
    font-weight: 600;
    font-size: 1rem;
}

.post-desc {
    font-size: 0.9rem;
    color: #555;
}

.post-date {
    font-size: 0.75rem;
    color: #888;
}

/* ADMIN PAGE */

.admin-wrapper {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    padding: 18px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.admin-wrapper h2 {
    margin-bottom: 10px;
}

form label {
    display: block;
    margin: 10px 0 4px;
    font-size: 0.9rem;
    font-weight: 500;
}

form input[type="text"],
form textarea,
form input[type="password"],
form input[type="file"] {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 0.9rem;
}

form textarea {
    min-height: 80px;
    resize: vertical;
}

button,
input[type="submit"] {
    margin-top: 12px;
    padding: 10px 18px;
    border-radius: 999px;
    border: none;
    background: #111827;
    color: #fff;
    cursor: pointer;
    font-size: 0.9rem;
}

.alert {
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-error {
    background: #fee2e2;
    color: #b91c1c;
}

.login-box {
    max-width: 400px;
    margin: 40px auto;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.login-box h2 {
    margin-bottom: 10px;
}

.text-center {
    text-align: center;
    margin-top: 20px;
}

.small {
    font-size: 0.8rem;
    color: #777;
}


/* CATEGORY BADGE */
.category-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    background: #e5e7eb;
    color: #374151;
    margin-bottom: 4px;
}

/* CATEGORY FILTER BUTTONS */
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.filter-row a {
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    font-size: 0.8rem;
    background: #fff;
}

.filter-row a.active {
    background: #111827;
    color: #fff;
    border-color: #111827;
}


/* PRICE + BUTTONS */

.post-footer {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.post-price {
    font-weight: 600;
    font-size: 0.95rem;
}

.post-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    text-decoration: none;
    border: 1px solid #111827;
    text-align: center;
}

.btn-primary {
    background: #111827;
    color: #fff;
}

.btn-secondary {
    background: #fff;
    color: #111827;
}

/* Admin extra spacing for inputs */
.admin-wrapper form input[type="text"] {
    margin-bottom: 4px;
}


/* ===== THEME + LOGO AREA ===== */

body {
    background: radial-gradient(circle at top, #1e293b 0, #020617 45%, #000 100%);
    color: #e5e7eb;
}

/* Make container a bit wider */
.container {
    max-width: 1100px;
}

/* Header / navbar */
.site-header {
    background: #020617;
    color: #e5e7eb;
    padding: 14px 18px;
    border-radius: 999px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.75);
    position: sticky;
    top: 12px;
    z-index: 10;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    object-fit: cover;
    background: #111827;
    flex-shrink: 0;
}

.site-title {
    font-weight: 600;
    font-size: 1rem;
}

.site-tagline {
    font-size: 0.75rem;
    color: #9ca3af;
}

.header-link {
    text-decoration: none;
    font-size: 0.85rem;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid #4b5563;
    background: #0f172a;
    color: #e5e7eb;
}

/* Card new style */
.post-card {
    background: rgba(15, 23, 42, 0.98);
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.8);
    border: 1px solid #1f2937;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 40px rgba(15, 23, 42, 0.95);
    border-color: #4b5563;
}

/* Text colors adjust for dark theme */
.post-desc {
    color: #d1d5db;
}

.post-date {
    color: #9ca3af;
}

.post-price {
    color: #facc15;
}

/* Category badge & filter for dark mode */
.category-badge {
    background: #111827;
    color: #e5e7eb;
}

.filter-row a {
    background: #020617;
    color: #e5e7eb;
    border-color: #4b5563;
}

.filter-row a.active {
    background: #f97316;
    border-color: #f97316;
    color: #111827;
}

/* Buttons tune */
.btn-primary {
    background: #22c55e;
    border-color: #22c55e;
    color: #052e16;
}

.btn-secondary {
    background: #020617;
    border-color: #4b5563;
    color: #e5e7eb;
}

/* Admin / login cards dark mode */
.admin-wrapper,
.login-box {
    background: rgba(15, 23, 42, 0.98);
    color: #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.95);
    border: 1px solid #1f2937;
}

/* Form fields in dark mode */
.admin-wrapper input[type="text"],
.admin-wrapper input[type="password"],
.admin-wrapper textarea,
.admin-wrapper input[type="file"],
.login-box input[type="password"] {
    background: #020617;
    border: 1px solid #4b5563;
    color: #e5e7eb;
}

.admin-wrapper input[type="text"]::placeholder,
.admin-wrapper textarea::placeholder,
.admin-wrapper input[type="password"]::placeholder,
.admin-wrapper input[type="file"]::file-selector-button,
.login-box input[type="password"]::placeholder {
    color: #6b7280;
}

/* Alerts tweak */
.alert-success {
    background: rgba(22, 163, 74, 0.1);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.6);
}

.alert-error {
    background: rgba(220, 38, 38, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(248, 113, 113, 0.6);
}

/* Footer text color */
.small {
    color: #9ca3af;
}


/* ===== SEARCH BAR ===== */

.search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
    align-items: center;
}

.search-row form {
    display: flex;
    flex: 1;
    gap: 8px;
}

.search-input {
    flex: 1;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid #4b5563;
    background: #020617;
    color: #e5e7eb;
    font-size: 0.85rem;
}

.search-input::placeholder {
    color: #6b7280;
}

.search-button {
    padding: 8px 16px;
    border-radius: 999px;
    border: none;
    background: #f97316;
    color: #111827;
    font-size: 0.85rem;
    cursor: pointer;
}

.search-clear {
    font-size: 0.8rem;
    text-decoration: none;
    color: #9ca3af;
}


/* ===== PAGINATION ===== */

.pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #4b5563;
    font-size: 0.8rem;
    text-decoration: none;
    background: #020617;
    color: #e5e7eb;
}

.pagination .current {
    background: #f97316;
    color: #111827;
    border-color: #f97316;
}

.pagination .disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ===== FOOTER ===== */

.site-footer {
    margin-top: 30px;
    padding: 16px 18px;
    border-radius: 18px;
    background: #020617;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.9);
    border: 1px solid #1f2937;
    font-size: 0.8rem;
}

.footer-top {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.footer-links a {
    text-decoration: none;
    color: #e5e7eb;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #4b5563;
    background: #020617;
    font-size: 0.78rem;
}

.footer-links a:hover {
    border-color: #f97316;
    color: #f97316;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    border-top: 1px solid #111827;
    padding-top: 8px;
    color: #9ca3af;
}

.footer-meta,
.footer-copy {
    font-size: 0.78rem;
}

/* ===== GENERIC PAGE WRAPPER (Terms / Delivery / About etc.) ===== */

.page-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.page-card {
    background: rgba(15, 23, 42, 0.98);
    color: #e5e7eb;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.95);
    border: 1px solid #1f2937;
    margin-bottom: 20px;
}

.page-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-bottom: 14px;
}

.page-card p {
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 8px;
}

/* ===== CONTACT / QUERY FORM ===== */

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr);
    gap: 16px;
}




.contact-form label {
    display: block;
    margin: 8px 0 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #4b5563;
    background: #020617;
    color: #e5e7eb;
    font-size: 0.85rem;
}

.contact-form textarea {
    min-height: 100px;
    resize: vertical;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #6b7280;
}

.contact-form button {
    margin-top: 10px;
    padding: 8px 16px;
    border-radius: 999px;
    border: none;
    background: #22c55e;
    color: #052e16;
    font-size: 0.85rem;
    cursor: pointer;
}

.contact-info p {
    font-size: 0.85rem;
    margin-bottom: 6px;
}

/* Small alert styles reuse */
.contact-alert {
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
}

.contact-alert.success {
    background: rgba(22, 163, 74, 0.1);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.6);
}

.contact-alert.error {
    background: rgba(220, 38, 38, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(248, 113, 113, 0.6);
}

/* ===== COLLAPSE DESCRIPTION ===== */

.collapse-text {
    max-height: 40px;
    /* 1–2 lines */
    overflow: hidden;
    position: relative;
}

.collapse-text.expanded {
    max-height: none;
}

.toggle-desc {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.75rem;
    text-decoration: underline;
    cursor: pointer;
    color: #60a5fa;
}









/* ===== MOBILE RESPONSIVE TWEAKS ===== */

@media (max-width: 768px) {
    body {
        padding: 12px;
    }

    .container {
        max-width: 100%;
    }

    .site-header {
        border-radius: 14px;
        padding: 10px 12px;
        margin-bottom: 18px;
    }

    .logo-img {
        width: 36px;
        height: 36px;
    }

    .post-list {
        gap: 10px;
    }

    .post-card {
        padding: 10px;
        border-radius: 14px;
    }

    .post-media img,
    .post-media video {
        max-height: 180px;
        object-fit: cover;
    }
}

@media (max-width: 480px) {
    .post-card {
        padding: 8px;
    }

    .post-media img,
    .post-media video {
        max-height: 150px;
    }

    .post-title {
        font-size: 0.9rem;
    }

    .post-desc {
        font-size: 0.8rem;
    }

    .post-footer {
        gap: 4px;
    }
}
