/* Merch Table Component Styles */

/* Main Merch Table Container */
.merch-table {
    width: 90%;
    margin-left: 55px;
    margin-right: 20px;
    margin-bottom: 10px;
    max-height: 300px;
    background-image: url("https://soulpeddler.de/wp-content/uploads/fan-table.jpg");
    background-color: #654321;
    border: 2px solid rgba(205, 175, 149, 0.3);
    border-radius: 12px;
    padding: 10px 0px 10px 0px;
    position: relative;
    overflow: hidden;
    box-shadow:
        inset 0 2px 10px rgba(0, 0, 0, 0.3),
        0 5px 20px rgba(0, 0, 0, 0.4);
    margin-top: 20px;
}

.merch-table-title {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: -23px;
    text-align: center;
    margin-top: -7px;
}

/* Texture overlay */
.merch-table::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        repeating-linear-gradient(
            0deg,
            transparent 0px,
            rgba(205, 175, 149, 0.03) 1px,
            transparent 2px
        ),
        repeating-linear-gradient(
            90deg,
            transparent 0px,
            rgba(205, 175, 149, 0.03) 1px,
            transparent 2px
        );
    pointer-events: none;
}

/* Items Container */
.merch-table-items {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
    padding: 20px;
    flex-direction: row;
    flex-wrap: nowrap;
}

/* Individual Fan Item */
.merch-item {
    flex: 0 0 auto;
    width: 100px;
    height: 175px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.merch-item:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border-color: rgba(205, 175, 149, 0.6);
}

/* Product Image Placeholder */
.merch-item-image {
    width: 100%;
    height: 70%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: transparent;
}

.merch-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.merch-item-product-image {
    width: 100% !important;
}

.merch-item[data-product-type] .merch-item-image {
    background-image: none !important;
}

/* Product Type Icons */
.product-icon {
    width: 60px;
    height: 60px;
    background: rgba(205, 175, 149, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #cdaf95;
}

.cd-icon::before {
    content: "💿";
}
.lp-icon::before {
    content: "🎵";
}
.sticker-set-icon::before {
    content: "⭐";
}
.ticket-icon::before {
    content: "🎟️";
}
.box-set-icon::before {
    content: "📦";
}
.download-icon::before {
    content: "⬇️";
}

/* Product Info */
.merch-item-info {
    height: 37%;
    padding: 4px;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    border-radius: 8px;
}

.merch-item-title {
    font-size: 10px;
    font-weight: bold;
    color: #cdaf95;
    margin: 0 0 2px 0;
    line-height: 1.2;
}

.merch-item-price {
    font-size: 12px;
    color: #fff;
    font-weight: bold;
    margin: 0;
}

/* Hover Overlay */
.merch-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(205, 175, 149, 0.9),
        rgba(139, 115, 85, 0.9)
    );
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: center;
    padding: 15px;
}

.merch-item:hover .merch-item-overlay {
    opacity: 1;
}

.overlay-title {
    font-size: x-small;
    font-weight: bold;
    color: #000;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.overlay-price {
    font-size: 16px;
    font-weight: bold;
    color: #000;
    margin: 0 0 10px 0;
}

.overlay-button {
    background: #000;
    color: #cdaf95;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    display: inline-block;
}

.overlay-button:hover {
    background: #333;
    transform: scale(1.05);
    color: #cdaf95;
    text-decoration: none;
}

.overlay-button.added {
    background: #28a745;
    color: #fff;
}

.overlay-button.error {
    background: #dc3545;
    color: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .merch-table {
        width: 100%;
        margin: 0 auto;
        padding: 15px;
        max-height: fit-content;
    }

    .merch-item {
        width: 120px;
        height: 156px;
    }

    .product-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .merch-item-title {
        font-size: 10px;
    }

    .merch-item-price {
        font-size: 11px;
    }

    .merch-item-overlay-link {
        display: none;
    }
}

@media (max-width: 480px) {
    .merch-table-items {
        flex-wrap: wrap;
        height: auto;
        min-height: calc(100% - 60px);
    }

    .merch-item {
        width: 100px;
        height: 156px;
    }

    .overlay-title {
        font-size: 11px;
    }

    .overlay-price {
        font-size: 14px;
    }

    .overlay-button {
        padding: 4px 8px;
        font-size: 10px;
    }
}
