/*
 * Theme Name:  Star Cohn
 * Theme URI:   https://starcohn.ro
 * Description: Temă personalizată pentru Star Cohn Coffee Shop. Specialty coffee. Grab & go. Locul tău.
 * Version:     1.5.6
 * Author:      Star Cohn
 * Author URI:  https://starcohn.ro
 * License:     GPL-2.0-or-later
 * Text Domain: starcohn
 */

/* ═══════════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --sc-bg:          #ffffff;
    --sc-fg:          #121614;
    --sc-accent:      #dde8e4;
    --sc-muted:       rgba(18,22,20,0.6);
    --sc-radius:      0.5rem;
    --sc-font:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--sc-font);
    background: var(--sc-bg);
    color: var(--sc-fg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { cursor: pointer; font-family: inherit; }
h1,h2,h3,h4,h5,h6 { font-family: var(--sc-font); }

/* ═══════════════════════════════════════════════════
   LAYOUT
═══════════════════════════════════════════════════ */
.sc-site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.sc-main { flex: 1; }

/* ═══════════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════════ */
.sc-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--sc-bg);
    border-bottom: 1px solid var(--sc-accent);
    transition: box-shadow 0.3s ease;
}
.sc-header.scrolled { box-shadow: 0 1px 8px rgba(18,22,20,0.08); }

.sc-header-inner {
    max-width: 1920px;
    margin: 0 auto;
    padding: 8px 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.sc-logo { display: inline-flex; flex-shrink: 0; }
.sc-logo img {
    height: 80px;
    width: auto;
    object-fit: contain;
    border-radius: 0;
}
@media (max-width: 640px) { .sc-logo img { height: 48px; } }

/* ═══════════════════════════════════════════════════
   TAGLINE BAR
═══════════════════════════════════════════════════ */
.sc-tagline-bar {
    width: 100%;
    background: var(--sc-accent);
    text-align: center;
    padding: 10px 16px;
    box-sizing: border-box;
}
.sc-tagline-bar p {
    margin: 0;
    font-size: 1rem;
    color: var(--sc-fg);
    font-style: italic;
}

/* ═══════════════════════════════════════════════════
   CATEGORY SECTION
═══════════════════════════════════════════════════ */
.sc-section-title {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--sc-fg);
    margin: 2rem 0 1.5rem;
}

/* Homepage category section — lateral padding */
.sc-section {
    padding-left: 50px;
    padding-right: 50px;
}
@media (max-width: 768px) {
    .sc-section { padding-left: 16px; padding-right: 16px; }
}

/* Grid — 2 columns desktop, 1 column mobile */
.sc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    width: 100%;
}
@media (max-width: 768px) { .sc-grid { grid-template-columns: 1fr; } }

/* Category block */
.sc-cat {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 1;
    text-decoration: none;
    background: var(--sc-accent);
    padding: 0;
    border-radius: 16px;
}
.sc-cat:focus-visible {
    outline: 2px solid var(--sc-fg);
    outline-offset: 2px;
}
.sc-cat::after {
    content: '';
    position: absolute;
    inset: 0;
    background: transparent;
    transition: background 0.2s ease;
    pointer-events: none;
}
.sc-cat:hover::after { background: rgba(0,0,0,0.08); }

/* Name badge — centered on the image */
.sc-cat-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    max-width: calc(100% - 28px);
    text-align: center;
    background: rgba(18,22,20,0.6);
    color: #fff;
    padding: 8px 22px;
    border-radius: 16px;
    font-weight: 800;
    font-size: clamp(1.6rem, 4vw, 4.5rem);
    line-height: 1.1;
    white-space: normal;
    pointer-events: none;
}
@media (max-width: 480px) { .sc-cat-badge { padding: 6px 14px; } }

/* Image */
.sc-cat-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}
.sc-cat:hover .sc-cat-img { transform: scale(1.02); }

/* Placeholder (no image set) */
.sc-cat-placeholder {
    width: 100%;
    height: 100%;
    background: var(--sc-accent);
}

/* Coming soon */
.sc-cat--soon { cursor: default; }
.sc-cat-soon-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(18,22,20,0.55);
    border-radius: 16px;
}
.sc-cat-soon-badge {
    background: #ffffff;
    color: var(--sc-fg);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 8px 20px;
    border-radius: 999px;
    letter-spacing: 0.03em;
}
.sc-cat-img--dimmed { filter: brightness(0.75); }

/* ═══════════════════════════════════════════════════
   LOYALTY SECTION
═══════════════════════════════════════════════════ */
.sc-loyalty-wrap {
    background: var(--sc-accent);
    padding: 10px 20px;
    margin-top: 2px;
    box-sizing: border-box;
}
.sc-loyalty-inner {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}
.sc-loyalty-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(18,22,20,0.05);
    padding: 10px 32px;
    box-sizing: border-box;
}
@media (max-width: 480px) { .sc-loyalty-card { padding: 10px 16px; } }

.sc-loyalty-icon {
    width: 56px;
    height: 56px;
    background: var(--sc-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}
.sc-loyalty-icon svg {
    width: 28px;
    height: 28px;
    color: var(--sc-fg);
}
.sc-loyalty-heading {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--sc-fg);
    margin: 0 0 0.75rem;
}
.sc-loyalty-desc {
    font-size: 0.95rem;
    color: var(--sc-muted);
    line-height: 1.6;
    margin: 0 0 2rem;
}
.sc-loyalty-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--sc-fg);
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 10px 32px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.sc-loyalty-btn:hover { opacity: 0.85; transform: translateY(-1px); }
.sc-loyalty-btn:focus-visible { outline: 2px solid var(--sc-fg); outline-offset: 3px; }
.sc-loyalty-btn svg { width: 16px; height: 16px; }

.sc-loyalty-register {
    margin: 1.25rem 0 0;
    font-size: 0.85rem;
    color: var(--sc-muted);
}
.sc-loyalty-register a {
    color: var(--sc-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.sc-loyalty-register a:hover { color: var(--sc-fg); }

/* Logged-in loyalty card */
.sc-loyalty-sub {
    font-size: 0.9rem;
    color: var(--sc-muted);
    margin: 0 0 1.5rem;
}
.sc-loyalty-points-box {
    background: var(--sc-accent);
    border-radius: 8px;
    padding: 10px 24px;
    margin-bottom: 16px;
}
.sc-loyalty-points-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.sc-loyalty-points-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--sc-muted);
}
.sc-loyalty-points-value {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--sc-fg);
}
.sc-loyalty-dots {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}
.sc-loyalty-dot {
    aspect-ratio: 1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sc-loyalty-dot--filled { background: var(--sc-fg); }
.sc-loyalty-dot--empty  { background: #fff; border: 1px solid rgba(18,22,20,0.2); }
.sc-loyalty-dot svg { width: 12px; height: 12px; color: #fff; }
.sc-loyalty-progress-note {
    font-size: 0.75rem;
    color: var(--sc-muted);
}

/* ═══════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════ */
.sc-footer-top {
    border-top: 1px solid var(--sc-accent);
    padding: 10px 20px;
}
.sc-footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}
@media (min-width: 768px) {
    .sc-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 64px;
    }
}
.sc-footer-logo img {
    height: 44px;
    width: auto;
    object-fit: contain;
    border-radius: 0;
    margin-bottom: 10px;
}
.sc-footer-tagline {
    font-style: italic;
    color: var(--sc-muted);
    font-size: 0.875rem;
    line-height: 1.6;
}
.sc-footer-contact {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 0.875rem;
    color: var(--sc-fg);
}
@media (min-width: 768px) { .sc-footer-contact { align-items: flex-end; } }

.sc-footer-contact-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.sc-footer-contact-row svg {
    width: 16px;
    height: 16px;
    color: var(--sc-muted);
    flex-shrink: 0;
}
.sc-footer-contact a:hover { opacity: 0.7; }

.sc-footer-bar {
    background: var(--sc-fg);
    color: #fff;
    text-align: center;
    padding: 10px 20px;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
}
/* ═══════════════════════════════════════════════════
   HEADER ACTIONS (search, chest, cart, account)
═══════════════════════════════════════════════════ */
.sc-header-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 10px;
}

/* Search field (magnifier submits) */
.sc-search-form {
    display: flex;
    align-items: center;
    background: var(--sc-accent);
    border-radius: 999px;
    padding: 2px 2px 2px 14px;
    flex: 0 1 240px;
    min-width: 120px;
}
.sc-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--sc-fg);
    padding: 6px 0;
    outline: none;
}
.sc-search-input::placeholder { color: var(--sc-muted); }
.sc-search-go {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: var(--sc-fg);
    color: #fff;
    transition: opacity 0.2s ease;
}
.sc-search-go:hover { opacity: 0.88; }
.sc-search-go svg { width: 16px; height: 16px; }

/* Auth button (shown to logged-out users in place of the search field) */
.sc-auth-btn {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    background: var(--sc-fg);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 18px;
    border-radius: 999px;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.sc-auth-btn:hover { opacity: 0.9; transform: translateY(-1px); }
@media (max-width: 480px) { .sc-auth-btn { font-size: 0.78rem; padding: 7px 12px; } }

.sc-icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--sc-fg);
    border-radius: 50%;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}
.sc-icon-btn:hover { background: var(--sc-accent); }
.sc-icon-btn:active { transform: scale(0.94); }
.sc-icon-btn:focus-visible { outline: 2px solid var(--sc-fg); outline-offset: 2px; }
.sc-icon-btn svg { width: 20px; height: 20px; display: block; }

/* Count badge (cart + gifts) */
.sc-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #dc2626;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    line-height: 1;
    border-radius: 999px;
    border: 2px solid var(--sc-bg);
}
.sc-badge[hidden] { display: none; }

/* Gift chest: highlight the "power" badge in gold when there are gifts */
.sc-chest.has-gifts { color: var(--sc-fg); }
.sc-chest.has-gifts .sc-gift-count {
    background: #d99a23;
    box-shadow: 0 0 0 0 rgba(217,154,35,0.5);
    animation: sc-pulse 1.8s ease-out infinite;
}
@keyframes sc-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(217,154,35,0.45); }
    70%  { box-shadow: 0 0 0 7px rgba(217,154,35,0); }
    100% { box-shadow: 0 0 0 0 rgba(217,154,35,0); }
}

/* Account status dot */
.sc-status-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid var(--sc-bg);
    box-sizing: border-box;
}
.sc-status-dot.is-online  { background: #16a34a; }
.sc-status-dot.is-offline { background: #dc2626; }

/* ═══════════════════════════════════════════════════
   FOOTER — legal, social, google stars
═══════════════════════════════════════════════════ */
@media (min-width: 768px) {
    .sc-footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

.sc-footer-logo-link { display: inline-block; }

.sc-footer-heading {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--sc-fg);
    margin: 0 0 14px;
}

/* Legal menu */
.sc-legal-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sc-legal-menu a {
    font-size: 0.875rem;
    color: var(--sc-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}
.sc-legal-menu a:hover { color: var(--sc-fg); }

/* Social */
.sc-footer-social {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}
.sc-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--sc-accent);
    color: var(--sc-fg);
    transition: transform 0.2s ease, background 0.2s ease;
}
.sc-social-btn:hover { transform: translateY(-2px); background: var(--sc-fg); color: #fff; }
.sc-social-btn svg { width: 18px; height: 18px; }

/* Google stars */
.sc-google-stars {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
    text-decoration: none;
    color: var(--sc-fg);
}
.sc-google-label { font-weight: 700; font-size: 0.875rem; }
.sc-stars { display: inline-flex; gap: 1px; }
.sc-star { width: 20px; height: 20px; }
.sc-star.is-full  { fill: #f5b50a; }
.sc-star.is-empty { fill: rgba(18,22,20,0.18); }
.sc-star.is-half  { fill: #f5b50a; clip-path: inset(0 50% 0 0); }
.sc-google-rating { font-size: 0.8rem; color: var(--sc-muted); }

/* ═══════════════════════════════════════════════════
   SEARCH RESULTS PAGE
═══════════════════════════════════════════════════ */
.sc-search-results {
    max-width: 1200px;
    margin: 2.5rem auto 4rem;
    padding: 0 20px;
}
.sc-search-head { margin-bottom: 2rem; }
.sc-search-eyebrow {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--sc-muted);
    margin: 0 0 0.5rem;
}
.sc-search-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--sc-fg);
    margin: 0;
}

.sc-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
}
.sc-result-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--sc-fg);
    background: var(--sc-bg);
    border: 1px solid var(--sc-accent);
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.sc-result-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(18,22,20,0.08); }
.sc-result-card:focus-visible { outline: 2px solid var(--sc-fg); outline-offset: 2px; }

.sc-result-media { aspect-ratio: 1 / 1; background: var(--sc-accent); }
.sc-result-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sc-result-img--empty { display: block; width: 100%; height: 100%; background: var(--sc-accent); }

.sc-result-body { padding: 10px 16px; }
.sc-result-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
}
.sc-result-price {
    margin-top: 6px;
    font-weight: 700;
    color: var(--sc-fg);
}
.sc-result-price del { color: var(--sc-muted); font-weight: 500; margin-right: 6px; }
.sc-result-price ins { text-decoration: none; }

/* Empty state */
.sc-search-empty {
    text-align: center;
    color: var(--sc-muted);
    padding: 10px 0;
}
.sc-search-empty p { margin: 0 0 1.5rem; font-size: 1.05rem; }
.sc-search-shop-btn {
    display: inline-flex;
    align-items: center;
    background: var(--sc-fg);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 999px;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.sc-search-shop-btn:hover { opacity: 0.9; transform: translateY(-1px); }

/* Pagination */
.sc-search-results .pagination,
.sc-search-results .navigation { margin-top: 2.5rem; }
.sc-search-results .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.sc-search-results .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    padding: 8px 12px;
    border-radius: 10px;
    background: var(--sc-accent);
    color: var(--sc-fg);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}
.sc-search-results .page-numbers.current { background: var(--sc-fg); color: #fff; }
.sc-search-results .page-numbers:hover:not(.current) { opacity: 0.85; }

/* Footer — live opening hours (program) */
.sc-footer-hours { align-items: flex-start; }
.sc-hours-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sc-hours-row { font-size: 0.82rem; color: var(--sc-fg); line-height: 1.5; }
.sc-open-badge {
    display: inline-block;
    align-self: flex-start;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 2px 8px;
    border-radius: 999px;
    margin-bottom: 4px;
}
.sc-open-badge.is-open   { background: rgba(22,163,74,0.12);  color: #15803d; }
.sc-open-badge.is-closed { background: rgba(220,38,38,0.12);  color: #b91c1c; }
@media (min-width: 768px) {
    .sc-footer-contact .sc-hours-list { align-items: flex-end; text-align: right; }
}

/* ═══════════════════════════════════════════════════
   WOOCOMMERCE PAGES — page padding (shop, category, product, cart…)
═══════════════════════════════════════════════════ */
body.woocommerce .sc-main,
body.woocommerce-page .sc-main {
    padding: 25px;
}
@media (max-width: 768px) {
    body.woocommerce .sc-main,
    body.woocommerce-page .sc-main {
        padding: 10px;
    }
}

/* ═══════════════════════════════════════════════════
   NETOPIA PAYMENTS BADGE (footer, below Google stars)
═══════════════════════════════════════════════════ */
.sc-netopia {
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    background: var(--sc-fg);
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 150px;
}
.sc-netopia img,
.sc-netopia svg { max-width: 100%; height: auto; display: block; }
