/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Assistant', 'Heebo', Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #2E4A7F 0%, #4DB8E8 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
}

header:hover {
    transform: scale(1.01);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
}

.header-logo {
    width: 150px;
    height: 150px;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.header-logo:hover {
    transform: rotate(5deg) scale(1.05);
}

header h1 {
    font-family: 'Heebo', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

header h2 {
    font-family: 'Arial', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

.gift-info {
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 1rem;
    color: #FFD700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Navigation Styles */
.design-nav {
    background: white;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.nav-btn {
    background: white;
    border: 2px solid #2E4A7F;
    color: #2E4A7F;
    padding: 0.7rem 1.5rem;
    font-family: 'Heebo', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: #4DB8E8;
    color: white;
    border-color: #4DB8E8;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.nav-btn.active {
    background: #2E4A7F;
    color: white;
    box-shadow: 0 4px 12px rgba(46, 74, 127, 0.3);
}

/* Gallery Grid */
.gallery {
    max-width: 1400px;
    margin: 3rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2.5rem;
}

/* Design Card */
.design-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.design-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

/* Design Preview */
.design-preview {
    background: #f8f8f8;
    padding: 2rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.towel-preview {
    background: #e0e0e0;
    padding: 1.5rem;
}

.design-preview::after {
    content: '🔍 לחץ להגדלה | Click to enlarge';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(46, 74, 127, 0.9);
    color: white;
    padding: 0.8rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.3s ease;
}

.design-preview:hover::after {
    opacity: 1;
    transform: translateY(0);
}

.design-preview svg {
    width: 100%;
    height: auto;
    max-height: 500px;
    display: block;
}

/* Design Info */
.design-info {
    padding: 2rem;
}

.design-info h3 {
    font-family: 'Heebo', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2E4A7F;
    margin-bottom: 1rem;
    border-bottom: 3px solid #4DB8E8;
    padding-bottom: 0.5rem;
}

.design-info p {
    margin-bottom: 0.8rem;
    color: #555;
}

.design-info strong {
    color: #2E4A7F;
    font-weight: 700;
}

.description {
    font-style: italic;
    color: #666;
    border-right: 4px solid #4DB8E8;
    padding-right: 1rem;
    margin: 1rem 0;
}

/* Feature Tags */
.features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.feature-tag {
    background: linear-gradient(135deg, #4DB8E8 0%, #2E4A7F 100%);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Preview Overlay */
.preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
    overflow: auto;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Beach Towel Mockup */
.towel-mockup {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    animation: zoomIn 0.4s ease;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Mockup Scene with Real Towel Photos */
.mockup-scene {
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    min-height: 500px;
    min-width: 700px;
    max-width: 90vw;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
}

.mockup-person {
    min-height: 400px;
    /* Rotate to show towel horizontally */
    transform: rotate(90deg);
    transform-origin: center;
}

.mockup-flat {
    min-height: 400px;
    /* Rotate to show towel horizontally */
    transform: rotate(90deg);
    transform-origin: center;
}

/* Design Overlay Container */
.design-overlay {
    position: relative;
    z-index: 10;
    max-width: 90%;
    max-height: 80%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
    /* Counter-rotate to keep design upright */
    transform: rotate(-90deg);
}

/* Design Shadow for depth */
.design-shadow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 70%;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.3) 0%, transparent 70%);
    z-index: 5;
    filter: blur(20px);
    opacity: 0.6;
}

.towel-container {
    position: relative;
    width: 550px;
    max-width: 100%;
    margin: 0 auto;
    filter: drop-shadow(25px 30px 40px rgba(0, 0, 0, 0.5));
    transform: perspective(1200px) rotateX(5deg) rotateY(-2deg);
    animation: towelFloat 4s ease-in-out infinite;
}

@keyframes towelFloat {
    0%, 100% {
        transform: perspective(1200px) rotateX(5deg) rotateY(-2deg) translateY(0px);
    }
    50% {
        transform: perspective(1200px) rotateX(5deg) rotateY(-2deg) translateY(-8px);
    }
}

.towel-base {
    position: relative;
    background: white;
    border-radius: 8px;
    overflow: visible;
    padding: 10px;
    box-shadow:
        inset 0 0 50px rgba(0, 0, 0, 0.05),
        0 5px 20px rgba(0, 0, 0, 0.2);
}

/* Curved edges effect */
.towel-base::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 10%;
    right: 10%;
    height: 6px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
}

.towel-base::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 10%;
    right: 10%;
    height: 6px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.towel-design {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 5px;
    transition: all 0.4s ease;
    transform-origin: center center;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
    mix-blend-mode: multiply;
    opacity: 0.95;
}

/* Placement positions for design overlay */
.design-overlay[data-placement="person-full"] {
    width: 70%;
    height: 75%;
}

.design-overlay[data-placement="flat-full"] {
    width: 75%;
    height: 70%;
}

.design-overlay[data-placement="person-center"] {
    width: 50%;
    height: 50%;
    transform: translateY(-10%);
}

.design-overlay[data-placement="flat-bottom-right"] {
    width: 40%;
    height: 40%;
    align-self: flex-end;
    margin-left: auto;
    margin-right: 10%;
}

.design-overlay[data-placement="person-top"] {
    width: 45%;
    height: 45%;
    align-self: flex-start;
    transform: translateY(-5%);
}

/* Corner folds for realism */
.corner-fold {
    position: absolute;
    width: 80px;
    height: 80px;
    opacity: 0.3;
    pointer-events: none;
    z-index: 10;
}

.corner-fold-tl {
    top: 0;
    left: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.2) 0%, transparent 50%);
    border-top-left-radius: 8px;
}

.corner-fold-tr {
    top: 0;
    right: 0;
    background: linear-gradient(225deg, rgba(0, 0, 0, 0.2) 0%, transparent 50%);
    border-top-right-radius: 8px;
}

/* Towel texture overlay */
.towel-texture {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.03) 2px,
            rgba(255, 255, 255, 0.03) 4px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.02) 2px,
            rgba(0, 0, 0, 0.02) 4px
        );
    pointer-events: none;
    border-radius: 5px;
    mix-blend-mode: overlay;
}

/* Towel fringe/tassels */
.towel-fringe {
    position: absolute;
    left: 0;
    right: 0;
    height: 15px;
    background: linear-gradient(to right,
        transparent 0%,
        currentColor 2%,
        transparent 4%,
        currentColor 6%,
        transparent 8%,
        currentColor 10%,
        transparent 12%,
        currentColor 14%,
        transparent 16%,
        currentColor 18%,
        transparent 20%,
        currentColor 22%,
        transparent 24%,
        currentColor 26%,
        transparent 28%,
        currentColor 30%,
        transparent 32%,
        currentColor 34%,
        transparent 36%,
        currentColor 38%,
        transparent 40%,
        currentColor 42%,
        transparent 44%,
        currentColor 46%,
        transparent 48%,
        currentColor 50%,
        transparent 52%,
        currentColor 54%,
        transparent 56%,
        currentColor 58%,
        transparent 60%,
        currentColor 62%,
        transparent 64%,
        currentColor 66%,
        transparent 68%,
        currentColor 70%,
        transparent 72%,
        currentColor 74%,
        transparent 76%,
        currentColor 78%,
        transparent 80%,
        currentColor 82%,
        transparent 84%,
        currentColor 86%,
        transparent 88%,
        currentColor 90%,
        transparent 92%,
        currentColor 94%,
        transparent 96%,
        currentColor 98%,
        transparent 100%
    );
    opacity: 0.4;
    filter: blur(0.5px);
}

.fringe-top {
    top: -15px;
    color: rgba(255, 255, 255, 0.8);
}

.fringe-bottom {
    bottom: -15px;
    color: rgba(255, 255, 255, 0.8);
}

/* Placement Controls */
.placement-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.placement-btn {
    background: linear-gradient(135deg, #4DB8E8, #2E4A7F);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    font-family: 'Arial', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(77, 184, 232, 0.3);
}

.placement-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(77, 184, 232, 0.5);
    background: linear-gradient(135deg, #5DC8F8, #3E5A8F);
}

.placement-btn:active {
    transform: translateY(0);
}

.placement-label {
    text-align: center;
    color: white;
    font-family: 'Heebo', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    min-width: 280px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.placement-label strong {
    font-size: 1.3rem;
    color: #FFD700;
}

.close-preview {
    position: absolute;
    top: 2rem;
    left: 2rem;
    background: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.close-preview:hover {
    background: #FF6B6B;
    color: white;
    transform: rotate(90deg);
}

/* Footer */
footer {
    background: linear-gradient(135deg, #2E4A7F 0%, #1a2d4d 100%);
    color: white;
    padding: 3rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

footer h3 {
    font-family: 'Heebo', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #4DB8E8;
}

footer h4 {
    font-family: 'Heebo', sans-serif;
    font-size: 1.4rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #FFD700;
}

footer p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

footer ul {
    list-style: none;
    margin: 1.5rem 0;
    padding: 0;
}

footer li {
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.05rem;
}

footer li strong {
    color: #FFD700;
    font-weight: 700;
}

.footer-note {
    background: rgba(77, 184, 232, 0.2);
    padding: 1.5rem;
    border-radius: 10px;
    border-right: 4px solid #4DB8E8;
    margin: 2rem 0;
    font-size: 1.1rem;
}

.footer-copyright {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    font-size: 1rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    header h2 {
        font-size: 1.4rem;
    }

    .header-logo {
        width: 100px;
        height: 100px;
    }

    .gallery {
        grid-template-columns: 1fr;
        padding: 0 1rem;
        gap: 2rem;
    }

    .design-nav {
        padding: 1rem;
    }

    .nav-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .design-info h3 {
        font-size: 1.3rem;
    }

    footer h3 {
        font-size: 1.5rem;
    }

    .close-preview {
        top: 1rem;
        left: 1rem;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    header h2 {
        font-size: 1.1rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .design-preview {
        padding: 1rem;
    }

    .design-info {
        padding: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .design-nav,
    footer {
        display: none;
    }

    .design-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }

    header {
        background: white;
        color: #2E4A7F;
    }
}

/* Accessibility */
.nav-btn:focus,
.close-preview:focus {
    outline: 3px solid #FFD700;
    outline-offset: 2px;
}

/* Loading Animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.design-card {
    animation: slideUp 0.5s ease forwards;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #2E4A7F;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4DB8E8;
}
