/* ======== PRODUCT DETAIL PAGE STYLES ======== */

/* Modern Product Detail Layout */
.product-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Breadcrumb Styling */
.breadcrumb {
    background: transparent;
    padding: 0.5rem 0;
    margin-bottom: 2rem;
    border-radius: 0.5rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--primary-color);
    font-weight: 600;
}

.breadcrumb-item a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

.breadcrumb-item.active {
    color: var(--primary-dark);
    font-weight: 500;
}

/* Product Image Section */
.product-detail-image {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(76, 175, 80, 0.1);
    background: #fff;
    animation: fadeInUp 0.8s ease-out;
}

.product-detail-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

/* Product Info Section */
.product-detail-info {
    padding: 1rem 0;
    animation: fadeInRight 0.8s ease-out 0.2s both;
}

.product-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2e2e2e;
    margin-bottom: 1rem;
    line-height: 1.3;
    animation: slideInDown 0.6s ease-out 0.3s both;
}

/* Badge Styling */
.product-badges {
    margin-bottom: 1.5rem;
    animation: fadeIn 0.6s ease-out 0.4s both;
}

.product-badges .badge {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    margin-right: 0.5rem;
    border-radius: 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: bounceIn 0.6s ease-out;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52) !important;
    box-shadow: 0 4px 15px rgba(238, 90, 82, 0.3);
}

/* Price Section */
.product-price {
    margin-bottom: 2rem;
    animation: slideInLeft 0.6s ease-out 0.5s both;
}

.current-price {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1976d2;
    margin-right: 1rem;
}

.original-price {
    font-size: 1.2rem;
    color: var(--text-light);
    text-decoration: line-through;
    position: relative;
}

/* Stock Status */
.stock-status {
    animation: fadeInUp 0.6s ease-out 0.6s both;
}

.stock-status .badge {
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
    border-radius: 2rem;
    font-weight: 600;
}

/* Form Styling */
.form-label {
    font-weight: 600;
    color: #424242;
    margin-bottom: 0.5rem;
}

.form-select, .form-control {
    border: 2px solid #e9ecef;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
}

.form-select:focus, .form-control:focus {
    border-color: #1976d2;
    box-shadow: 0 0 0 0.2rem rgba(25, 118, 210, 0.15);
    transform: translateY(-2px);
}

/* Button Styling */
.btn {
    border-radius: 0.75rem;
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-success {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    transform: translateY(0);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.btn-outline-primary {
    border: 2px solid #1976d2;
    color: #1976d2;
    background: transparent;
}

.btn-outline-primary:hover {
    background: #1976d2;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(25, 118, 210, 0.3);
}

.btn-outline-success {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-success:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
}

/* WhatsApp Button */
.whatsapp-btn {
    background: linear-gradient(135deg, #25d366, #128c7e);
    border: none;
    box-shadow: 0 3px 12px rgba(37, 211, 102, 0.3);
}

.whatsapp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* Product Information Sections */
.product-description,
.product-highlights,
.product-how-to-use,
.product-ingredients {
    background: #fff;
    border-radius: 0.8rem;
    padding: 1.2rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    border-left: 3px solid var(--primary-color);
    animation: slideInUp 0.6s ease-out;
    font-size: 0.9rem;
}

.product-description h4 {
    color: var(--primary-dark);
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    position: relative;
}

.product-highlights h5,
.product-how-to-use h5,
.product-ingredients h5 {
    color: var(--primary-dark);
    font-weight: 600;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    position: relative;
}



.product-highlights ul {
    list-style: none;
    padding: 0;
}

.product-highlights li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0.8rem;
    color: var(--text-color);
    line-height: 1.6;
}

.product-highlights li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Related Products Section */
.related-products {
    margin-top: 3rem;
    animation: fadeInUp 0.8s ease-out;
}

.related-products .section-title {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    font-size: 1.4rem;
}

.related-products .section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

/* Related Product Cards */
.related-products .product-card {
    transition: all 0.3s ease;
    border-radius: 0.8rem;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    background: #fff;
}

.related-products .product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.12);
}

.related-products .scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding: 1rem 0;
    scrollbar-width: thin;
}

.related-products .product-card {
    min-width: 180px;
    max-width: 180px;
    flex-shrink: 0;
}

.related-products .product-image img {
    height: 120px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-products .product-card:hover .product-image img {
    transform: scale(1.05);
}

.related-products .product-title {
    font-size: 0.8rem;
    line-height: 1.2;
    margin-bottom: 0.3rem;
}

.related-products .product-price {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.related-products .btn-sm {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    }
    50% {
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.6);
    }
    100% {
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    }
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .product-detail-container {
        padding: 1.5rem 1rem;
    }
    
    .product-title {
        font-size: 1.8rem;
    }
    
    .current-price {
        font-size: 1.6rem;
    }
    
    .product-description,
    .product-highlights,
    .product-how-to-use,
    .product-ingredients {
        padding: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .product-detail-container {
        padding: 1rem 0.5rem;
    }
    
    .product-title {
        font-size: 1.6rem;
        margin-bottom: 1rem;
    }
    
    .current-price {
        font-size: 1.4rem;
    }
    
    .original-price {
        font-size: 1.2rem;
    }
    
    .product-detail-image {
        margin-bottom: 2rem;
    }
    
    .product-description,
    .product-highlights,
    .product-how-to-use,
    .product-ingredients {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .related-products .product-image img {
        height: 150px;
    }
}

@media (max-width: 575.98px) {
    .product-title {
        font-size: 1.4rem;
    }
    
    .current-price {
        font-size: 1.3rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .whatsapp-inquiry {
        text-align: center;
    }
}

/* Loading Animation for Images */
.product-detail-image img {
    opacity: 0;
    animation: imageLoad 0.8s ease-out 0.2s forwards;
}

@keyframes imageLoad {
    from {
        opacity: 0;
        transform: scale(1.1);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Smooth Scrolling for Related Products */
.related-products .row {
    scroll-behavior: smooth;
}

/* Enhanced Focus States for Accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 3px solid rgba(76, 175, 80, 0.3);
    outline-offset: 2px;
}

/* Image Zoom Modal */
.image-zoom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    animation: fadeIn 0.3s ease-out;
}

.zoom-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.zoom-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.zoomed-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease-out;
}

.zoom-close {
    position: absolute;
    top: -15px;
    right: -15px;
    background: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.zoom-close:hover {
    background: #f8f9fa;
    transform: scale(1.1);
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Quantity Controls */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0;
}

.quantity-btn {
    border-radius: 0;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    background: #fff;
    transition: all 0.3s ease;
}

.quantity-btn.decrease {
    border-top-left-radius: 0.75rem;
    border-bottom-left-radius: 0.75rem;
    border-right: none;
}

.quantity-btn.increase {
    border-top-right-radius: 0.75rem;
    border-bottom-right-radius: 0.75rem;
    border-left: none;
}

.quantity-btn:hover {
    background: #1976d2;
    color: #fff;
    border-color: #1976d2;
}

.quantity-controls .form-control {
    border-radius: 0;
    text-align: center;
    border-left: none;
    border-right: none;
    min-width: 80px;
}

.quantity-controls .form-control:focus {
    border-color: #1976d2;
    z-index: 3;
}

/* Button Success Flash Animation */
.btn-success-flash {
    animation: successFlash 0.6s ease-out;
}

@keyframes successFlash {
    0% { background: var(--primary-color); }
    50% { background: #2e7d32; transform: scale(1.05); }
    100% { background: var(--primary-color); }
}

/* Cart Count Update Animation */
.cart-count-update {
    animation: cartBounce 0.6s ease-out;
}

@keyframes cartBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Toast Notifications (Fallback) */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 1rem 1.5rem;
    max-width: 350px;
    z-index: 9998;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-success {
    border-left: 4px solid var(--success-color);
}

.toast-error {
    border-left: 4px solid var(--danger-color);
}

.toast-content strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--primary-dark);
}

.toast-content p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Smooth Transitions for Dynamic Content */
#variant-price,
#variant-stock-status {
    transition: opacity 0.3s ease;
}

/* Loading States */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Share Button Styles */
.btn-share {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #1976d2;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 10;
}

.btn-share:hover {
    background: #1976d2;
    color: white;
    transform: scale(1.1);
}

.btn-share-small {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #1976d2;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 10;
}

.btn-share-small:hover {
    background: #1976d2;
    color: white;
    transform: scale(1.1);
}

/* Full Width Related Products */
.related-products-full-width {
    background: #f8f9fa;
    padding: 3rem 0;
    margin-top: 3rem;
}

.related-products-full-width .scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding: 1rem 2rem;
    scrollbar-width: thin;
}

.related-products-full-width .product-card {
    min-width: 220px;
    max-width: 220px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 0.8rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.related-products-full-width .product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.related-products-full-width .product-image {
    position: relative;
    border-radius: 0.8rem 0.8rem 0 0;
    overflow: hidden;
}

.related-products-full-width .product-image img {
    height: 180px;
    width: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-products-full-width .product-card:hover .product-image img {
    transform: scale(1.05);
}

.related-products-full-width .placeholder-img {
    height: 180px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 0.9rem;
}

.related-products-full-width .product-info {
    padding: 1rem;
}

.related-products-full-width .product-title {
    font-size: 0.9rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.related-products-full-width .product-title a {
    color: #333;
    text-decoration: none;
}

.related-products-full-width .product-title a:hover {
    color: #1976d2;
}

.related-products-full-width .product-price {
    font-size: 0.85rem;
}

.related-products-full-width .current-price {
    color: #1976d2;
    font-weight: 600;
}

.related-products-full-width .original-price {
    color: #999;
    text-decoration: line-through;
    margin-left: 0.5rem;
    font-size: 0.8rem;
}

.related-products-full-width .product-badges {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
}

.related-products-full-width .badge {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
}

/* Mobile Responsive Styles */
@media (max-width: 991.98px) {
    .product-detail-container {
        padding: 1rem;
    }
    
    .product-title {
        font-size: 1.5rem;
    }
    
    .current-price {
        font-size: 1.4rem;
    }
    
    .product-detail-image img {
        height: 400px;
    }
}

@media (max-width: 767.98px) {
    .product-detail-container {
        padding: 0.5rem;
    }
    
    .breadcrumb {
        font-size: 0.8rem;
        padding: 0.5rem 0;
    }
    
    .product-title {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }
    
    .current-price {
        font-size: 1.2rem;
    }
    
    .original-price {
        font-size: 1rem;
    }
    
    .product-detail-image {
        margin-bottom: 1.5rem;
    }
    
    .product-detail-image img {
        height: 300px;
    }
    
    .product-badges .badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
    
    .form-label {
        font-size: 0.9rem;
    }
    
    .form-select, .form-control {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        width: auto;
        max-width: 120px;
        margin-bottom: 0.5rem;
    }
    
    .whatsapp-inquiry .btn {
        max-width: 100px;
        padding: 0.4rem 0.6rem;
    }
    
    .stock-status {
        margin-bottom: 1rem;
    }
    
    .whatsapp-inquiry {
        margin-top: 1rem;
        text-align: center;
    }
    
    .product-description,
    .product-highlights,
    .product-how-to-use,
    .product-ingredients {
        padding: 0.8rem;
        margin-bottom: 1rem;
        font-size: 0.9rem;
    }
    
    .product-description h4,
    .product-highlights h4,
    .product-how-to-use h4,
    .product-ingredients h4 {
        font-size: 1.1rem;
    }
    
    .row .col-md-8, .row .col-md-4 {
        margin-bottom: 1rem;
    }
    
    .related-products-full-width {
        padding: 2rem 0;
    }
    
    .related-products-full-width .section-title {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }
    
    .related-products-full-width .scroll-container {
        padding: 1rem;
        gap: 1rem;
    }
    
    .related-products-full-width .product-card {
        min-width: 160px;
        max-width: 160px;
    }
    
    .related-products-full-width .product-image img {
        height: 120px;
    }
    
    .zoom-backdrop {
        padding: 1rem;
    }
    
    .zoom-close {
        top: -10px;
        right: -10px;
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
    
    .quantity-btn {
        padding: 0.6rem 0.8rem;
    }
    
    .toast-notification {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .toast-notification.show {
        transform: translateY(0);
    }
}