/* =========================
   MERCH PAGE STYLES
========================= */

/* Hero Section */
.merch-hero {
    padding: 190px 60px 60px;
    text-align: center;
}

.merch-hero .page-title {
    color: #000000;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.merch-hero .page-subtitle {
    color: rgba(0, 0, 0, 0.8);
    font-size: 1.2rem;
}

/* Category Tabs Section */
.category-tabs-section {
    background: #fdf8f3;
    padding: 20px 60px;
}

.category-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 25px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    border-color: #d52c2c;
    color: #d52c2c;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: #d52c2c;
    border-color: #d52c2c;
    color: #fff;
}

/* Merch Section */
.merch-section {
    padding: 60px 20px;
    background: #fdf8f3;
}

.merch-section .container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* FIX: hardcode 3 kolom di desktop */
    gap: 30px;
}

/* Merch Card - Neobrutalism Design */
.merch-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 3px solid #000;
    box-shadow: 8px 8px 0 #000;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.merch-card:hover {
    transform: scale(1) translate(-4px, -4px);
    box-shadow: 12px 12px 0 #000;
    z-index: 10;
    background: #d52c2c;
}

/* Hover state - change all text to white */
.merch-card:hover .merch-card-content {
    background: #d52c2c;
    color: #fff;
}

.merch-card:hover .merch-card-content h3 {
    color: #fff;
}

.merch-card:hover .merch-price {
    color: #fff !important;
}

.merch-card:hover .merch-card-excerpt {
    color: #fff !important;
}

/* Card Image */
.merch-card-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.merch-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.merch-card:hover .merch-card-image img {
    transform: scale(1.05);
}

/* Cover Placeholder */
.merch-cover-placeholder {
    background: linear-gradient(135deg, #d52c2c 0%, #1a1a2e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 64px;
}

/* Category Badge */
.merch-card-category {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 3;
    display: inline-block;
    background: #d52c2c;
    color: #fff;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
}

/* Stock Badges */
.merch-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 3;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
}

.merch-badge.sold-out {
    background: #dc3545;
    color: #fff;
}

.merch-badge.low-stock {
    background: #ffc107;
    color: #000;
}

/* Card Content */
.merch-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    border-top: 3px solid #000;
    transition: all 0.3s ease;
}

.merch-card-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.3;
    transition: color 0.3s ease;
}

/* Merch Price */
.merch-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #d52c2c;
    margin: 10px 0;
    transition: color 0.3s ease;
}

.merch-card-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
    transition: color 0.3s ease;
}

/* Merch Buttons */
.merch-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 15px;
}

.merch-buttons .btn-outline {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 18px;
    border: 3px solid #000;
    color: #fff;
    background: #d52c2c;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 4px 4px 0 #000;
    transition: all 0.2s ease;
}

.merch-buttons .btn-outline:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #000;
}

.merch-buttons .btn-outline:active {
    transform: translate(2px, 2px);
}

/* When card is hovered */
.merch-card:hover .merch-buttons .btn-outline {
    background: #000;
    color: #fff;
}

.merch-card:hover .merch-buttons .btn-outline:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #fff;
}

.merch-card:hover .merch-buttons .btn-outline:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #fff;
    border-color: #fff;
}

/* WhatsApp Button */
.btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 3px solid #000;
    background: #25d366;
    color: #fff;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 4px 4px 0 #000;
    transition: all 0.2s ease;
    text-decoration: none;
    flex-shrink: 0;
}

.btn-whatsapp:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #000;
}

.btn-whatsapp:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #000;
}

.btn-whatsapp.disabled {
    background: #ccc;
    cursor: not-allowed;
    pointer-events: none;
}

/* When card is hovered */
.merch-card:hover .btn-whatsapp {
    background: #000;
}

.merch-card:hover .btn-whatsapp:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #fff;
}

.merch-card:hover .btn-whatsapp:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #fff;
    border-color: #fff;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.empty-state i {
    font-size: 5rem;
    margin-bottom: 20px;
    color: #ddd;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 10px;
}

/* =========================
   DETAIL PAGE
========================= */

.merch-detail-page {
    padding: 30px 0 60px;
    background: #fdf8f3;
}

.merch-detail-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #888;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #d52c2c;
}

.breadcrumb span {
    color: #ccc;
}

.breadcrumb .current {
    color: #333;
    font-weight: 500;
}

/* Product Detail Grid */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
}

/* Product Gallery */
.product-gallery {
    position: sticky;
    top: 100px;
}

.main-image {
    background: #fff;
    border: 3px solid #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 8px 8px 0 #000;
    margin-bottom: 15px;
}

.main-image img {
    width: 100%;
    height: auto;
    display: block;
}

.main-image .no-image {
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #ccc;
    font-size: 4rem;
}

/* Thumbnail List */
.thumbnail-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 0;
}

.thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid #ddd;
    transition: all 0.3s ease;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: #d52c2c;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Info Detail */
.product-info-detail {
    padding: 20px 0;
}

.product-category {
    display: inline-block;
    background: #f0f0f0;
    color: #666;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.product-title {
    font-size: 2rem;
    color: #222;
    font-weight: 700;
    margin-bottom: 25px;
    line-height: 1.3;
}

.product-price-box {
    background: linear-gradient(135deg, #fff5f5 0%, #d52c2c 70%);
    padding: 20px 25px;
    border: 3px solid #000;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.price-label {
    color: #888;
    font-size: 0.9rem;
}

.price-value {
    font-size: 2rem;
    color: #d52c2c;
    font-weight: 800;
}

/* Product Stock */
.product-stock {
    margin-bottom: 25px;
}

.stock-available {
    color: #28a745;
    font-weight: 600;
    font-size: 1rem;
}

.stock-available i {
    margin-right: 5px;
}

.stock-empty {
    color: #dc3545;
    font-weight: 600;
    font-size: 1rem;
}

.stock-empty i {
    margin-right: 5px;
}

/* Product Description */
.product-description {
    margin-bottom: 30px;
}

.product-description h3 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.description-content {
    line-height: 1.8;
    color: #555;
}

/* Product Actions */
.product-actions {
    margin-bottom: 15px;
}

.btn-order {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 18px 30px;
    background: #25d366;
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    border: 3px solid #000;
    font-size: 1.1rem;
    font-weight: 700;
    box-shadow: 6px 6px 0 #000;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-order:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 #000;
}

.btn-order:active {
    transform: translate(2px, 2px);
    box-shadow: 4px 4px 0 #000;
}

.btn-order.disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-order.disabled:hover {
    transform: none;
    box-shadow: 6px 6px 0 #000;
}

.btn-order i {
    font-size: 1.3rem;
}

.order-info {
    margin-top: 15px;
    text-align: center;
}

.order-info p {
    color: #888;
    font-size: 0.9rem;
}

.order-info i {
    margin-right: 5px;
}

/* Related Products */
.related-products {
    padding-top: 40px;
    border-top: 2px solid #eee;
}

.related-products h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.products-grid-related {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
}

.product-card-related {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 3px solid #000;
    box-shadow: 6px 6px 0 #000;
    text-decoration: none;
    transition: all 0.3s;
}

.product-card-related:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 #000;
}

.product-image-related {
    height: 180px;
    background: #f8f9fa;
}

.product-image-related img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image-related .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 3rem;
}

.product-info-related {
    padding: 15px;
    border-top: 3px solid #000;
}

.product-name-related {
    font-size: 1rem;
    color: #333;
    margin-bottom: 8px;
    font-weight: 600;
}

.product-price-related {
    color: #d52c2c;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Toast Notification */
.toast-container {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: #333;
    color: #fff;
    padding: 15px 25px;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

.toast.success {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
}

.toast.error {
    background: linear-gradient(135deg, #d52c2c 0%, #a01e1e 100%);
}

.toast i {
    font-size: 1.2rem;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 992px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .product-gallery {
        position: static;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr); /* FIX: 2 kolom di tablet */
    }
}

@media (max-width: 768px) {
    .merch-hero {
        padding: 60px 20px 40px;
    }

    .merch-hero .page-title {
        font-size: 2rem;
    }

    .category-tabs-section {
        padding: 15px 20px;
    }

    .category-tabs {
        gap: 8px;
    }

    .tab-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr); /* FIX: tetap 2 kolom di mobile besar */
        gap: 15px;
    }

    .merch-card-content h3 {
        font-size: 1rem;
    }

    .merch-price {
        font-size: 1.1rem;
    }

    .product-title {
        font-size: 1.5rem;
    }

    .price-value {
        font-size: 1.5rem;
    }

    .merch-buttons {
        flex-direction: column;
    }

    .merch-buttons .btn-outline {
        width: 100%;
    }

    .btn-whatsapp {
        width: 100%;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr; /* FIX: 1 kolom di HP kecil saja */
        gap: 15px;
    }

    .merch-section {
        padding: 40px 15px;
    }
}

/* =========================
   ACCESSIBILITY
========================= */

.btn-outline:focus,
.btn-whatsapp:focus,
.btn-order:focus,
.tab-btn:focus {
    outline: 3px solid rgba(213, 44, 44, 0.4);
    outline-offset: 2px;
}