:root {
            --primary-color: #8e44ad;
            --secondary-color: #9b59b6;
            --accent-color: #f39c12;
            --light-color: #f5f5f5;
            --dark-color: #2c3e50;
            --transition: all 0.3s ease;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
		html, body {
		  overflow-x: hidden; /* ❗ מונע גלילה לרוחב */
		  width: 100%;        /* מוודא שהגוף לא חורג */
		}
        
        body {
            font-family: 'Heebo', sans-serif;
            background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
            color: var(--dark-color);
            min-height: 100vh;
            line-height: 1.6;
			padding-top: 80px; /* ← מתחשב בגובה של header */
        }
		
		header {
		  position: fixed;
		  top: 0;
		  width: 100%;
		  z-index: 999;
		  background: linear-gradient(to left, var(--primary-color), var(--secondary-color));
		  padding: 1rem 0;
		  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
		}

        .active {
            background-color: rgba(255, 255, 255, 0.2);
        }
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }        
        
                
		.main-content {
			padding: 5rem 0;
		}
		
		.page-title {
            text-align: center;
            padding: 6rem 0;
            position: relative;
			
        }
        
        .page-title h1 {
            font-size: 3.5rem;
            color: var(--primary-color);
            margin-bottom: 1rem;
            position: relative;
            display: inline-block;
			text-align: center;
        }
         	
        .page-title h1::after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
            width: 80px;
            height: 4px;
            background: var(--accent-color);
            border-radius: 2px;
        }
        
        .page-title p {
            max-width: 700px;
            margin: 0 auto;
            font-size: 1.2rem;
        }
		
        .btn {
            display: inline-block;
            padding: 12px 30px;
            background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
            color: white;
            border-radius: 30px;
            text-decoration: none;
            font-weight: 500;
            box-shadow: 0 4px 15px rgba(142, 68, 173, 0.3);
            transition: var(--transition);
            margin: 0 10px;
            border: none;
            cursor: pointer;
            font-size: 1rem;
        }
        
        .btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(142, 68, 173, 0.4);
        }
        
        .btn-outline {
            background: transparent;
            border: 2px solid var(--primary-color);
            color: var(--primary-color);
        }
        
        .btn-outline:hover {
            background: var(--primary-color);
            color: white;
        }
                       
        .section-title {
            text-align: center;
            margin-bottom: 3rem;
            position: relative;
        }
        
        .section-title h2 {
            font-size: 2.5rem;
            color: var(--primary-color);
            margin-bottom: 1rem;
        }
        
        .section-title::after {
            content: '';
            display: block;
            width: 80px;
            height: 4px;
            background: var(--accent-color);
            margin: 0 auto;
            border-radius: 2px;
        }
        
        .card-options {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 2rem;
            margin-top: 3rem;
        }
        
        .card-option {
            flex: 1;
            min-width: 300px;
            max-width: 400px;
            background: white;
           /* border-radius: 15px;*/
            overflow: hidden;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            transition: var(--transition);
            text-align: center;
            padding: 2rem;
            position: relative;
            z-index: 1;
        }
        
        .card-option::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
            opacity: 0;
            z-index: -1;
            transition: var(--transition);
        }
        
        .card-option:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
        }
        
        .card-option:hover::before {
            opacity: 0.05;
        }
        
        .card-option i {
            font-size: 3rem;
            color: var(--primary-color);
            margin-bottom: 1.5rem;
            transition: var(--transition);
        }
        
        .card-option:hover i {
            transform: scale(1.1);
            color: var(--accent-color);
        }
        
        .card-option h3 {
            font-size: 1.5rem;
            margin-bottom: 1rem;
            color: var(--dark-color);
        }
        
        .card-option p {
            color: #666;
            margin-bottom: 1.5rem;
        }        
        
        .card {
            width: 100%;
            height: 100%;
            position: relative;
            transform-style: preserve-3d;
            transition: transform 0.8s;
            cursor: pointer;
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
            border-radius: 15px;
		    margin: 0 !important;
			padding: 0 !important;
			border: none;
        }
		.card,
		.card-front,
		.card-back {
		  box-shadow: none !important;
		}

        /* Card Selection Section */
        .card-selection {
            padding: 5rem 0;
            background-color: white;
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
           /* border-radius: 10px;*/
            margin: 2rem auto;
            max-width: 1100px;
        }
        .card.flipped {
            transform: rotateY(180deg);
        }
        /* Card Display */
        .card-display {
            perspective: 1000px;
            width: 300px;
            height: 480px;
            margin: 3rem auto;
            position: relative;
        }
		.card-text-front {
		  text-align: center;
		  margin-top: 15px;
		  background: rgba(255, 255, 255, 0.95);
		  padding: 12px;
		  border-radius: 10px;
		  max-width: 320px;
		  width: 100%;
		  font-size: 1rem;
		  color: #333;
		  direction: rtl;
		}

		.card-text-front p {
		  margin: 0;
		  font-size: 1rem;
		  color: #333;
		}

        .card-front,
		.card-back {
		  position: absolute;
		  width: 100%;
		  height: 100%;
		  backface-visibility: hidden;
		  display: flex;
		  align-items: stretch;       /* ⬅ כדי שהתמונה תתפרש לאורך מלא */
		  justify-content: stretch;   /* ⬅ כדי שהתמונה תתפרש לרוחב מלא */
		  text-align: center;
		  background: transparent;
		  color: white;
		  font-size: 1.5rem;
		  padding: 0 !important;
		  margin: 0 !important;
		}

		.card-front img,
		.card-back img {
		  width: 100%;
		  height: 100%;
		  object-fit: contain ;          /* ⬅ תמלא את כל האזור מבלי שוליים */
		  display: block;
		  border-radius: 0;
		  margin: 0;
		  padding: 0;
		  background: none;
		}

		
      			
		.card-description {
		  margin-top: 20px;
		  padding: 15px;
		  background-color: rgba(155, 89, 182, 0.05);
		  border-radius: 10px;
		  max-width: 300px;
		  font-size: 1.1rem;
		  color: var(--dark-color);
		}
		
		.modal-note {
		  margin-top: 20px;
		  padding: 15px;
		  text-align: center;
		  font-size: 1.1rem;
		  background-color: rgba(455, 89, 182, 0.05);
		  max-width: 300px;
		}


		.close-modal {
		  display: none;
		  position: absolute;
		  top: 10px;
		  left: 15px;
		  font-size: 1.2rem; /* ⬅️ קטן יותר מ-2rem */
		  color: #8e44ad;
		  cursor: pointer;
		  z-index: 9999;
		  background: rgba(255, 255, 255, 0.95); /* ⬅️ קצת שקוף */
		  border-radius: 50%;
		  padding: 4px 6px; /* ⬅️ קטן יותר */
		  box-shadow: 0 0 4px rgba(0, 0, 0, 0.15);
		  line-height: 1;
		}

		.close-modal:hover {
		  background-color: #f2f2f2;
		}



		/* כפתור סגירה בתחתית (מופיע רק לאחר היפוך) */
		.btn-close-modal {
		  margin-top: 20px;
		  padding: 8px 18px;
		  background-color: #8e44ad;
		  color: #fff;
		  border: none;
		  border-radius: 10px;
		  font-size: 1rem;
		  cursor: pointer;
		  transition: background-color 0.3s;
		}

		.btn-close-modal:hover {
		  background-color: #732d91;
		}
		
        
        .card-back {
            background: white;
            color: var(--dark-color);
            transform: rotateY(180deg);
            display: flex;
            flex-direction: column;
            justify-content: center;
        }
        
        .card-back h3 {
            font-size: 1.8rem;
            margin-bottom: 1rem;
            color: var(--primary-color);
        }
        
        .card-back p {
            font-size: 1.1rem;
            line-height: 1.6;
        }
        
        .card-pattern {
            position: absolute;
            width: 100%;
            height: 100%;
            background-image: url('https://www.transparenttextures.com/patterns/cubes.png');
            opacity: 0.1;
             /*  border-radius: 15px;*/
        }
        
       .modal-card .card {
            width: 300px;
            height: 450px;
            perspective: 1000px;
            margin: 0 auto;
			border: 2px solid #8e44ad;
			border-radius: 15px;
			box-shadow: 0 0 20px rgba(142, 68, 173, 0.3);
        }
        .modal-card .card .card-front,
        .modal-card .card .card-back {
            width: 100%;
            height: 100%;
            position: absolute;
            backface-visibility: hidden;
            border-radius: 0;
            overflow: hidden;
        }
        .modal-card .card .card-front img,
        .modal-card .card .card-back img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .modal-card .card.flipped {
            transform: rotateY(180deg);
        }
        .modal-card .card {
            position: relative;
            transform-style: preserve-3d;
            transition: transform 0.8s;
        }


	  /* About Section */
        .about-section {
			background-color: white;
			border-radius: 15px;
			box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
			padding: 3rem;
			margin: 3rem 0;
		}

        
        .about-content {
			display: flex;
			flex-wrap: wrap;
			gap: 3rem;
			align-items: center;
		}

		.about-image {
			flex: 1 1 300px;
			max-width: 500px;
			border-radius: 15px;
			overflow: hidden;
			box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
		}

		.about-image img {
			width: 100%;
			height: auto;
			display: block;
			border-radius: 15px;
		}

        
        .about-image:hover img {
            transform: scale(1.05);
        }
        
        .about-text {
			flex: 2 1 400px;
			text-align: right;
		}
        
        .about-text h2 {
            font-size: 2.5rem;
            color: var(--primary-color);
            margin-bottom: 1.5rem;
        }
        
        .about-text p {
            margin-bottom: 1.5rem;
            font-size: 1.1rem;
        }
        
        
		@media (max-width: 600px) {
		.social-link_contact {
				width: 40px;
				height: 40px;
				font-size: 1.2rem;
			}
		}

        
        .footer-links li {
            margin-bottom: 10px;
            list-style: none;
        }
        
        .footer-links a {
            color: white;
            text-decoration: none;
            transition: var(--transition);
            display: inline-block;
        }
        
        .footer-links a:hover {
            color: var(--accent-color);
            transform: translateX(-5px);
        }
        
        .copyright {
            text-align: center;
            padding-top: 2rem;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        /* Modal */
       .modal {
		  display: none;
		  position: fixed;
		  top: 0; left: 0;
		  width: 100%; height: 100%;
		  background-color: rgba(0, 0, 0, 0.7);
		  z-index: 1000;
		  justify-content: center;
		  align-items: center;
		}

		.modal.show {
		  display: flex;
		}

		.modal-content {
		  position: relative;
		  background: white;
		  width: 90%;
		  max-width: 400px;
		  border: 1px solid #8e44ad; /* מסגרת סגולה */
		  border-radius: 16px;
		  padding: 20px;
		  margin: 20px auto;
		  box-shadow: 0 0 25px rgba(0, 0, 0, 0.2);
		  max-height: 90vh;
		  overflow-y: auto;

		  display: flex;
		  flex-direction: column;
		  align-items: center;
		  justify-content: flex-start;
		  text-align: center;
		  box-sizing: border-box;
		}

		.modal-card {
			height: auto;
			margin: 20px 0;
		  }

		#modal-card {
		  width: 100%;
		  height: 450px; /* ✅ גובה אחיד סביר */
		  transform-style: preserve-3d;
		  transition: transform 0.8s;
		  position: relative;
		  cursor: pointer;
		  border-radius: 0;
		}

		/* ✅ תמונות בתוך הקלף – לא ייחתכו */
		#modal-card img {
		  width: 100%;
		  height: 100%;
		  object-fit: contain; 
		  display: block;
		  margin: 0;
		  padding: 0;
		  background: none;
		}


		/* ✅ התאמה למובייל */
		@media (max-width: 480px) {
		  #modal-card {
			height: 380px; /* גובה קטן יותר לפופאפ */
		  }
		}


		#modal-card.flipped {
		  transform: rotateY(180deg);
		}
		#close-button {
		  display: none;
		  margin-top: 20px;
		  padding: 10px 20px;
		  background-color: #8e44ad;
		  color: white;
		  border: none;
		  border-radius: 30px;
		  font-size: 1rem;
		  cursor: pointer;
		  transition: background 0.3s;
		}
		#close-button:hover {
		  background-color: #732d91;
		}

		#close-button:active {
		  transform: scale(0.95);
		}
		.close-button {
		  background-color: #8e44ad;
		  color: white;
		  border: none;
		  padding: 10px 20px;
		  font-size: 1rem;
		  border-radius: 25px;
		  margin-top: 20px;
		  cursor: pointer;
		  transition: background 0.3s ease;
		  animation: fadeIn 0.5s ease-in;
		  margin-bottom: 10px;
		}

		.close-button:hover {
		  background-color: #732d91;
		}

		.fade-in {
		  animation: fadeIn 0.5s ease-in;
		}

		@keyframes fadeIn {
		  from { opacity: 0; transform: translateY(-10px); }
		  to { opacity: 1; transform: translateY(0); }
		}
		
		#views-section .content-box {
		  max-height: 300px;
		  overflow-y: auto;
		  margin-top: 20px;
		  border: 1px solid #eee;
		  border-radius: 10px;
		  background: #fafafa;
		}

		.highlight-action {
		  color: var(--primary-color);
		  font-weight: bold;
		  text-decoration: underline;
		}

		.close-button.show {
		  display: inline-block;
		}

		.card-text-front {
		  text-align: center;
		  margin-top: 15px;
		  background: rgba(255, 255, 255, 0.9);
		  padding: 10px;
		  border-radius: 10px;
		  width: 100%;
		}

		.modern-table {
		  width: 100%;
		  border-collapse: collapse;
		  margin-top: 20px;
		}

		.modern-table th, .modern-table td {
		  border: 1px solid #ccc;
		  padding: 8px;
		  text-align: center;
		}

		.modern-table th {
		  background-color: #f2f2f2;
		}



		/* Responsive */
        @media (max-width: 768px) {

		  .container {
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;
			padding: 0 15px;
			text-align: center;
		  }

		  .about-section {
			padding: 2rem 1rem;
		  }

		  .about-content {
			flex-direction: column;
			align-items: center;
			gap: 2rem;
		  }

		  .about-image {
			margin: 0 auto;
			max-width: 90%;
		  }

		  .about-text {
			text-align: right;
			width: 100%;
		  }
		  .about-text h2 {
			  text-align: right;
			}
		  .about-text h2::after {
			left: 50%;
			transform: translateX(-50%);
		  }

		  .quote {
			text-align: right;
			border-right: none;
			border-left: 4px solid var(--primary-color);
			border-radius: 10px 0 0 10px;
		  }
		  .products-section h3 {
			  text-align: center;
			}
		  .products-grid {
			grid-template-columns: 1fr;
			gap: 1.5rem;
			justify-content: center;
		  }

		 
		  .closing-message {
			padding: 2rem 1rem;
			text-align: center !important;
			align-items: center;
			justify-content: center;
		  }

		 	  
		  
		  .social-links {
			  justify-content: center;
			}
		.footer-content {
			flex-direction: column;
			text-align: right !important;
		    align-items: flex-start !important;
		  }

		  .footer-column {
			text-align: right !important;
			align-items: flex-start !important;
		  }

		  .footer-column h3::after {
			left: 50%;
			transform: translateX(-50%);
		  }

		  .footer-links {
			padding: 0;
			text-align: right !important;
			align-items: flex-start !important;
		  }

		  .footer-links li {
			text-align: right !important;
			align-items: flex-start !important;
		  }		  
		 		 
		}
        
        /* Animation */
        @keyframes float {
            0% {
                transform: translateY(0px);
            }
            50% {
                transform: translateY(-10px);
            }
            100% {
                transform: translateY(0px);
            }
        }
        
        .float-animation {
            animation: float 4s ease-in-out infinite;
        }
		
		.switch {
		  position: relative;
		  display: inline-block;
		  width: 60px;
		  height: 34px;
		}
		.switch input { display: none; }
		.slider {
		  position: absolute;
		  cursor: pointer;
		  top: 0; left: 0;
		  right: 0; bottom: 0;
		  background-color: #ccc;
		  transition: .4s;
		  border-radius: 34px;
		}
		.slider:before {
		  position: absolute;
		  content: "";
		  height: 26px; width: 26px;
		  left: 4px; bottom: 4px;
		  background-color: white;
		  transition: .4s;
		  border-radius: 50%;
		}
		input:checked + .slider {
		  background-color: #8e44ad;
		}
		input:checked + .slider:before {
		  transform: translateX(26px);
		}
		
		.spinner {
		  border: 4px solid #f3f3f3;
		  border-top: 4px solid #8e44ad;
		  border-radius: 50%;
		  width: 18px;
		  height: 18px;
		  animation: spin 0.9s linear infinite;
		  display: inline-block;
		  vertical-align: middle;
		  margin-left: 5px;
		}
		@keyframes spin {
		  0% { transform: rotate(0deg); }
		  100% { transform: rotate(360deg); }
		}
		
		.user-avatar {
		  width: 40px;
		  height: 40px;
		  border-radius: 50%;
		  overflow: hidden;
		  border: 2px solid var(--primary-color);
		  display: flex;
		  align-items: center;
		  justify-content: center;
		  flex-shrink: 0;
		  background-color: #eee;
		}

		.user-avatar img.avatar-img {
		  width: 100%;
		  height: 100%;
		  object-fit: cover;
		  display: block;
		}

		@media (max-width: 480px) {
		  .hero .btn {
			display: block;
			width: 100%;
			margin: 10px 0;
			text-align: center;
		  }
		   .modal-content {
			width: calc(100% - 40px);
			padding: 16px;
			margin: 20px auto;
		  }	  
		}

		       
        .form-control {
            width: 100%;
            padding: 12px 15px;
            border: 2px solid #ddd;
            border-radius: 8px;
            font-size: 1rem;
            transition: var(--transition);
            font-family: 'Heebo', sans-serif;
        }
        
        .form-control:focus {
            border-color: var(--primary-color);
            outline: none;
            box-shadow: 0 0 0 3px rgba(155, 89, 182, 0.2);
        }
        
        textarea.form-control {
            min-height: 150px;
            resize: vertical;
        }
		
		
		/* אנימציה */
		@keyframes fadeInScale {
		  from { opacity: 0; transform: scale(0.9) translate(-50%, -50%); }
		  to   { opacity: 1; transform: scale(1) translate(-50%, -50%); }
		}

		.spinner_contact {
		  border: 4px solid #f3f3f3;
		  border-top: 4px solid #8e44ad;
		  border-radius: 50%;
		  width: 18px;
		  height: 18px;
		  animation: spin_contact 0.9s linear infinite;
		  display: inline-block;
		  vertical-align: middle;
		}

		@keyframes spin_contact {
		  0% { transform: rotate(0deg); }
		  100% { transform: rotate(360deg); }
		}
		
		
		/* Search Section */
        .search-section {
            background-color: white;
            border-radius: 20px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            padding: 2rem;
            margin-bottom: 3rem;
        }
        
        .search-options {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }
        
        .search-title {
            font-size: 1.5rem;
            color: var(--primary-color);
            margin-bottom: 1rem;
            text-align: center;
        }
        
        .search-description {
            text-align: center;
            margin-bottom: 2rem;
        }
        
        .search-methods {
            display: flex;
            flex-wrap: wrap;
            gap: 2rem;
            justify-content: center;
            margin-bottom: 2rem;
        }
        
        .search-method {
            flex: 1;
            min-width: 250px;
            max-width: 350px;
            background-color: var(--light-color);
            padding: 1.5rem;
            border-radius: 15px;
            text-align: center;
            cursor: pointer;
            transition: var(--transition);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
            position: relative;
            overflow: hidden;
        }
        
        .search-method::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 5px;
            background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
            transition: var(--transition);
        }
        
        .search-method:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        }
        
        .search-method.active {
            background-color: rgba(155, 89, 182, 0.1);
        }
        
        .search-method i {
            font-size: 2.5rem;
            color: var(--primary-color);
            margin-bottom: 1rem;
            transition: var(--transition);
        }
        
        .search-method:hover i {
            transform: scale(1.1);
        }
        
        .search-method h3 {
            font-size: 1.3rem;
            margin-bottom: 0.5rem;
            color: var(--dark-color);
        }
        
        .search-method p {
            color: #666;
            font-size: 0.9rem;
        }
        
        .search-form {
            display: none;
            max-width: 600px;
            margin: 0 auto;
            padding: 1.5rem;
            background-color: var(--light-color);
            border-radius: 15px;
        }
        
        .search-form.active {
            display: block;
            animation: fadeIn 0.5s ease;
        }
        
        .form-group {
            margin-bottom: 1.5rem;
        }
        
        .form-group label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 500;
            color: var(--dark-color);
        }
                
        .form-submit {
            text-align: center;
        }
		
		/* Random Card Section */
        .random-card-section {
            text-align: center;
            margin-top: 4rem;            
            padding: 2rem;
            background-color: white;
            border-radius: 20px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        }
        
        .random-card-section h2 {
            font-size: 2rem;
            color: var(--primary-color);
            margin-bottom: 1.5rem;
        }
        
        .random-card-section p {
            max-width: 700px;
            margin: 0 auto 2rem;
        }
		
		/* Card Grid */
        .card-grid-section {
            margin-top: 3rem;
        }
        
        .card-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 2rem;
            margin-top: 2rem;
        }
        
        .card-item {
		  perspective: 1000px;
		  width: 300px;
		  height: 450px;
		  margin: 20px auto;
		  cursor: pointer;
		}	
        
        .card-pattern {
            position: absolute;
            width: 100%;
            height: 100%;
            background-image: url('https://www.transparenttextures.com/patterns/cubes.png');
            opacity: 0.1;
            border-radius: 15px;
        }
        
        .card-modal {
			display: none;
			position: fixed;
			top: 0;
			left: 0;
			width: 100vw;
			height: 100vh;
			background: rgba(0, 0, 0, 0.6);
			z-index: 9999;
			align-items: center;
			justify-content: center;
			overflow: hidden;
			transition: all 0.3s ease-in-out;
		  }

		  .card-modal.show {
			display: flex;
			animation: fadeIn 0.3s ease-in-out;
		  }
		.card-modal.show .modal-content {
            transform: scale(1);
        }
		
		 .modal-actions {
			display: flex;
			justify-content: center;
			gap: 15px;
			margin-top: 20px;
		  }

		  .modal-actions button {
			padding: 10px 20px;
			font-size: 1rem;
			border-radius: 25px;
			border: none;
			cursor: pointer;
			transition: all 0.3s ease;
		  }

		  .modal-actions .btn {
			background: #8e44ad;
			color: #fff;
		  }

		  .modal-actions .btn-outline {
			background: #fff;
			color: #8e44ad;
			border: 2px solid #8e44ad;
		  }

		  .modal-actions .btn:hover {
			background: #732d91;
		  }

		  .modal-actions .btn-outline:hover {
			background: #f8f2fc;
		  }
		
		.purchase-button-wrapper {
		  text-align: center;
		  margin-top: 2.5rem;
		}

		.btn-purchase {
		  background: linear-gradient(to right, #8e44ad, #9b59b6);
		  color: white;
		  padding: 14px 36px;
		  font-size: 1.1rem;
		  border-radius: 40px;
		  text-decoration: none;
		  font-weight: bold;
		  box-shadow: 0 6px 18px rgba(142, 68, 173, 0.3);
		  transition: all 0.3s ease;
		  display: inline-block;
		}

		.btn-purchase:hover {
		  transform: scale(1.05);
		  box-shadow: 0 8px 24px rgba(142, 68, 173, 0.4);
		}
		
	

/* מוסתר כברירת מחדל דרך ה-attribute */
/* מוסתר כברירת מחדל */
#purchase-section[hidden] { display: none !important; }

/* אנימציית הופעה (על גבי העיצוב של .random-card-section שקיים כבר) */
.purchase-section { 
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s ease, transform .35s ease;
}
.purchase-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* אם ההורה Grid/Flex – שומרים על מרכז */
#cards-container > #purchase-section{
  grid-column: 1 / -1;   /* לוקח שורה מלאה בגריד */
  justify-self: center;  /* מרכז בגריד */
  align-self: start;
  flex: 0 1 auto;        /* לא נמתח אם ההורה Flex */
}

/* כפתור */
.purchase-button-wrapper{ margin-top: 1.25rem; }

.btn.btn-purchase{
  display:inline-block;
  padding: 12px 28px;
  border-radius: 30px;
  background: linear-gradient(to right, var(--primary-color, #8e44ad), var(--secondary-color, #9b59b6));
  color:#fff;
  text-decoration:none;
  font-weight:500;
  box-shadow: 0 6px 18px rgba(142,68,173,.28);
  transition: transform .2s ease, box-shadow .2s ease;
  border:none;
  cursor:pointer;
}
.btn.btn-purchase:hover{
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(142,68,173,.36);
}
/* FORCE: ורוד בהיר לבלוק הרכישה */
#purchase-section.random-card-section{
  background-color: #ffe6f2 !important;   /* ורוד */
  border: 2px solid #ffd1e6 !important;   /* גבול עדין */
}

/* אם יש אלמנטים פנימיים שמקבלים רקע לבן ממקום אחר, נבטל להם רקע */
#purchase-section.random-card-section > *{
  background: transparent !important;
}

/* החזית והגב יפעלו עם flip */
.card{
  position: relative;
  transform-style: preserve-3d;
  transition: transform .6s ease;
  cursor: pointer;

  /* מידות זמניות עד שהתמונה נטענת (JS יעדכן לגודל הטבעי) */
  /* width: 240px;
  height: 320px; */
}
/* שני הצדדים ממלאים את הקלף */
.card-front, .card-back{
  position:absolute;
  inset:0;
  border-radius:16px;
  overflow:hidden;
  backface-visibility:hidden;
  -webkit-backface-visibility:hidden;
}

/* חשוב: לא חותכים – רואים את כל התמונה */
.card-front img,
.card-back img{
  width:100%;
  height:100%;
  object-fit: contain;   /* מציג את כל הקלף בלי Crop */
  display:block;
  background:#fff;       /* רקע מאחורי פסי "Letterbox" (אם יש) */
}

.card-front{ transform: rotateY(0); }
.card-back{ transform: rotateY(180deg); }
.card.flipped{ transform: rotateY(180deg); }

/* תווית "לחצי לסיבוב" (אם משתמשים) */
.flip-hint{
  position: absolute; left:50%; bottom:10px; transform:translateX(-50%);
  padding:6px 12px; border-radius:9999px;
  background: rgba(255,255,255,.9); color:#7a2d83; font-size:.95rem; line-height:1;
  box-shadow:0 4px 12px rgba(0,0,0,.12); pointer-events:none; direction:rtl;
  transition: opacity .25s ease, transform .25s ease;
}
.card.flipped .flip-hint{ opacity:0; transform: translate(-50%,6px); }


.flip-hint{
  bottom: 100px;                 /* היה 10px */
  pointer-events: none;
  /* אנימציית הבהוב עדינה */
  animation: flipHintPulse 1.8s ease-in-out infinite;
}

/* אפקט הבהוב/פולס עדין */
@keyframes flipHintPulse {
  0%, 100% { opacity: 1; filter: drop-shadow(0 0 0 rgba(0,0,0,0.0)); }
  50%      { opacity: .55; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15)); }
}

/* רווחים בין קלפים */
#card-grid{
  /* אם ההורה כבר Flex או Grid – זה יעבוד בשניהם */
  gap: 4px !important;          /* היה ~16px → עכשיו חצי */
  row-gap: 8px !important;      /* לביטחון אם יש הגדרה קודמת */
  column-gap: 8px !important;
  padding-inline: 2px;          /* פחות רווח מהקצוות */
  margin-bottom: 1px;           /* פחות רווח מתחת לגריד */
}

.card-item{ width: clamp(220px, 18vw, 240px); }

/* הקטן אוטומטית במסכים צרים כדי שלא "ישבר" הפריסה */
@media (max-width: 600px){
  .card{
    width: 42vw !important;
    height: 56vw !important;   /* יחס 3:4 משוער כדי לשמור פרופורציות */
  }
}



