/* Product Page Styles */
/* Existing styles from products.php */
.swal2-popup {
    animation: fadeIn 0.5s ease-in-out;
}

.swal2-backdrop-show {
    animation: fadeIn 0.4s ease-in-out;
}

/* Sweetalert Custom Styling */
.swal2-popup {
    border-radius: 25px !important;
    background: rgba(9, 16, 27, 0.55) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 2em !important;
}

.swal2-title {
    color: #fff !important;
    font-size: 24px !important;
    font-weight: 600 !important;
    margin-bottom: 0.5em !important;
}

.swal2-html-container {
    color: #ccc !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
    margin-top: 0 !important;
}

.swal2-icon {
    border-color: rgba(255, 255, 255, 0.3) !important;
    margin: 1.5em auto !important;
}

.swal2-confirm {
    border-radius: 50px !important;
    padding: 12px 30px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 3px 16px rgba(211, 51, 51, 0.3) !important;
}

.swal2-cancel {
    border-radius: 50px !important;
    padding: 12px 30px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.swal2-cancel:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

.swal2-actions {
    margin-top: 2em !important;
}

/* Animation */
.swal2-show {
    animation: swal2-show 0.3s ease-out !important;
}

.swal2-hide {
    animation: swal2-hide 0.3s ease-in !important;
}

@keyframes swal2-show {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes swal2-hide {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0.9);
        opacity: 0;
    }
}

.swal2-hide {
    animation: fadeOut 0.5s ease-in-out !important;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

.animate__customFadeIn {
    animation: modalFadeIn 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate__customFadeOut {
    animation: modalFadeOut 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate__slower {
    animation-duration: 0.8s !important;
}

.animate__slow {
    animation-duration: 0.6s !important;
}

.animate__medium {
    animation-duration: 0.5s !important;
}

/* Product Specification Styling */
.product-description {
    margin: 15px 0;
}

.spec-item {
    display: flex;
    align-items: center;
    margin: 8px 0;
    color: #fff;
    font-size: 14px;
}

.spec-item i {
    width: 20px;
    margin-right: 10px;
    color: #47b2e4;
}

.swal2-html-container {
    margin: 0 !important;
    padding: 15px 0 !important;
    opacity: 1;
    transition: opacity 0.5s ease;
}

/* Modal Specification Styling */
.modal-specs-container {
    background: rgba(71, 178, 228, 0.05);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(71, 178, 228, 0.1);
}

.modal-spec-item {
    display: flex;
    align-items: center;
    margin: 10px 0;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s ease;
}

.modal-spec-item:hover {
    transform: translateX(5px);
}

.modal-spec-item i {
    width: 24px;
    margin-right: 12px;
    color: #47b2e4;
    font-size: 16px;
}

/* Paket Selection Styling - Flexible Grid Layout */
.paket-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin: 20px 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.paket-btn {
    background: rgba(71, 178, 228, 0.15);
    border: 2px solid rgba(71, 178, 228, 0.3);
    color: #47b2e4;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.3;
    white-space: normal;
    max-width: 100%;
    position: relative;
    overflow: hidden;
}

/* Button dengan teks panjang (lebih dari 15 karakter) menggunakan lebar penuh */
.paket-btn.long-text {
    grid-column: 1 / -1;
}

/* Untuk teks yang sangat panjang, tambahkan tooltip */
.paket-btn[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
    opacity: 0;
    animation: fadeInTooltip 0.3s ease forwards;
}

@keyframes fadeInTooltip {
    to {
        opacity: 1;
    }
}

.paket-btn:hover {
    background: rgba(71, 178, 228, 0.25);
    border-color: #47b2e4;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(71, 178, 228, 0.2);
}

.paket-btn.active {
    background: linear-gradient(135deg, #47b2e4, #369bd4);
    border-color: #47b2e4;
    color: #fff;
    box-shadow: 0 5px 20px rgba(71, 178, 228, 0.4);
}

.paket-btn.paket-disabled {
    background: #ff4c4c !important;
    border-color: #ff4c4c !important;
    color: #fff !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
    pointer-events: none;
}

.paket-btn.paket-disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Responsive Design for Paket Selection */
@media (max-width: 768px) {
    .paket-selection {
        max-width: 100%;
        gap: 10px;
        margin: 15px 0;
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
    
    .paket-btn {
        padding: 10px 15px;
        font-size: 13px;
        min-height: 40px;
        line-height: 1.2;
    }
}

@media (max-width: 480px) {
    .paket-selection {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .paket-btn {
        padding: 10px 15px;
        font-size: 12px;
        min-height: auto;
        line-height: 1.2;
        border-radius: 15px;
    }
    
    /* Tombol dengan teks panjang tetap menggunakan lebar penuh di mobile */
    .paket-btn.long-text {
        grid-column: 1 / -1;
    }
}

/* Modal Order Button Styling */
.modal-order-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 35px;
    background: #25D366;
    color: #fff;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid #25D366;
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

.modal-order-button:hover {
    background: #128C7E;
    color: #fff;
    border-color: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

.modal-order-button i {
    margin-right: 8px;
    font-size: 20px;
}

/* Modal Share Button Styling */
.modal-share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    background: linear-gradient(45deg, #47b2e4, #6ec9ff);
    border: none;
    color: white;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(71, 178, 228, 0.3);
}

.modal-share-button:hover {
    background: linear-gradient(45deg, #369bd4, #47b2e4);
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 5px 15px rgba(71, 178, 228, 0.5);
    color: white;
}

.modal-share-button:active {
    transform: translateY(0) scale(1.05);
    box-shadow: 0 2px 8px rgba(71, 178, 228, 0.3);
}

.modal-share-button i {
    margin-right: 6px;
    font-size: 14px;
}

/* Style khusus untuk tombol share di pojok kanan bawah */
.modal-share-button[style*="position: absolute"] {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    position: fixed !important;
    bottom: 10px !important;
    right: 10px !important;
    z-index: 10001 !important;
}

.modal-share-button[style*="position: absolute"]:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 15px rgba(71, 178, 228, 0.6);
}

.modal-share-button[style*="position: absolute"]:active {
    transform: scale(1.1);
}

/* Pastikan shareButton tidak mengganggu konten modal */
.product-detail-modal {
    padding-bottom: 60px;
}

/* Responsive untuk mobile */
@media (max-width: 768px) {
    .modal-share-button[style*="position: absolute"] {
        bottom: 5px !important;
        right: 5px !important;
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .product-detail-modal {
        padding-bottom: 50px;
    }
}

/* Category Filter Styling */
.category-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.category-btn {
    padding: 8px 20px;
    border: 2px solid #47b2e4;
    background: transparent;
    color: #47b2e4;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover {
    background: rgba(71, 178, 228, 0.1);
    transform: translateY(-2px);
}

.category-btn.active {
    background: #47b2e4;
    color: #fff;
}

.product-item {
    transition: all 0.4s ease-in-out;
    opacity: 1;
    transform: translateY(0);
}

.product-item.hide {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    pointer-events: none;
    position: absolute;
    left: -9999px;
}

/* Product Image Slideshow */
.product-image-slideshow {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.product-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.product-slide.active {
    opacity: 1;
}

/* Modal Image Slider */
.product-modal-slider {
    position: relative;
    width: 100%;
    height: 250px;  /* Ukuran tetap */
    overflow: hidden;
    border-radius: 10px;
}

.slider-nav {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.slider-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.slider-prev {
    left: 10px;
}

.slider-next {
    right: 10px;
}

.modal-image {
    width: 100%;
    height: 250px;  /* Ukuran tetap */
    object-fit: cover;  /* Memastikan gambar terlihat penuh tanpa merubah aspek rasio */
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.modal-image:hover {
    transform: scale(1.02);
}

/* Product Card Styling */
.product-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* Image Container Styles */
.product-image-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 10px;
    margin: 15px 0;
    position: relative;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-image:hover {
    transform: scale(1.05);
}

/* Product Overlay Styles */
.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgb(0 0 0 / 72%) 0%, rgb(0 0 0 / 59%) 100%);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    opacity: 1;
    transition: all 0.3s ease;
}

.product-overlay:hover {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.8) 100%);
}

.overlay-text {
    background: linear-gradient(45deg, #3b82f6, #60a5fa, #93c5fd, #dbeafe, #bfdbfe, #93c5fd, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 27px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-family: 'Poppins', sans-serif;
    text-align: center;
    z-index: 2;
    filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.8)) drop-shadow(0 0 30px rgba(147, 197, 253, 0.6));
    opacity: 1;
}

/* Fallback for browsers that don't support background-clip: text */
@supports not (-webkit-background-clip: text) {
    .overlay-text {
        color: #60a5fa;
        background: none;
        -webkit-text-fill-color: initial;
        animation: colorShift 3s ease-in-out infinite;
        text-shadow: 0 0 10px rgba(59, 130, 246, 0.8), 0 0 20px rgba(147, 197, 253, 0.6);
    }
    
    @keyframes colorShift {
        0% { color: #3b82f6; text-shadow: 0 0 10px rgba(59, 130, 246, 0.8); }
        25% { color: #60a5fa; text-shadow: 0 0 15px rgba(96, 165, 250, 0.9); }
        50% { color: #93c5fd; text-shadow: 0 0 20px rgba(147, 197, 253, 1); }
        75% { color: #dbeafe; text-shadow: 0 0 25px rgba(219, 234, 254, 1); }
        100% { color: #3b82f6; text-shadow: 0 0 10px rgba(59, 130, 246, 0.8); }
    }
}

/* Slideshow Styles */
.product-image-slideshow {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 10px;
    margin: 15px 0;
    position: relative;
}

.product-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.product-slide.active {
    opacity: 1;
}

/* Overlay for slideshow */
.product-image-slideshow .product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.8) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    opacity: 0.9;
    transition: opacity 0.3s ease;
    z-index: 3;
}

/* Product Type Badge */
.product-type {
    position: absolute;
    top: 250px;
    right: 150px;
    background: rgba(71, 178, 228, 0.1);
    color: #47b2e4;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 1;
}

/* Product Title */
.product-title {
    color: #fff;
    font-size: 20px;
    margin: 15px 0;
    font-weight: 600;
}

/* Product Description */
.product-description {
    color: #aaa;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Menghilangkan kotak pada tombol close modal */
.swal2-close {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.swal2-close:hover {
    opacity: 1;
    background: none !important;
}