/* ==========================================================================
   SHOP.CSS — Tilføjer webshop-specifik styling oven på style.css
   ========================================================================== */

/* --- Shop page header --- */
.shop-eyebrow {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #aaa;
    margin-bottom: 15px;
}

.shop-page-header {
    padding: 70px 0 50px;
}

/* --- Header kurv knap --- */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cart-trigger {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    color: #000;
    padding: 5px;
    display: flex;
    align-items: center;
    transition: opacity 0.2s;
}

.cart-trigger:hover { opacity: 0.5; }

.cart-count {
    position: absolute;
    top: -5px;
    right: -8px;
    background: #000;
    color: #fff;
    font-size: 0.65rem;
    font-family: 'Inter', sans-serif;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cart-count.has-items {
    opacity: 1;
    transform: scale(1);
}

/* --- Produkt grid polish --- */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 70px 40px;
    padding-bottom: 120px;
}

.shop-product-card {
    display: flex;
    flex-direction: column;
}

.product-image-wrap {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    margin-bottom: 20px;
}

.product-image-wrap img {
    aspect-ratio: 3/4;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: block;
    width: 100%;
}

.product-image-wrap:hover img {
    transform: scale(1.03);
}

.product-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-overlay span {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #000;
    border-bottom: 1px solid #000;
    padding-bottom: 2px;
}

.product-image-wrap:hover .product-overlay {
    opacity: 1;
}

.shop-product-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.shop-product-info h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.product-desc {
    color: #777;
    font-size: 0.88rem;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 15px;
}

.price-and-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.product-price {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    color: #000;
}

.add-to-cart-btn {
    background: none;
    border: 1px solid #000;
    color: #000;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 9px 16px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.add-to-cart-btn:hover {
    background: #000;
    color: #fff;
}

.add-to-cart-btn.added {
    background: #2d6a4f;
    border-color: #2d6a4f;
    color: #fff;
}

.hide-product {
    display: none;
}

/* --- Kurv sidebar --- */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 5000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -480px;
    width: 440px;
    height: 100vh;
    background: #fff;
    z-index: 5001;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 40px rgba(0,0,0,0.06);
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px 35px 25px;
    border-bottom: 1px solid #eee;
}

.cart-header h3 {
    font-size: 1.5rem;
}

.cart-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: #888;
    transition: color 0.2s, transform 0.2s;
    line-height: 1;
}

.cart-close:hover {
    color: #000;
    transform: rotate(90deg);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px 35px;
}

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    height: 200px;
    color: #bbb;
    font-size: 0.9rem;
    font-style: italic;
}

/* Individuel kurv-vare */
.cart-item {
    display: grid;
    grid-template-columns: 70px 1fr auto;
    gap: 15px;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid #f0f0f0;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

.cart-item-img {
    width: 70px;
    height: 90px;
    object-fit: cover;
    border: 1px solid #eee;
}

.cart-item-details h4 {
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    margin-bottom: 6px;
    font-weight: 400;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.qty-btn {
    background: none;
    border: 1px solid #ddd;
    width: 24px;
    height: 24px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}

.qty-btn:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}

.qty-num {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    min-width: 20px;
    text-align: center;
}

.cart-item-price {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    white-space: nowrap;
}

.cart-item-remove {
    display: block;
    font-size: 0.7rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    margin-top: 4px;
    font-family: 'Inter', sans-serif;
    transition: color 0.2s;
}

.cart-item-remove:hover { color: #000; }

/* Kurv footer */
.cart-footer {
    border-top: 1px solid #eee;
    padding: 25px 35px 35px;
}

.cart-shipping-note {
    font-size: 0.8rem;
    color: #2d6a4f;
    text-align: center;
    margin-bottom: 15px;
    font-family: 'Inter', sans-serif;
    min-height: 20px;
}

.cart-totals {
    margin-bottom: 20px;
}

.cart-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    color: #666;
    padding: 6px 0;
    font-family: 'Inter', sans-serif;
}

.cart-total-row {
    font-size: 1rem;
    color: #000;
    font-weight: 500;
    border-top: 1px solid #eee;
    padding-top: 12px;
    margin-top: 5px;
}

.cart-checkout-btn {
    display: block;
    text-align: center;
    margin-bottom: 12px;
}

.cart-continue {
    background: none;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    cursor: pointer;
    width: 100%;
    transition: color 0.2s;
}

.cart-continue:hover { color: #000; }

/* --- Produkt modal polish --- */
.modal-gallery {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-main-image {
    padding: 10px;
}

.modal-main-image img {
    aspect-ratio: 3/4;
    object-fit: cover;
    transition: opacity 0.15s ease;
}

.modal-thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px;
}

.modal-thumb {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    padding: 3px;
    border: 1px solid #e0e0e0;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease;
    display: block;
}

.modal-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal-thumb:hover {
    border-color: #999;
}

.modal-thumb.active {
    border-color: #000;
}

.modal-category {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #aaa;
    display: block;
    margin-bottom: 12px;
}

.modal-product-info h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.modal-desc {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 25px;
}

.modal-price {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: #000;
    margin-bottom: 20px;
}

.stock-warning {
    font-size: 0.82rem;
    color: #b84c2e;
    margin-bottom: 15px;
    font-family: 'Inter', sans-serif;
}

.modal-add-btn {
    margin-bottom: 15px;
}

.modal-shipping-note {
    font-size: 0.8rem;
    color: #aaa;
    text-align: center;
    font-family: 'Inter', sans-serif;
    margin-top: 5px;
}

/* --- Checkout knap feedback --- */
@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.05); }
}

.cart-trigger.bounce {
    animation: bounce 0.3s ease;
}

/* --- Responsivt --- */
@media (max-width: 800px) {
    .shop-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 20px; }
    .cart-sidebar { width: 100%; right: -100%; }
    .price-and-btn { flex-direction: column; align-items: flex-start; gap: 12px; }
    .modal-thumbnails { gap: 6px; }
    .modal-thumb { width: 52px; height: 52px; }
}

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

/* Udsolgt knap */
.soldout-btn {
    background: none;
    border: 1px solid #ddd;
    color: #bbb;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 9px 16px;
    cursor: not-allowed;
}
