/* ============================================
   Wines Page — Header
   ============================================ */

.page-header {
    padding: calc(var(--nav-h) + var(--space-2xl)) 0 var(--space-xl);
    text-align: center;
    background: var(--bg-warm);
}

.page-header--hero {
    position: relative;
    padding: calc(var(--nav-h) + var(--space-3xl)) 0 var(--space-2xl);
    overflow: hidden;
}

.page-header__bg {
    position: absolute;
    inset: 0;
}

.page-header__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.page-header__overlay {
    position: absolute;
    inset: 0;
    background: rgba(44, 36, 32, 0.5);
}

.page-header--hero .container {
    position: relative;
    z-index: 1;
}

.page-header--hero .page-header__title {
    color: var(--white);
}

.page-header--hero .page-header__desc {
    color: rgba(255, 255, 255, 0.85);
}

.page-header__title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 300;
    font-style: italic;
    color: var(--dark);
    margin-bottom: var(--space-sm);
}

.page-header__desc {
    font-size: 1.0625rem;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ============================================
   Category Filter Tabs
   ============================================ */

.wine-filter {
    position: sticky;
    top: var(--nav-h);
    z-index: 100;
    background: var(--white);
    border-bottom: 1px solid var(--light-gray);
    padding: var(--space-sm) 0;
}

.wine-filter__tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
}

.wine-filter__tabs::-webkit-scrollbar { display: none; }

.filter-tab {
    flex-shrink: 0;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
    transition: all var(--duration) var(--ease);
    cursor: pointer;
    white-space: nowrap;
}

.filter-tab:hover {
    color: var(--text);
    background: var(--cream);
}

.filter-tab.active {
    color: var(--wine);
    background: rgba(114, 47, 55, 0.08);
    border-color: rgba(114, 47, 55, 0.15);
}



/* ============================================
   Wine Catalog
   ============================================ */

.wine-catalog {
    padding: var(--space-xl) 0 var(--space-3xl);
    background: var(--white);
}

.wine-section {
    margin-bottom: var(--space-2xl);
}

.wine-section:last-child {
    margin-bottom: 0;
}

.wine-section.hidden {
    display: none;
}

.wine-section__title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--dark);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--light-gray);
}

/* ============================================
   Wine Grid
   ============================================ */

.wine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
}

/* ============================================
   Wine Item Card
   ============================================ */

.wine-item {
    background: var(--cream);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--duration-slow) var(--ease-out),
                box-shadow var(--duration-slow) var(--ease-out);
    position: relative;
}

.wine-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(44, 36, 32, 0.08);
}

.wine-item__img {
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    background: var(--white);
    overflow: hidden;
}

.wine-item__img img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform var(--duration-slow) var(--ease-out);
}

.wine-item:hover .wine-item__img img {
    transform: scale(1.05);
}

.wine-item__info {
    padding: var(--space-md);
}

.wine-item__tag {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
}

.wine-item__tag--petnat   { background: #E8D5B7; color: #6B4E2E; }
.wine-item__tag--sekt     { background: var(--oak); color: var(--white); }
.wine-item__tag--weiss    { background: #E8E4A0; color: #5A5520; }
.wine-item__tag--orange   { background: #E8A862; color: #5A3A10; }
.wine-item__tag--rose     { background: #E8B0B5; color: #6B2A32; }
.wine-item__tag--rot      { background: var(--wine); color: var(--white); }
.wine-item__tag--kolonia   { background: var(--dark); color: var(--white); }
.wine-item__tag--elementar { background: #2C2420; color: #C4A882; }
.wine-item__tag--trilogie  { background: linear-gradient(135deg, var(--wine-dark), var(--oak-dark)); color: var(--white); }

.wine-item__name {
    font-family: var(--font-heading);
    font-size: 1.375rem;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.wine-item__grape {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.wine-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.wine-item__year {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--oak);
    font-weight: 500;
}

.wine-item__abv {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.125rem 0.5rem;
    border: 1px solid var(--light-gray);
    border-radius: var(--radius);
}

.wine-item__badge {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--leaf);
    letter-spacing: 0.03em;
}

.wine-item__price {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--wine);
}

.wine-item__order-btn {
    margin-top: var(--space-sm);
    padding: 0.35rem 1rem;
    background: var(--wine);
    color: var(--white);
    border: none;
    border-radius: 20px;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.2s;
    width: 100%;
}

.wine-item__order-btn:hover:not(:disabled) {
    opacity: 0.82;
}

.wine-item__order-btn:disabled {
    background: var(--text-muted, #999);
    cursor: default;
    opacity: 0.5;
}

/* ============================================
   Wine Detail (hidden on card, shown in modal)
   ============================================ */

.wine-item__detail {
    display: none;
}

.wine-item__desc {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.6;
    font-style: italic;
}

/* ============================================
   Sold-out State
   ============================================ */

.wine-item[data-sold-out="true"] {
    cursor: default;
}

.wine-item[data-sold-out="true"] .wine-item__img {
    position: relative;
}

.wine-item[data-sold-out="true"] .wine-item__img::after {
    content: 'Ausverkauft';
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--white);
    background: var(--wine);
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius);
}

/* ============================================ */

.wine-item__specs {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.01em;
    margin-top: 0.625rem;
    padding-top: 0.625rem;
    border-top: 1px dashed var(--light-gray);
    cursor: help;
}

/* ============================================
   Wine Detail Modal
   ============================================ */

.wine-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
}

.wine-modal.open {
    display: flex;
}

.wine-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(44, 36, 32, 0.6);
    cursor: pointer;
}

.wine-modal__content {
    position: relative;
    background: var(--white);
    border-radius: 20px;
    max-width: 720px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    box-shadow: 0 24px 80px rgba(0,0,0,0.2);
}

.wine-modal__close {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-md);
    font-size: 1.75rem;
    color: var(--text-muted);
    cursor: pointer;
    background: none;
    border: none;
    z-index: 1;
    line-height: 1;
}

.wine-modal__close:hover {
    color: var(--dark);
}

.wine-modal__img {
    background: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    border-radius: 20px 0 0 20px;
    min-height: 400px;
}

.wine-modal__img img {
    max-height: 350px;
    max-width: 100%;
    object-fit: contain;
}

.wine-modal__body {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.wine-modal__tag {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius);
    align-self: flex-start;
}

.wine-modal__name {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 500;
    color: var(--dark);
    line-height: 1.2;
}

.wine-modal__grape {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.wine-modal__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.8125rem;
}

.wine-modal__desc {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.7;
    font-style: italic;
    padding: var(--space-sm) 0;
    border-top: 1px solid var(--light-gray);
    border-bottom: 1px solid var(--light-gray);
}

.wine-modal__specs {
    font-size: 0.8125rem;
    color: var(--text-muted);
    letter-spacing: 0.01em;
    cursor: help;
}

.wine-modal__specs:empty {
    display: none;
}

.wine-modal__specs-legend {
    font-size: 0.6875rem;
    color: var(--text-muted);
    opacity: 0.55;
    margin-top: 0.25rem;
    letter-spacing: 0.01em;
}

.wine-modal__price {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--wine);
}

/* Modal Qty Selector */
.wine-modal__qty-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.wine-modal__qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.wine-modal__qty-label {
    font-size: 0.875rem;
    color: var(--text);
}

.wine-modal__qty-label small {
    color: var(--text-muted);
    font-weight: 400;
}

.wine-modal__qty-controls {
    display: flex;
    align-items: center;
    gap: 0;
}

.wine-modal__qty-controls .qty-btn {
    width: 32px;
    height: 32px;
    font-size: 1rem;
}

.wine-modal__qty-controls .qty-value {
    width: 40px;
    font-size: 1.125rem;
}

.wine-modal__add-btn {
    width: 100%;
    padding: 0.875rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: var(--wine);
    color: var(--white);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: var(--space-xs);
}

.wine-modal__add-btn:hover {
    background: var(--wine-dark);
}

.wine-modal__sold-out {
    margin-top: var(--space-md);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-style: italic;
    color: var(--text-muted);
    text-align: center;
    padding: var(--space-sm) var(--space-md);
    border: 1px dashed var(--light-gray);
    border-radius: var(--radius);
}

@media (max-width: 600px) {
    .wine-modal__content {
        grid-template-columns: 1fr;
        max-height: 95vh;
    }

    .wine-modal__img {
        border-radius: 20px 20px 0 0;
        min-height: 250px;
        padding: var(--space-md);
    }

    .wine-modal__img img {
        max-height: 220px;
    }
}

/* ============================================
   NSW Info
   ============================================ */

.nsw-info {
    padding: var(--space-xl) 0;
    background: var(--bg-warm);
}

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

.nsw-info__inner h3 {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--leaf);
    margin-bottom: var(--space-xs);
}

.nsw-info__inner p {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ============================================
   Nav active state
   ============================================ */

.nav__links a.active {
    color: var(--wine) !important;
}

.nav__links a.active::after {
    width: 100%;
}

/* ============================================
   Quantity Selector
   ============================================ */

.wine-item__qty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: var(--space-sm) var(--space-md);
    border-top: 1px solid var(--light-gray);
    background: var(--white);
}

.qty-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--light-gray);
    background: var(--cream);
    font-size: 1.125rem;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.qty-btn:hover {
    background: var(--wine);
    color: var(--white);
    border-color: var(--wine);
}

.qty-value {
    width: 48px;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--dark);
}

.wine-item.in-cart {
    box-shadow: 0 0 0 2px var(--wine);
}

.wine-item.in-cart .qty-value {
    color: var(--wine);
    font-weight: 600;
}

/* ============================================
   Sticky Cart Bar
   ============================================ */

.cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    background: var(--dark);
    color: var(--white);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
}

.cart-bar.visible {
    transform: translateY(0);
}

.cart-bar__inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: var(--space-sm) var(--space-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-bar__info {
    font-size: 0.875rem;
    line-height: 1.5;
}

.cart-bar__count {
    font-weight: 600;
}

.cart-bar__line {
    display: block;
    opacity: 0.6;
    font-size: 0.75rem;
}

.cart-bar__total {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
}

.cart-bar__btn {
    padding: 0.75rem 1.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: var(--wine);
    color: var(--white);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.cart-bar__btn:hover {
    background: var(--wine-light);
}

.cart-bar__btn:active {
    transform: scale(0.97);
}

/* ============================================
   Order Modal
   ============================================ */

.order-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.order-modal.open {
    display: flex;
}

.order-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(44, 36, 32, 0.7);
    cursor: pointer;
}

.order-modal__content {
    position: relative;
    background: var(--white);
    border-radius: 20px;
    max-width: 560px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: var(--space-xl);
    box-shadow: 0 24px 80px rgba(0,0,0,0.2);
}

.order-modal__close {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-md);
    font-size: 1.75rem;
    color: var(--text-muted);
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
}

.order-modal__close:hover {
    color: var(--dark);
}

.order-modal__title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 400;
    margin-bottom: var(--space-md);
}

.order-modal__summary {
    background: var(--cream);
    border-radius: 12px;
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    max-height: 200px;
    overflow-y: auto;
}

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

.order-modal__summary td {
    padding: 0.375rem 0;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--light-gray);
}

.order-modal__summary td:nth-child(2) {
    text-align: right;
    font-weight: 500;
    white-space: nowrap;
}

.order-modal__summary td:nth-child(3) {
    width: 32px;
    text-align: center;
}

.order-remove-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
    transition: color 0.2s ease;
}

.order-remove-btn:hover {
    color: #c0392b;
}

.order-summary-shipping td,
.order-summary-total td {
    border-bottom: none !important;
}

.order-summary-total td {
    font-weight: 600;
    padding-top: 0.5rem;
    font-size: 1rem;
    color: var(--wine);
}

.order-modal__form .form-group {
    margin-bottom: var(--space-sm);
}

.order-modal__form .form-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: var(--space-sm);
    margin-bottom: 0;
}

.order-modal__form .form-row .form-group {
    margin-bottom: var(--space-sm);
}

.order-modal__form label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
    color: var(--dark-soft);
}

.order-modal__form input,
.order-modal__form textarea {
    width: 100%;
    padding: 0.75rem 0.875rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    border: 1px solid var(--light-gray);
    border-radius: 10px;
    background: var(--cream);
    color: var(--text);
    outline: none;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.order-modal__form input:focus,
.order-modal__form textarea:focus {
    border-color: var(--wine);
    background: var(--white);
}

.order-modal__shipping {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin: var(--space-sm) 0;
}

.delivery-options {
    display: flex;
    gap: var(--space-md);
    margin-top: 0.375rem;
}

.delivery-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9375rem;
}

.delivery-option input[type="radio"] {
    accent-color: var(--wine);
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

.order-modal__submit {
    width: 100%;
    padding: 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: var(--wine);
    color: var(--white);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.order-modal__submit:hover {
    background: var(--wine-dark);
}

.order-modal__success {
    display: none;
    text-align: center;
    padding: var(--space-xl) 0;
}

.order-modal__success p {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--leaf);
    line-height: 1.5;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    .wine-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: var(--space-sm);
    }

    .wine-item__img {
        height: 260px;
    }

    .wine-filter__tabs {
        padding: 0 var(--space-xs);
    }

    .page-header {
        padding-top: calc(var(--nav-h) + var(--space-xl));
    }
}

@media (max-width: 480px) {
    .wine-grid {
        grid-template-columns: 1fr;
    }

    .wine-item__img {
        height: 300px;
    }
}
