/**
 * Hotspot Gallery Pro - Frontend Styles
 */

/* =========================
   Genel Stiller
   ========================= */

.hgp-gallery {
    margin: 40px 0;
    width: 100%;
}

/* =========================
   Grid Görünümü
   ========================= */

.hgp-grid-container {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(3, 1fr);
}

.hgp-grid-item {
    position: relative;
}

.hgp-hidden-item {
    display: none;
}

.hgp-fade-in {
    animation: hgp-fade-in 0.5s ease-in-out;
}

@keyframes hgp-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hgp-item-wrapper {
    background: transparent;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

/* =========================
   Carousel Görünümü
   ========================= */

.hgp-carousel {
    overflow: visible;
    position: relative;
    margin: 20px 0;
}

.hgp-carousel-container {
    position: relative;
    padding: 0 60px;
    overflow: visible;
}

.hgp-carousel .swiper-wrapper {
    padding: 10px 0;
}

.hgp-carousel .swiper-slide {
    height: auto;
}

.hgp-carousel-item {
    background: transparent;
    height: 100%;
    position: relative;
}

.hgp-carousel-item .hgp-image-container {
    border-radius: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.hgp-carousel-item:hover .hgp-image-container {
    transform: translateY(-4px);
}

.hgp-carousel-item .hgp-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    display: block;
    object-fit: cover;
}

/* Aspect ratio desteği olmayan tarayıcılar için */
@supports not (aspect-ratio: 1) {
    .hgp-carousel-item .hgp-image-container {
        position: relative;
        padding-bottom: 100%; /* 1:1 aspect ratio */
    }

    .hgp-carousel-item .hgp-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}

/* Swiper Navigasyon Butonları - Daha büyük ve belirgin */
.hgp-carousel .swiper-button-prev,
.hgp-carousel .swiper-button-next {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.hgp-carousel .swiper-button-prev {
    left: 5px;
}

.hgp-carousel .swiper-button-next {
    right: 5px;
}

.hgp-carousel .swiper-button-prev:after,
.hgp-carousel .swiper-button-next:after {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.hgp-carousel .swiper-button-prev:hover,
.hgp-carousel .swiper-button-next:hover {
    background: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Swiper Pagination - Gizlenmiş (isteğe bağlı gösterilebilir) */
.hgp-carousel .swiper-pagination {
    display: none;
    bottom: -30px;
}

.hgp-carousel .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: rgba(0, 0, 0, 0.2);
    opacity: 1;
    transition: all 0.3s;
}

.hgp-carousel .swiper-pagination-bullet-active {
    background: #333;
    width: 24px;
    border-radius: 4px;
}

/* =========================
   Resim Konteyneri
   ========================= */

.hgp-image-container {
    position: relative;
    overflow: hidden;
    background: transparent;
}

.hgp-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.hgp-item-wrapper:hover .hgp-image {
    transform: scale(1.05);
}

/* =========================
   Hotspot Stiller
   ========================= */

.hgp-hotspots-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hgp-hotspot {
    position: absolute;
    width: 32px;
    height: 32px;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 10;
    pointer-events: all;
}

/* Hotspot Pulse Animasyonu */
.hgp-hotspot-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: hgp-pulse 2s infinite;
}

@keyframes hgp-pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Hotspot Artı (+) İşareti */
.hgp-hotspot-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hgp-hotspot-dot:before,
.hgp-hotspot-dot:after {
    content: '';
    position: absolute;
    background: #333;
    transition: background 0.3s;
}

.hgp-hotspot-dot:before {
    width: 14px;
    height: 2px;
}

.hgp-hotspot-dot:after {
    width: 2px;
    height: 14px;
}

.hgp-hotspot:hover .hgp-hotspot-dot {
    transform: translate(-50%, -50%) scale(1.15);
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hgp-hotspot:hover .hgp-hotspot-dot:before,
.hgp-hotspot:hover .hgp-hotspot-dot:after {
    background: #000;
}

/* =========================
   Tooltip Stiller - Minimal Horizontal Layout
   ========================= */

.hgp-hotspot-tooltip {
    position: fixed;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
    max-width: 280px;
}

.hgp-hotspot-tooltip.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.hgp-tooltip-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 12px;
    position: relative;
    pointer-events: auto;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.hgp-tooltip-inner:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.16);
}

/* Arrow - varsayılan üstte */
.hgp-tooltip-inner:after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: var(--arrow-offset, 50%);
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #fff;
}

/* Arrow - altta konumda */
.hgp-hotspot-tooltip[data-position="bottom"] .hgp-tooltip-inner:after {
    bottom: auto;
    top: -8px;
    border-top: none;
    border-bottom: 8px solid #fff;
}

.hgp-tooltip-image {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.hgp-tooltip-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hgp-tooltip-content {
    flex: 1;
    min-width: 0;
}

.hgp-tooltip-title {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: #1a1a1a;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.hgp-tooltip-price {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #2271b1;
}

.hgp-tooltip-price * {
    font-size: inherit !important;
    font-weight: inherit !important;
    margin: 0 !important;
}

/* =========================
   Load More Butonu
   ========================= */

.hgp-load-more-wrapper {
    text-align: center;
    margin-top: 40px;
}

.hgp-load-more-button {
    padding: 12px 32px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.3);
}

.hgp-load-more-button:hover {
    background: #135e96;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.4);
}

.hgp-load-more-button:active {
    transform: translateY(0);
}

/* =========================
   İçerik Alanı
   ========================= */

.hgp-item-content {
    padding: 20px;
}

.hgp-item-title {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    color: #333;
}

.hgp-item-description {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

/* Carousel'deki başlıklar - Daha küçük ve minimalist */
.hgp-carousel-item .hgp-item-content {
    padding: 12px 0 0 0;
    background: transparent;
}

.hgp-carousel-item .hgp-item-title {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
    color: #666;
    text-align: left;
}

.hgp-carousel-item .hgp-item-description {
    display: none;
}

/* =========================
   Responsive Tasarım
   ========================= */

@media (max-width: 1024px) {
    .hgp-grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .hgp-grid-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .hgp-carousel-container {
        padding: 0 50px;
    }

    .hgp-carousel .swiper-button-prev,
    .hgp-carousel .swiper-button-next {
        width: 40px;
        height: 40px;
    }

    .hgp-carousel .swiper-button-prev:after,
    .hgp-carousel .swiper-button-next:after {
        font-size: 18px;
    }
    
    .hgp-hotspot-tooltip {
        max-width: 240px;
    }

    .hgp-tooltip-image {
        width: 56px;
        height: 56px;
    }

    .hgp-tooltip-title {
        font-size: 13px;
    }

    .hgp-tooltip-price {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .hgp-gallery {
        margin: 20px 0;
    }
    
    .hgp-carousel-container {
        padding: 0 30px;
    }
    
    .hgp-hotspot-tooltip {
        max-width: 220px;
    }

    .hgp-tooltip-inner {
        gap: 10px;
        padding: 10px;
        border-radius: 10px;
    }

    .hgp-tooltip-image {
        width: 48px;
        height: 48px;
    }

    .hgp-tooltip-title {
        font-size: 12px;
    }

    .hgp-tooltip-price {
        font-size: 12px;
    }
    
    .hgp-item-content {
        padding: 15px;
    }
    
    .hgp-item-title {
        font-size: 18px;
    }
    
    .hgp-item-description {
        font-size: 13px;
    }
}

/* =========================
   Yükleme Animasyonu
   ========================= */

.hgp-loading {
    text-align: center;
    padding: 40px;
}

.hgp-loading:after {
    content: '';
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2271b1;
    border-radius: 50%;
    animation: hgp-spin 1s linear infinite;
}

@keyframes hgp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =========================
   Dark Mode Desteği
   ========================= */

@media (prefers-color-scheme: dark) {
    .hgp-tooltip-inner {
        background: #2a2a2a;
        box-shadow: 0 8px 24px rgba(0,0,0,0.6);
    }

    .hgp-tooltip-inner:after {
        border-top-color: #2a2a2a;
    }

    .hgp-hotspot-tooltip[data-position="bottom"] .hgp-tooltip-inner:after {
        border-bottom-color: #2a2a2a;
    }

    .hgp-tooltip-title {
        color: #fff;
    }

    .hgp-tooltip-price {
        color: #5b9dd9;
    }

    .hgp-tooltip-image {
        background: #3a3a3a;
    }

    .hgp-item-title {
        color: #fff;
    }

    .hgp-item-description {
        color: #ccc;
    }
}
