/* Product Pages Specific Styles */

/* Product Hero Section */
.product-hero {
    height: 40vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
}

.product-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23EC1C24" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(10px, 10px); }
}

.product-hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.product-hero-text {
    max-width: 800px;
    padding: 1rem;
    margin-top: 120px;
}

.product-hero-text h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #EC1C24, #2a2a2a, #EC1C24);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.product-hero-text p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.product-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(236, 28, 36, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(236, 28, 36, 0.3);
    backdrop-filter: blur(10px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: #EC1C24;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.floating-element {
    position: absolute;
    width: 50px;
    height: 50px;
    background: rgba(236, 28, 36, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.floating-element:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-element:nth-child(2) {
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.floating-element:nth-child(3) {
    bottom: 30%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Products Section */
.products-section {
    padding: 100px 0;
    background: #f8f9fa;
    min-height: 100vh;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
    padding: 0 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* 3D Flip Product Cards */
.product-flip {
    perspective: 1000px;
    height: auto;
    width: 100%;
    aspect-ratio: 1/1;
    margin: 0 0 2rem 0;
    max-width: 320px;
    justify-self: center;
}

.product-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    cursor: pointer;
}

.product-flip:hover .product-inner {
    transform: rotateY(180deg);
}

.product-front,
.product-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e9ecef;
}

.product-back {
    background: linear-gradient(135deg, #2a2a2a, #2a2a2a);
    color: white;
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.product-image {
    position: relative;
    width: 100%;
    height: 75%;
    overflow: hidden;
    border-radius: 15px 15px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 15px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    transform: none;
    filter: none;
    max-width: none;
    max-height: none;
}

.product-flip:hover .product-image img {
    transform: scale(1.05);
    filter: none;
}

.product-badge {
    display: none;
}

/* Badge glow animation removed */

.product-info {
    padding: 1rem;
    height: 25%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-info h3 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-family: 'Montserrat', 'Inter', sans-serif;
}

.product-type {
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Product Back Details */
.product-details {
    text-align: left;
    width: 100%;
}

.product-details h4 {
    color: #EC1C24;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    text-align: center;
    font-weight: 700;
}

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

.product-details li {
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    opacity: 0.95;
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-details li:last-child {
    border-bottom: none;
}

.product-details strong {
    color: #EC1C24;
    font-weight: 600;
    min-width: 100px;
}

/* Hover Effects */
.product-flip {
    transition: transform 0.3s ease;
}

.product-flip:hover {
    transform: translateY(-4px);
}

.product-flip:hover .product-front {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* Loading Animation for Products */
.product-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.product-card.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Animation */
.product-card:nth-child(1) { transition-delay: 0.1s; }
.product-card:nth-child(2) { transition-delay: 0.2s; }
.product-card:nth-child(3) { transition-delay: 0.3s; }
.product-card:nth-child(4) { transition-delay: 0.4s; }
.product-card:nth-child(5) { transition-delay: 0.5s; }
.product-card:nth-child(6) { transition-delay: 0.6s; }
.product-card:nth-child(7) { transition-delay: 0.7s; }
.product-card:nth-child(8) { transition-delay: 0.8s; }

/* Tilt Effect Enhancement */
[data-tilt] {
    transition: transform 0.1s ease-out;
}

[data-tilt]:hover {
    transform: perspective(1000px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(-5px) scale3d(1.02, 1.02, 1.02);
}

/* Special Effects */
.product-front::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(236, 28, 36, 0.1) 50%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.product-flip:hover .product-front::before {
    opacity: 1;
    animation: shine 0.6s ease-out;
}

@keyframes shine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.2rem;
        padding: 0 1.5rem;
        max-width: 1000px;
    }
    
    .product-flip {
        max-width: 280px;
    }
}

/* iOS Specific Touch Improvements */
@supports (-webkit-touch-callout: none) {
    .overlay {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
        cursor: pointer;
    }
    
    .overlay:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
    
    .overlay.touch-active {
        transform: translateY(-2px) scale(1.02);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }
}

@media (max-width: 900px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
        padding: 0 1rem;
    }
    
    .product-flip {
        max-width: 250px;
    }
}

@media (max-width: 768px) {
    .product-hero {
        height: 35vh;
    }
    
    .product-hero-text h1 {
        font-size: 2.5rem;
    }
    
    .product-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-item {
        padding: 0.8rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .products-section {
        padding: 40px 0;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 2rem;
        margin-top: 1rem;
    }
    
    .product-flip {
        max-width: 300px;
        aspect-ratio: 1/1;
    }
    
    .product-image {
        height: 75%;
        padding: 12px;
        background: #ffffff;
    }
    
    .product-info {
        height: 25%;
        padding: 0.8rem;
    }
    
    .product-details {
        padding: 1rem;
    }
    
    .product-details h4 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .product-details li {
        font-size: 0.85rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
}

@media (max-width: 480px) {
    .product-hero {
        height: 30vh;
    }
    
    .product-hero-title {
        font-size: 2rem;
    }
    
    .product-hero-subtitle {
        font-size: 1rem;
    }
    
    .products-section {
        padding: 30px 0;
    }
    
    .products-grid {
        margin-top: 0.5rem;
    }
    
    .product-flip {
        max-width: 280px;
        aspect-ratio: 1/1;
        margin-bottom: 1rem;
    }
    
    .product-image {
        height: 75%;
        padding: 10px;
        background: #ffffff;
    }
    
    .product-info {
        padding: 0.6rem;
        height: 25%;
    }
    
    .product-info h3 {
        font-size: 1.1rem;
    }
    
    /* Badge removed */
    
    /* Overlay responsive adjustments */
    .overlay {
        height: 240px;
        padding: 0.8rem;
    }
    
    .overlay img {
        height: 150px;
    }
    
    .overlay h5 {
        font-size: 0.8rem;
    }
    
    .overlay p {
        font-size: 1rem;
    }
}

/* Overlay Product Cards */
.overlay {
    position: relative;
    background: white;
    border-radius: 15px;
    padding: 0;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
    aspect-ratio: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    /* iOS touch support */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.overlay:hover,
.overlay.touch-active {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

/* Touch feedback for iOS */
.overlay:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* Enhanced touch active state */
.overlay.touch-active {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

/* Touch feedback animation */
.overlay.touch-active .product-specs {
    opacity: 1;
    animation: fadeInSpecs 0.3s ease;
}

@keyframes fadeInSpecs {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.overlay img {
    width: 120%;
    height: 120%;
    object-fit: cover;
    border-radius: 15px;
    position: absolute;
    top: -10%;
    left: -10%;
}

/* Adjust Free Shot visuals to match other product image scale */
.overlay.free-shot img {
    width: 110%;
    height: 110%;
    top: -5%;
    left: -5%;
}

.overlay i {
    display: none;
}

.overlay h5 {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.3rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.overlay p {
    font-size: 1.1rem;
    color: #EC1C24;
    font-weight: 700;
    margin: 0;
}

.product-name {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: #333;
    font-size: 0.85rem;
    font-weight: 300;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 10px;
    border-radius: 15px;
    backdrop-filter: blur(5px);
    z-index: 5;
    white-space: nowrap;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-specs {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 20px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 15;
    font-size: 0.75rem;
    line-height: 1.4;
}

.overlay:hover .product-specs,
.overlay.touch-active .product-specs {
    opacity: 1;
}

.spec-item {
    margin-bottom: 8px;
    text-align: left;
}

.spec-item strong {
    color: #EC1C24;
    font-weight: 600;
    margin-right: 5px;
}

/* Filter and Search (for future enhancement) */
.product-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #EC1C24;
    background: transparent;
    color: #EC1C24;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.filter-btn:hover,
.filter-btn.active {
    background: #EC1C24;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(236, 28, 36, 0.3);
}

/* Loading Screen Enhancement - Styling handled in style.css */

/* COMES Fişekler - 6 Ürün Grid Optimizasyonu */
.comes-products .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    justify-items: center;
}

.comes-products .product-flip {
    max-width: 380px;
}

@media (max-width: 900px) {
    .comes-products .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .comes-products .products-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .products-grid {
        justify-items: center;
        padding: 0 20px;
    }
    
    .overlay {
        padding: 0;
        max-width: 300px;
        margin: 0 auto;
        /* Enhanced touch support for mobile */
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
    
    .overlay img {
        width: 120%;
        height: 120%;
        top: -10%;
        left: -10%;
        object-fit: cover;
    }
    
    .overlay i {
        display: none;
    }
    
    .product-name {
        font-size: 0.75rem;
        padding: 4px 8px;
        bottom: 8px;
    }
    
    .product-specs {
        padding: 15px;
        font-size: 0.7rem;
    }
}
