/* assets/css/product_detail.css */

.product-detail-page {
    background-color: #fdfdfd;
}

.prod-top {
    padding-top: 120px;
    /* Space for fixed header */
}

/* Grid Layout */
.prod-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.prod-grid > * {
    min-width: 0;
}

@media (max-width: 900px) {
    .prod-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .prod-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .prod-rating {
        justify-content: center;
        width: 100%;
    }
    .prod-desc, .prod-features {
        text-align: center;
        width: 100%;
    }
}

/* Gallery */
.prod-gallery {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

@media (max-width: 900px) {
    .prod-gallery {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .prod-gallery {
        max-width: 100%;
        margin: 0 auto;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .prod-gallery {
        max-width: 100%;
        margin: 0 auto;
        width: 100%;
    }
}

.splide__slide-img-wrap {
    position: relative;
    width: 100%;
    height: 520px;
    overflow: hidden;
    border-radius: 16px;
    background: transparent;
}

@media (max-width: 900px) {
    .splide__slide-img-wrap {
        height: 350px;
    }
}

.splide__slide-img-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: transparent;
    border-radius: 16px;
}

/* Fix Splide arrows causing horizontal scroll */
.splide__arrow--prev {
    left: 10px !important;
}
.splide__arrow--next {
    right: 10px !important;
}

.zoom-hint {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.splide__slide-img-wrap:hover .zoom-hint {
    opacity: 1;
}

.no-img-placeholder {
    width: 100%;
    padding-top: 100%;
    background: linear-gradient(135deg, #f0f0f0, #e8e8e8);
    border-radius: 12px;
}

/* Thumbs */
.prod-thumbs .splide__slide {
    opacity: 0.5;
    border: 2px solid transparent;
    transition: all 0.3s;
    border-radius: 8px;
    overflow: hidden;
    height: 80px;
}

.prod-thumbs .splide__slide.is-active {
    opacity: 1;
    border-color: #2D5A27;
}

.prod-thumbs .splide__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hide arrows on thumbnails to prevent them sitting far apart */
.prod-thumbs .splide__arrows {
    display: none;
}

/* Info */
.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.badge--own {
    background: rgba(45, 90, 39, 0.1);
    color: #2D5A27;
}

.badge--partner {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
}

/* Order Button */
.btn-order {
    background-color: #2D5A27;
    color: #fff;
    padding: 16px 40px;
    border-radius: 12px;
    font-weight: 800;
    letter-spacing: .1em;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
}

.btn-order::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 ease;
}

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

/* Modal specific tweaks */
.modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    /* Higher than header */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    padding: 20px;
}

.modal.is-open {
    opacity: 1;
    visibility: visible;
}

.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 26, 30, 0.7);
    backdrop-filter: blur(8px);
}

.modal__content {
    transform: translateY(30px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1);
}

.modal.is-open .modal__content {
    transform: translateY(0) scale(1);
}

.modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

/* Reviews */
.btn-google {
    background: #fff;
    color: #3c4043;
    border: 1px solid #dadce0;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s, box-shadow 0.2s;
    display: inline-flex;
    align-items: center;
}

.btn-google:hover {
    background: #f8f9fa;
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.3);
}

.btn-outline {
    border: 2px solid #2D5A27;
    color: #2D5A27;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.3s;
}

.btn-outline:hover {
    background: #2D5A27;
    color: #fff;
}

/* Phone Card Styles */
.prod-contact-box {
    width: 100%;
}

.phone-link-card {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    padding: 16px 24px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;
}

.phone-link-card:hover {
    border-color: #2D5A27;
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(45, 90, 39, 0.1);
}

.phone-icon-wrap {
    width: 48px;
    height: 48px;
    background: #f0fdf4;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2D5A27;
    margin-right: 18px;
    transition: all 0.3s ease;
}

.phone-link-card:hover .phone-icon-wrap {
    background: #2D5A27;
    color: #ffffff;
    transform: rotate(-10deg) scale(1.1);
}

.phone-icon-wrap svg {
    width: 24px;
    height: 24px;
}

.phone-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.phone-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #94a3b8;
    margin-bottom: 2px;
}

.phone-number {
    font-size: 20px;
    font-weight: 800;
    color: #1e293b;
    font-family: 'Montserrat', sans-serif;
    transition: color 0.3s ease;
}

.phone-link-card:hover .phone-number {
    color: #2D5A27;
}

.phone-action {
    font-size: 24px;
    opacity: 0.3;
    transition: all 0.3s ease;
}

.phone-link-card:hover .phone-action {
    opacity: 1;
    transform: translateX(5px);
}

@media (max-width: 480px) {
    .phone-link-card {
        padding: 12px 16px;
    }
    .phone-number {
        font-size: 17px;
    }
    .phone-icon-wrap {
        width: 40px;
        height: 40px;
        margin-right: 12px;
    }
}

/* Partner Card */
.prod-partner-card {
    background: #f8fafc;
    border-radius: 20px;
    padding: 25px;
    border: 1px dashed #cbd5e1;
}
.prod-partner-card .card-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.partner-text {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 600;
    margin: 0;
}
.btn-view-farm {
    display: inline-block;
    color: #2D5A27;
    font-weight: 800;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}
.btn-view-farm:hover {
    color: #1f401c;
    transform: translateX(5px);
}