
:root {
    --primary-color: #2F353F;
    --secondary-color: #EA4E2D;
    --text-color: #333333;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --transition-base: all 0.3s ease;
}



.btn-back {
    color: var(--gray-700);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition-base);
}

.btn-back:hover {
    background-color: var(--gray-200);
    color: var(--primary-color);
}


.input-group {
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    overflow: hidden;
}

.input-group-text {
    background-color: white;
    border: none;
    color: var(--gray-600);
    padding-left: 1rem;
}

.input-group .form-control {
    border: none;
    padding: 0.75rem 1rem;
}

.input-group .form-control:focus {
    box-shadow: none;
}

.action-btn {
    height: 48px;
    padding: 0.55rem 1rem;
    border-radius: 10px;
    font-weight: 600;
}

.action-search .input-group-text,
.action-search .form-control {
    height: 48px;
}


.carousel,
.carousel-inner,
.carousel-item {
    aspect-ratio: 1/1;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-item {
    min-height: 0;
    height: auto;
}

.main-image {
    width: 100%;
    height: 100%;
    aspect-ratio: 1/1;
    object-fit: contain;
    background-color: white;

    max-width: 100%;
    max-height: 100%;
    margin: 0 auto;
    display: block;
}

.carousel-control-prev,
.carousel-control-next {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 1rem;
}


.thumbnails-container {
    background: white;
    padding: 0.75rem;
    border-radius: 12px;
    margin-top: 1rem;
    box-shadow: var(--shadow-sm);
    width: 100%;
    overflow: hidden;
}

.thumbnails-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) transparent;
}
.thumbnails-scroll::-webkit-scrollbar {
    height: 6px;
}
.thumbnails-scroll::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 8px;
}
.thumbnails-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.thumbnail {
    border-radius: 8px;
    border: 2px solid transparent;
    transition: var(--transition-base);
    background: white;
    padding: 0.25rem;
    width: 80px;
    height: 80px;
    flex: 0 0 auto;
    object-fit: cover;
}

.thumbnail:hover {
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

.thumbnail.active {
    border-color: var(--secondary-color);
}


.product-info {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.product-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.product-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.product-meta {
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--gray-700);
}

.meta-label {
    font-weight: 600;
    min-width: 100px;
}

.stock-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.stock-status.in-stock {
    background-color: #d1fae5;
    color: #065f46;
}

.stock-status.out-of-stock {
    background-color: #fee2e2;
    color: #991b1b;
}


.description {
    color: var(--gray-700);
    line-height: 1.8;
    position: relative;
    overflow: hidden;
    transition: var(--transition-base);
}

.description.collapsed {
    max-height: var(--desc-collapsed-height, 324px);
}

.toggle-text {
    display: inline-block;
    color: var(--secondary-color);
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: var(--transition-base);
}

.toggle-text:hover {
    color: var(--primary-color);
}


.floating-wa {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: #25D366;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
    z-index: 1000;
}

.floating-wa:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.floating-wa i {
    font-size: 1.25rem;
}


@media (max-width: 991px) {
    .product-info {
        margin-top: 1.5rem;
    }
}

@media (max-width: 768px) {
    .product-title {
        font-size: 1.5rem;
    }

    .product-price {
        font-size: 1.75rem;
    }

    .product-info {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {

    .floating-wa {
        bottom: 1rem;
        right: 1rem;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .carousel,
    .carousel-inner,
    .carousel-item,
    .main-image {
        max-width: 250px;
        max-height: 250px;
    }

    .thumbnail {
        width: 64px;
        height: 64px;
    }

    .thumbnails-container {
        padding: 0.5rem 0.25rem;
    }
}


.btn-custom-whatsapp {
    background-color: var(--secondary-color);
    color: #fff;
    border-color: var(--secondary-color);
    border-radius: 10px;
    padding: 0.55rem 1.4rem;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(234, 78, 45, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn-custom-whatsapp:hover,
.btn-custom-whatsapp:focus {
    background-color: #c53e24;
    border-color: #c53e24;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(234, 78, 45, 0.3);
    color: #fff;
}

.btn-custom-whatsapp:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(234, 78, 45, 0.25);
}


.fade-image {
    transition: opacity 0.4s cubic-bezier(0.4,0,0.2,1);
    opacity: 1;
}
.fade-image.fade-out {
    opacity: 0;
}


.product-image-preview:hover .gallery-nav-btn {
    opacity: 1;
    pointer-events: auto;
}
.gallery-nav-btn {
    opacity: 0.7;
    pointer-events: auto;
    background: rgba(30,30,30,0.12);
    border: none;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    z-index: 2;
    transition: background 0.2s, box-shadow 0.2s, opacity 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.product-image-preview:hover .gallery-nav-btn,
.gallery-nav-btn:focus {
    opacity: 1;
}
.gallery-nav-btn:hover {
    background: rgba(234,78,45,0.7);
    color: #fff;
    opacity: 1;
}
.gallery-nav-btn.left { left: 10px; }
.gallery-nav-btn.right { right: 10px; }


.slide-image {
    position: absolute;
    left: 0; top: 0; right: 0; bottom: 0;
    width: 100%; height: 100%;
    opacity: 1;
    transition: transform 0.45s cubic-bezier(0.4,0,0.2,1), opacity 0.3s, filter 0.3s;
    z-index: 1;
    filter: blur(0px) scale(1);
}
.slide-image.slide-out-left,
.slide-image.slide-out-right {
    opacity: 0;
    filter: blur(4px) scale(0.98);
}
.slide-image.slide-in-left,
.slide-image.slide-in-right {
    opacity: 1;
    filter: blur(4px) scale(1.04);
    z-index: 2;
}
.slide-image.active {
    transform: translateX(0);
    opacity: 1;
    z-index: 3;
    filter: blur(0px) scale(1.04);
    box-shadow: 0 8px 32px rgba(30,30,30,0.10);
    animation: zoomInActive 0.4s cubic-bezier(0.4,0,0.2,1);
}
@keyframes zoomInActive {
    0% { filter: blur(4px) scale(0.98); }
    100% { filter: blur(0px) scale(1.04); }
}

.product-image-preview {
    position: relative;
    width: 100%;
    max-width: 420px;
    height: 400px;
    margin: 0 auto 1.5rem auto;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
@media (min-width: 992px) {
    .product-image-preview {
        max-width: 420px !important;
        height: 420px;
    }
    .product-image-preview .main-image {
        max-width: 420px !important;
        max-height: 420px !important;
    }
}
@media (max-width: 576px) {
    .product-image-preview {
        max-width: 250px;
        height: 250px;
    }
}
