:root {
    --sp-primary: #E07A8E;
    --sp-primary-dark: #C96B7D;
    --sp-gold: #C9A86C;
    --sp-bg-cream: #FFFFFF;
    --sp-text-dark: #1A1A1A;
    --sp-text-medium: #4A4A4A;
    --sp-text-light: #666666;
    --sp-border: #F0EDE9;
}

/* ========== Gallery & Carousel ========== */
.product-gallery-section {
    background: #fff;
    border-radius: 8px;
    padding: 8px;
    box-shadow: none;
    position: relative;
}
.carousel-item img {
    width: 100% !important;
    height: auto !important;
    max-height: 80vh !important;
    object-fit: contain !important;
    display: block;
    margin: 0 auto;
    background: #fafafa;
    border-radius: 6px;
    cursor: zoom-in;
}

/* ========== Share ========== */
.share-icon-container {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 100;
}
.share-icon {
    background-color: rgba(255,255,255,0.8);
    border-radius: 50%;
    padding: 10px;
    cursor: pointer;
    font-size: 18px;
    color: #333;
    transition: background-color 0.3s;
}
.share-icon:hover { background-color: #f0f0f0; }
.share-options {
    position: absolute;
    top: 45px;
    right: 0;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 8px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: none;
    width: 180px;
}
.share-options a {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}
.share-options a:hover { background-color: #f7f7f7; }
.share-options i { margin-right: 8px; }
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    display: none;
    z-index: 9999;
}

/* ========== Zoom ========== */
.zoom-container {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    background: #fafafa;
}
.zoom-container img {
    width: 100%;
    display: block;
    transform-origin: center center;
    transition: none;
}
.zoom-indicator {
    display: none !important;
}
.zoom-indicator i { display: none; }
.zoom-indicator.zoomed { display: none !important; }
.zoom-indicator.zoomed i { display: none; }
.zoom-controls {
    display: none !important;
}
.zoom-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    border: 2px solid #E07A8E;
    color: #E07A8E;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.zoom-btn:hover { background: #E07A8E; color: #fff; transform: scale(1.1); }
.zoom-btn:active { transform: scale(0.95); }
.zoom-btn.disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.zoom-container.active img { cursor: grab; }
.zoom-container.active.dragging img { cursor: grabbing; }

/* Fullscreen Zoom */
.zoom-fullscreen-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95); z-index: 99999;
    display: none; align-items: center; justify-content: center; flex-direction: column;
}
.zoom-fullscreen-overlay.active { display: flex; }
.zoom-fullscreen-img {
    max-width: 95%; max-height: 85vh; object-fit: contain;
    border-radius: 8px; transform-origin: center center; transition: transform 0.2s ease;
}
.zoom-fullscreen-close {
    position: absolute; top: 20px; right: 20px;
    width: 45px; height: 45px; border-radius: 50%;
    background: rgba(255,255,255,0.1); border: 2px solid rgba(255,255,255,0.3);
    color: #fff; font-size: 20px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: all 0.3s ease;
}
.zoom-fullscreen-close:hover { background: #E07A8E; border-color: #E07A8E; }
.zoom-fullscreen-controls {
    position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 15px; align-items: center;
    padding: 12px 20px; background: rgba(0,0,0,0.6); border-radius: 30px;
}
.zoom-fullscreen-btn {
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(255,255,255,0.1); border: 2px solid rgba(255,255,255,0.3);
    color: #e07a8e; font-size: 16px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: all 0.3s ease;
}
.zoom-fullscreen-btn:hover { background: #E07A8E; border-color: #E07A8E; }
.zoom-level-display { color: #fff; font-size: 14px; font-weight: 600; min-width: 50px; text-align: center; }
.zoom-fullscreen-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 50px; height: 50px; border-radius: 50%;
    background: rgba(255,255,255,0.1); border: 2px solid rgba(255,255,255,0.3);
    color: #fff; font-size: 20px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: all 0.3s ease;
}
.zoom-fullscreen-nav:hover { background: #E07A8E; border-color: #E07A8E; }
.zoom-fullscreen-prev { left: 20px; }
.zoom-fullscreen-next { right: 20px; }

/* ========== Color Slider ========== */
.custom-slider .item { display: flex; justify-content: center; align-items: center; }
.custom-slider .item img {
    width: 58px !important; height: 72px !important;
    border-radius: 4px; margin: 0; padding: 0; object-fit: contain;
    background: #fafafa;
}
.custom-slider .item.selected img { border: 3px solid #ffccd6; border-radius: 8px; }
.custom-slider .item img { transition: border 0.2s ease, transform 0.2s ease; }

.color-slider-wrapper { overflow: visible; position: relative; z-index: 1; }
.color-arrow { display: none !important; }

/* ========== Related Products ========== */
.related-product .owl-item { padding: 8px; }
.related-product .owl-item a { text-decoration: none; display: block; }
.related-product .img-hover { border-radius: 8px; overflow: hidden; margin-bottom: 10px; background: #f8f8f8; }
.related-product .img-hover img { width: 100%; height: auto; aspect-ratio: 3/4; object-fit: cover; }
.related-product .saree-name,
.related-product .alt-saree-name {
    display: block; font-size: 13px; font-weight: 600; color: #333;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 100%; margin-bottom: 5px;
}
.related-product .price { font-size: 12px; margin: 0; }
.related-product .org-price { color: #999; text-decoration: line-through; margin-right: 5px; }
.related-product .off-price { color: #E07A8E; font-weight: 700; font-size: 14px; }
.related-product .both-price { color: #E07A8E; }
.related-product .badge-success { background: #4CAF50; font-size: 10px; padding: 3px 6px; }

/* ========== Detail Modal ========== */
.detail-row {
    border-bottom: 1px solid #f1f1f1; padding: 12px 0;
    display: flex; align-items: flex-start;
}
.detail-label { width: 150px; font-weight: 600; color: #6c757d; font-size: 15px; }
.detail-value { flex: 1; font-weight: 500; color: #333; font-size: 15px; line-height: 1.5; }
.detail-row:last-child { border-bottom: none; }

/* ========== Image Loading States ========== */
.img-loading {
    background: #f5f5f5;
}
.img-loaded {
    opacity: 1;
}

/* ========== MOBILE OVERRIDES ========== */
@media (max-width: 480px) {
    .color-arrow { display: none !important; }
    .carousel-item img { max-height: 75vh !important; }
    .share-options { width: 160px; top: 40px; right: 5px; font-size: 13px; }
    .share-icon { padding: 8px; font-size: 16px; }
    .related-product .saree-name,
    .related-product .alt-saree-name { font-size: 11px; max-width: 120px; }
    .related-product .off-price { font-size: 12px; }
    .detail-row { padding: 10px 0; display: flex; flex-wrap: wrap; }
    .detail-label { width: 120px; font-size: 13px; color: #555; }
    .detail-value { font-size: 14px; width: calc(100% - 120px); line-height: 1.4; }
}

@media (max-width: 767px) {
    .zoom-container { cursor: default; touch-action: pan-x pan-y; }
    .zoom-container img { cursor: zoom-in; transition: none; -webkit-user-select: none; user-select: none; }
    .zoom-container.active { touch-action: none; }
    .zoom-container.active img { cursor: move; }
    .zoom-indicator { display: none !important; }
    .zoom-controls { display: none !important; }
    .zoom-btn { display: none !important; }
    .zoom-fullscreen-overlay { background: rgba(0,0,0,0.98); }
    .zoom-fullscreen-overlay.active { touch-action: none; }
    .zoom-fullscreen-img { max-width: 100%; max-height: 90vh; touch-action: none; -webkit-user-select: none; user-select: none; }
    .zoom-fullscreen-controls { bottom: 20px; padding: 10px 15px; }
    .zoom-fullscreen-btn { width: 40px; height: 40px; font-size: 14px; }
    .zoom-fullscreen-nav { width: 40px; height: 40px; font-size: 16px; }
    .zoom-fullscreen-prev { left: 10px; }
    .zoom-fullscreen-next { right: 10px; }
}

@media (min-width: 481px) and (max-width: 767px) {
    .color-arrow { display: none !important; }
    .custom-slider .item img { width: 62px !important; height: 78px !important; }
}

@media (min-width: 768px) {
    .color-arrow { display: none !important; }
    .custom-slider .item img { width: 70px !important; height: 88px !important; }
    .carousel-item img { max-height: 85vh !important; }
}

@media (min-width: 1024px) {
    .custom-slider .item img { width: 78px !important; height: 96px !important; }
}

@media (min-width: 1200px) {
    .custom-slider .item img { width: 85px !important; height: 105px !important; }
}

/* ========== iOS Optimizations ========== */
@supports (-webkit-touch-callout: none) {
    * { -webkit-tap-highlight-color: transparent; }
    .zoom-container img {
        transition: none !important;
        -webkit-transform-style: preserve-3d;
    }
    .zoom-fullscreen-img {
        -webkit-transform-style: preserve-3d;
    }
    .zoom-btn, .zoom-fullscreen-btn, .zoom-fullscreen-nav { transition: none; }
    .owl-carousel .owl-stage-outer { -webkit-transform: none !important; transform: none !important; }
    .owl-carousel .owl-item {
        -webkit-backface-visibility: visible !important; backface-visibility: visible !important;
    }
    .img-loading { animation: none !important; background: #f5f5f5 !important; }
    .img-loaded { opacity: 1 !important; transition: none !important; }
}
