/* Apple-inspired minimal styling for Tyne Brew */

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

:root {
    --bg: #f5f5f7;
    --card-bg: #ffffff;
    --accent: #0071e3; /* Apple blue-ish */
    --accent-soft: rgba(0, 113, 227, 0.08);
    --text: #1d1d1f;
    --text-muted: #6e6e73;
    --border-subtle: #d2d2d7;
    --danger: #ff3b30;
    --radius-xl: 18px;
    --shadow-soft: 0 18px 40px rgba(0,0,0,0.08);
    --transition-fast: 0.2s ease-out;
}

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
    background: url('../img/background.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    margin: 0;
    color: var(--text);
}

.site-shell {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3rem;
}

main {
    margin-top: 1.5rem;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    position: sticky;
    top: 0.75rem;
    z-index: 20;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.brand-logo {
    width: 26px;
    height: 26px;
    border-radius: 30%;
    background: radial-gradient(circle at 30% 0, #ffd27f, #d78c3f);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #3b2410;
    font-size: 0.8rem;
}

.brand-text {
    font-weight: 600;
    letter-spacing: 0.03em;
    font-size: 0.95rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.88rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.nav-links a:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

.nav-links .nav-primary {
    color: var(--text);
    font-weight: 500;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: #f5f5f7;
    border: 1px solid rgba(210, 210, 215, 0.7);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #0071e3, #0a84ff);
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 113, 227, 0.35);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 40px rgba(0, 113, 227, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text);
}

.btn-outline:hover {
    background: #ffffff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.05);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    padding-inline: 0.2rem;
}

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

h1, h2, h3 {
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}

h1 {
    font-size: 1.75rem;
}

h2 {
    font-size: 1.35rem;
}

p {
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

/* Product grid */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 1.25rem;
}

.product-card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    padding: 1rem;
    text-align: left;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: "";
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle at 0 0, rgba(255,255,255,0.9), transparent 55%);
    opacity: 0;
    transition: opacity 0.25s ease-out;
    pointer-events: none;
}

.product-card:hover::before {
    opacity: 1;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.18);
}

.product-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 0.75rem;
}

.product-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.2rem;
    color: var(--text);
}

.product-card p {
    margin-bottom: 0.4rem;
}

form {
    margin-top: 0.5rem;
}

.form-card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: 1.5rem 1.75rem;
    box-shadow: var(--shadow-soft);
    max-width: 520px;
}

.form-grid {
    display: grid;
    gap: 1rem;
}

label {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.25rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border-radius: 0.8rem;
    border: 1px solid var(--border-subtle);
    font-size: 0.9rem;
    background: #f9f9fb;
    transition: border var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
    background: #ffffff;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

th,
td {
    padding: 0.65rem 0.9rem;
    font-size: 0.9rem;
    text-align: left;
}

th {
    background: #f5f5f7;
    color: var(--text-muted);
    font-weight: 500;
}

tr:nth-child(even) td {
    background: #fafafa;
}

.error {
    color: var(--danger);
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.notice {
    color: var(--accent);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

/* Footer */

.site-footer {
    margin-top: auto;
    padding: 1.75rem 1.25rem 2.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

/* Admin specific */

.admin-badge {
    font-size: 0.7rem;
    text-transform: uppercase;
    padding: 0.15rem 0.4rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    letter-spacing: 0.08em;
}

.admin-actions {
    display: flex;
    gap: 0.35rem;
}

.hero-card {
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 24px;
    padding: 1.75rem 2rem;
    box-shadow: 0 18px 40px rgba(0,0,0,0.12);
    margin-top: 1.75rem;
    margin-bottom: 1.25rem;
}

.hero-text h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.hero-sub {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.filter-bar {
    margin-bottom: 0.75rem;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

@media (max-width: 600px) {
    .hero-card {
        padding: 1.25rem 1.35rem;
    }
}


@media (max-width: 720px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        border-radius: 20px;
    }

    .nav-links {
        width: 100%;
        justify-content: space-between;
    }

    .site-shell {
        padding-inline: 1rem;
    }
}

