/* ----------------------------------------------------------------------------------------
* File          : Product Detail CSS
* Description   : Styles for product detail pages including galleries, order forms, and components
* Version       : 1.0
* ---------------------------------------------------------------------------------------- */

/* ===========================
   PRODUCT GALLERY COMPONENTS
   =========================== */

/* Override Pink Background for Product Container */
.team-member-image {
    background: transparent !important;
    padding: 0 !important;
    max-width: 600px !important;
    width: calc(50% - 30px) !important;
}

.product-single-content {
    width: calc(50% - 30px) !important;
}

/* Product Gallery Container (Flex Layout) */
.product-gallery-container {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

/* Main Product Slider */
.productMainSlider {
    width: 100%;
    margin-bottom: 20px;
    border-radius: 8px;
    background: #fff;
    position: relative;
    flex: 1;
    margin-bottom: 0;
    max-width: 450px;
    --swiper-navigation-size: 45px;
    --swiper-navigation-top-offset: 50%;
    --swiper-navigation-sides-offset: 15px;
}

.productMainSlider .swiper-wrapper {
    border-radius: 8px;
    position: relative;
}

.productMainSlider .swiper-slide {
    background: #fff;
}

.productMainSlider .swiper-slide figure {
    margin: 0;
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* 1:1 Square Ratio */
    background: #fff;
    overflow: hidden;
}

.productMainSlider .swiper-slide .image-popup {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.productMainSlider .swiper-slide img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Thumbnail Slider (Vertical) */
.productThumbSlider {
    width: 100px;
    height: 600px;
    flex-shrink: 0;
    order: 2;
}

.productThumbSlider .swiper-slide {
    cursor: pointer;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.25s ease;
    background: #fff;
    opacity: 0.7;
    margin-bottom: 10px;
    height: 100px !important;
    width: 100px !important;
}

.productThumbSlider .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.productThumbSlider .swiper-slide:hover {
    opacity: 1;
    border-color: #e4a853;
    transform: scale(1.05);
}

.productThumbSlider .swiper-slide-thumb-active {
    opacity: 1;
    border-color: #e4a853;
    border-width: 3px;
}

/* Navigation Buttons */
.productMainSlider .swiper-button-next,
.productMainSlider .swiper-button-prev {
    color: #fff !important;
    background: rgba(0, 0, 0, 0.5) !important;
    width: 45px !important;
    height: 45px !important;
    border-radius: 50% !important;
    transition: all 0.3s ease;
    position: absolute !important;
    top: 50% !important;
    margin-top: 0 !important;
    transform: translateY(-50%) !important;
    z-index: 10;
}

.productMainSlider .swiper-button-next {
    right: 15px !important;
    left: auto !important;
}

.productMainSlider .swiper-button-prev {
    left: 15px !important;
    right: auto !important;
}

.productMainSlider .swiper-button-next:hover,
.productMainSlider .swiper-button-prev:hover {
    background: rgba(228, 168, 83, 0.95) !important;
    transform: translateY(-50%) scale(1.1) !important;
}

.productMainSlider .swiper-button-next:after,
.productMainSlider .swiper-button-prev:after {
    font-size: 18px !important;
}

/* ===========================
   DIETARY INFO COMPONENT
   =========================== */

.product-dietary-info {
    margin: 30px 0;
    padding: 0;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.product-dietary-info .dietary-item {
    flex: 1;
    min-width: 200px;
    padding: 16px 20px;
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    transition: all 0.25s ease;
}

.product-dietary-info .dietary-item:hover {
    background: #fff;
    border-color: #e4a853;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.product-dietary-info .dietary-label {
    display: flex;
    align-items: center;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

.product-dietary-info .dietary-value {
    display: block;
    font-size: 15px;
    color: #1a1a1a;
    font-weight: 500;
    line-height: 1.3;
}

.product-dietary-info .dietary-icon {
    margin-right: 6px;
    color: #e4a853;
    font-size: 14px;
}

/* ===========================
   ORDER FORM COMPONENT
   =========================== */

.order-form-wrapper {
    background: #fff;
    padding: 50px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin: 60px 0;
}

.order-form-wrapper .section-title {
    text-align: center;
    margin-bottom: 40px;
}

.order-form-wrapper .section-title p {
    color: #666;
    font-size: 16px;
    margin-top: 10px;
}

.cake-order-form .form-group {
    margin-bottom: 25px;
}

.cake-order-form label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.cake-order-form label .required {
    color: #e74c3c;
}

.cake-order-form .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.cake-order-form .form-control:focus {
    outline: none;
    border-color: #e4a853;
    box-shadow: 0 0 0 3px rgba(228, 168, 83, 0.1);
}

.cake-order-form .form-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #999;
}

.form-section-title {
    margin: 30px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e4a853;
}

.form-section-title h4 {
    color: #333;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

/* ===========================
   ADDON CHECKBOXES COMPONENT
   =========================== */

.addon-checkbox {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.addon-checkbox:hover {
    background: #fff9f0;
}

.addon-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: #e4a853;
}

.addon-checkbox label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.addon-checkbox .addon-price {
    color: #e4a853;
    font-weight: 600;
    font-size: 14px;
}

/* ===========================
   DELIVERY OPTIONS COMPONENT
   =========================== */

.delivery-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.delivery-option {
    position: relative;
}

.delivery-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.delivery-option label {
    display: block;
    padding: 20px;
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.delivery-option label i {
    font-size: 32px;
    color: #e4a853;
    margin-bottom: 10px;
    display: block;
}

.delivery-option .option-title {
    display: block;
    font-weight: 700;
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.delivery-option .option-desc {
    display: block;
    font-size: 13px;
    color: #666;
    font-weight: 400;
}

.delivery-option input[type="radio"]:checked + label {
    background: #fff9f0;
    border-color: #e4a853;
    box-shadow: 0 4px 12px rgba(228, 168, 83, 0.15);
}

/* ===========================
   ORDER SUMMARY COMPONENT
   =========================== */

.order-summary {
    background: linear-gradient(135deg, #fff9f0 0%, #fef5ea 100%);
    padding: 30px;
    border-radius: 8px;
    border: 2px solid #e4a853;
    margin-top: 30px;
}

.order-summary h4 {
    color: #333;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(228, 168, 83, 0.2);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row.total-row {
    margin-top: 10px;
    padding-top: 15px;
    border-top: 2px solid #e4a853;
}

.summary-label {
    font-weight: 600;
    color: #555;
    font-size: 15px;
}

.summary-value {
    font-weight: 700;
    color: #333;
    font-size: 16px;
}

.total-row .summary-label,
.total-row .summary-value {
    font-size: 20px;
    color: #e4a853;
}

/* ===========================
   BUTTONS & INTERACTIONS
   =========================== */

.btn-add-to-cart {
    width: 100%;
    padding: 18px 30px;
    font-size: 18px;
    font-weight: 700;
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-add-to-cart i {
    font-size: 20px;
}

.btn-customize {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    background: #e4a853;
    color: #fff;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-customize:hover {
    background: #d4983f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(228, 168, 83, 0.3);
}

/* ===========================
   POSTCODE VALIDATION
   =========================== */

#postcodeMessage {
    margin-top: 8px;
    font-weight: 600;
}

#postcodeMessage.valid {
    color: #27ae60;
}

#postcodeMessage.invalid {
    color: #e74c3c;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

@media (max-width: 991px) {
    .team-member-image,
    .product-single-content {
        width: 100% !important;
        max-width: none !important;
    }

    .product-gallery-container {
        flex-direction: column;
    }

    .productThumbSlider {
        width: 100%;
        height: auto;
        margin-top: 15px;
    }

    .productThumbSlider .swiper-slide {
        margin-bottom: 0;
        margin-right: 10px;
        width: 80px !important;
        height: 80px !important;
    }

    .productMainSlider .swiper-button-next,
    .productMainSlider .swiper-button-prev {
        width: 35px !important;
        height: 35px !important;
    }

    .productMainSlider .swiper-button-next:after,
    .productMainSlider .swiper-button-prev:after {
        font-size: 16px !important;
    }
}

@media (max-width: 768px) {
    .order-form-wrapper {
        padding: 30px 20px;
    }

    .delivery-options {
        grid-template-columns: 1fr;
    }

    .product-dietary-info .dietary-item {
        min-width: 100%;
    }
}

@media (max-width: 576px) {
    .productThumbSlider .swiper-slide {
        width: 70px !important;
        height: 70px !important;
    }

    .btn-add-to-cart {
        font-size: 16px;
        padding: 15px 20px;
    }

    .order-form-wrapper {
        padding: 20px 15px;
    }
}

/* ===========================
   ENHANCED HOVER EFFECTS (for consistency)
   =========================== */

/* Card Hover Effects - Reusable */
.enhanced-card-hover {
    transition: all 0.3s ease;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
}

.enhanced-card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: #e4a853;
}

/* Button States - Consistent across site */
.btn-default,
.btn-highlighted {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-default:hover,
.btn-highlighted:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-default:active,
.btn-highlighted:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Form Input States */
.form-control:hover {
    border-color: #ccc;
}

.form-control:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Loading States */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading:after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* ===========================
   UTILITY CLASSES
   =========================== */

.text-muted {
    color: #999 !important;
}

.text-success {
    color: #27ae60 !important;
}

.text-error {
    color: #e74c3c !important;
}

.text-warning {
    color: #f39c12 !important;
}

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

.p-10 { padding: 10px; }
.p-20 { padding: 20px; }
.p-30 { padding: 30px; }
