/* ===========================
   Safak Neyisci - Art Portfolio
   Clean & Modern Theme
=========================== */

:root {
    --color-bg: #fdfcfa;
    --color-text: #2b2b2b;
    --color-muted: #777;
    --color-accent: #b8895f;
    --color-border: #e8e4dd;
    --color-surface: #ffffff;
    --max-width: 1200px;
    --radius: 6px;
    --transition: 0.25s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', 'Segoe UI', Helvetica, Arial, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Header ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(253, 252, 250, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--color-border);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.logo span {
    color: var(--color-accent);
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    max-height: 48px;
    width: auto;
    display: block;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-nav a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
    transition: color var(--transition);
    position: relative;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--color-accent);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--color-text);
}

/* ===== Hero ===== */
.hero {
    text-align: center;
    padding: 6rem 1.5rem 5rem;
}

.hero h1 {
    font-size: 2.6rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

.hero-logo {
    max-width: 320px;
    width: 100%;
    height: auto;
    margin: 0 auto 1.5rem;
    display: block;
}

.hero p {
    color: var(--color-muted);
    max-width: 560px;
    margin: 0 auto 2rem;
    font-size: 1.05rem;
}

.btn {
    display: inline-block;
    padding: 0.85rem 2rem;
    background: var(--color-text);
    color: #fff;
    border: 1px solid var(--color-text);
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition);
}

.btn:hover {
    background: transparent;
    color: var(--color-text);
}

.btn-accent {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}

.btn-accent:hover {
    background: transparent;
    color: var(--color-accent);
}

.btn-outline {
    background: transparent;
    color: var(--color-text);
}

.btn-outline:hover {
    background: var(--color-text);
    color: #fff;
}

.btn-sm {
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
}

.btn-danger {
    background: #c0392b;
    border-color: #c0392b;
    color: #fff;
}

.btn-danger:hover {
    background: transparent;
    color: #c0392b;
}

/* ===== Section ===== */
.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 1.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--color-muted);
    margin-bottom: 3rem;
}

/* ===== Category Pills ===== */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.category-filter a {
    padding: 0.5rem 1.3rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    font-size: 0.9rem;
    transition: all var(--transition);
}

.category-filter a:hover,
.category-filter a.active {
    background: var(--color-text);
    color: #fff;
    border-color: var(--color-text);
}

/* ===== Product Grid ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.8rem;
}

.product-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.product-card .img-wrap {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f3f1ed;
    position: relative;
}

.product-card .img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .img-wrap img {
    transform: scale(1.05);
}

.sold-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #2b2b2b;
    color: #fff;
    font-size: 0.75rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
}

.product-card .info {
    padding: 1.1rem 1.2rem 1.4rem;
}

.product-card .category-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-accent);
    margin-bottom: 0.3rem;
    display: block;
}

.product-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.product-card .price {
    font-weight: 600;
    color: var(--color-text);
}

.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--color-muted);
}

/* ===== Product Detail ===== */
.product-detail {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 3rem;
    align-items: flex-start;
}

.product-gallery .main-image {
    aspect-ratio: 1 / 1;
    background: #f3f1ed;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1rem;
}

.product-gallery .main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-row {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.thumb-row img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: border-color var(--transition);
}

.thumb-row img:hover,
.thumb-row img.active {
    border-color: var(--color-accent);
}

.product-info .category-tag {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-accent);
    margin-bottom: 0.6rem;
    display: inline-block;
}

.product-info h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.product-info .price {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
}

.product-info .description {
    color: var(--color-muted);
    margin-bottom: 2rem;
    white-space: pre-line;
}

.etsy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 2.2rem;
    background: #f56400;
    color: #fff;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    transition: background var(--transition);
}

.etsy-btn:hover {
    background: #d35600;
}

.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--color-muted);
    font-size: 0.9rem;
}

.back-link:hover {
    color: var(--color-accent);
}

/* ===== About Page ===== */
.about-page {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 3rem;
    align-items: center;
}

.about-photo img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: var(--radius);
    background: #f3f1ed;
}

.about-bio h2 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.about-bio p {
    color: var(--color-muted);
    margin-bottom: 1.2rem;
    white-space: pre-line;
}

@media (max-width: 860px) {
    .about-page {
        grid-template-columns: 1fr;
    }
}

/* ===== About / Footer ===== */
.about-section {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.about-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    color: var(--color-muted);
    font-size: 1.05rem;
}

.site-footer {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: var(--color-muted);
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-bottom: 1rem;
}

.social-links a {
    color: var(--color-text);
    font-weight: 500;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 0.4rem 1.1rem;
    font-size: 0.85rem;
    transition: all var(--transition);
}

.social-links a:hover {
    background: var(--color-text);
    color: #fff;
}

/* ===== Admin ===== */
.admin-body {
    background: #f5f4f1;
}

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 240px;
    background: #2b2b2b;
    color: #fff;
    padding: 2rem 1.5rem;
    flex-shrink: 0;
}

.admin-sidebar h2 {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.admin-sidebar nav ul {
    list-style: none;
}

.admin-sidebar nav a {
    display: block;
    padding: 0.7rem 0.8rem;
    border-radius: var(--radius);
    color: #ddd;
    margin-bottom: 0.3rem;
    transition: background var(--transition);
}

.admin-sidebar nav a:hover,
.admin-sidebar nav a.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.admin-main {
    flex: 1;
    padding: 2.5rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-header h1 {
    font-size: 1.6rem;
}

.card {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    padding: 1.8rem;
    margin-bottom: 1.5rem;
}

.alert {
    padding: 0.9rem 1.2rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.92rem;
}

.alert-success {
    background: #e6f4ea;
    color: #1e7e34;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #fdecea;
    color: #c0392b;
    border: 1px solid #f5c6cb;
}

.form-group {
    margin-bottom: 1.3rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.92rem;
}

.form-control {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    background: #fff;
}

textarea.form-control {
    min-height: 130px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.3rem;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-row input {
    width: auto;
}

table.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    text-align: left;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.92rem;
}

.admin-table th {
    color: var(--color-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.admin-table img.thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.actions-cell {
    display: flex;
    gap: 0.5rem;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2b2b2b;
}

.login-box {
    background: #fff;
    padding: 2.5rem;
    border-radius: var(--radius);
    width: 100%;
    max-width: 380px;
}

.login-box h1 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.current-images {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.current-images .img-item {
    position: relative;
}

.current-images img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

.current-images .remove-img {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #c0392b;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 0.8rem;
    cursor: pointer;
    line-height: 1;
}

/* ===== Responsive ===== */
@media (max-width: 860px) {
    .product-detail {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .admin-wrapper {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
    }
}

@media (max-width: 700px) {
    .nav-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: 76px;
        left: 0;
        right: 0;
        background: var(--color-bg);
        border-bottom: 1px solid var(--color-border);
        display: none;
    }

    .main-nav.open {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        padding: 1rem 24px 2rem;
        gap: 0;
    }

    .main-nav li {
        border-bottom: 1px solid var(--color-border);
    }

    .main-nav a {
        display: block;
        padding: 0.9rem 0;
    }

    .hero h1 {
        font-size: 2rem;
    }
}
