@import url('./constants.css');

/* Sayfa Arka Planı */
body {
    /*background-image: url('../../images/pattern2.png');*/
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: left 20%;
}

body {
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: left 20%;
    font-family: "Poppins", sans-serif;
    color: #111827;
}

/* 📦 Menü Container */
.menu-container {
    padding: 80px 5%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}


/* 🧭 Menü Header */
.menu-header {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 20px;
}

/* 🔍 Search Container */
.search-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    height: 45px;
    border-radius: 10px;
}

.search-input-wrapper:focus-within {
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    color: #333;
    padding: 0 10px;
}

.search-input::placeholder {
    color: #999;
    font-weight: 400;
}

.search-icon {
    color: #666;
    font-size: 18px;
    transition: color 0.3s ease;
}

.search-input-wrapper:focus-within .search-icon {
    color: #007bff;
}

.search-clear {
    color: #999;
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.search-clear:hover {
    color: #666;
    background: rgba(0, 0, 0, 0.1);
}

/* Search Results */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 15px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-top: 8px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.search-loading {
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.search-items {
    padding: 10px 0;
}

.search-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background: rgba(0, 123, 255, 0.1);
}

.search-item-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 15px;
    background: #f5f5f5;
}

.search-item-content {
    flex: 1;
}

.search-item-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    font-size: 14px;
}

.search-item-description {
    color: #666;
    font-size: 12px;
    line-height: 1.4;
}

.search-item-price {
    color: #007bff;
    font-weight: 600;
    font-size: 14px;
    margin-left: 10px;
}

.search-no-results {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .search-container {
        max-width: 100%;
    }

    .search-input-wrapper {
        padding: 10px 16px;
    }

    .search-input {
        font-size: 14px;
    }

    .search-results {
        max-height: 300px;
    }
}

/* 🗂️ Sekme Kutusu */
.tab_box {
    display: flex;
    align-items: center;
    white-space: nowrap;
    width: 100%;
    overflow-x: auto;
    padding: 8px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    gap: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.tab_box::-webkit-scrollbar {
    display: none;
}

.tab_box,
.tab_box .tab_btn {
    user-select: none;
}

/* 🏷️ Sekme Butonları */
.tab_box .tab_btn {
    min-width: 130px;
    height: auto;
    padding: 10px 18px;
    border-radius: 9999px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    text-align: center;
    background-color: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
    transition: all 0.25s ease;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.tab_box .tab_btn:hover {
    background-color: #f9fafb;
    color: #111827;
}

.tab_box .tab_btn.active {
    background-color: #111827;
    color: white;
    border-color: #111827;
    box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.15);
}

/* 📂 İçerik Kutusu */
.content_box .content {
    display: none;
}

.content_box .content.active {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}



.content_box .content.active .product-card-link:only-child {
    width: 60% !important;
}

/* 🔍 Arama Alanı */
.search-container {
    height: 42px;
    display: flex;
    justify-content: end;
    align-items: center;
    margin-right: 20px;
}

.search-input {
    border: none;
    padding: 10px 16px;
    font-size: 0.95rem;
    width: 280px;
    color: #111827;
    font-family: "Poppins", sans-serif;
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-input:focus {
    outline: none;
}

.search-icon {
    width: 20px;
    height: 20px;
    color: #6b7280;
}

/* 📱 Responsive Yapı */
@media (max-width: 1200px) {
    .tab_box .tab_btn {
        min-width: 120px;
    }
    .product-info .product-title {
        font-weight: 700;
        font-size: 10PX !important;
        color: #111827;
        margin-bottom: 8px;
    }
    .product-button {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: auto;
        padding: 0 10px 10px 10px;
        flex-wrap: wrap;
        GAP: 5PX;
    }
    .product-button .share {
        width: 100% !important;

    }
    .product-button .add {
        width: 100% !important;
    }

}



@media (max-width: 992px) {
    .menu-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
        .menu-container {
            padding: 60px 5%;
        }

    .search-container {
        width: 100%;
        margin-bottom: 12px;
    }

    .search-input {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .tab_box .tab_btn {
        min-width: 100px;
        font-size: 0.85rem;
        padding: 8px 14px;
    }
    .content_box .content.active {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 547px) {
    .content_box .content.active {
        gap: 20px !important;
        justify-content: center;
    }

    .tab_box {
        gap: 8px;
    }

    .tab_box .tab_btn {
        font-size: 0.8rem;
    }
}

@media (max-width: 1000px) {
    .content_box .content.active {
        gap: 20px !important;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(260px, 2fr));
    }
}



/* 1300px - 1504px arası - 4 kart */
@media (min-width: 1300px) and (max-width: 1504px) {
    .content_box .content.active {
        display: flex !important;
        gap: 13px;
        flex-wrap: wrap;
    }
    .product-card-link {
        min-width: 240px; /* Kartların minimum genişliği */
        flex-shrink: 0;
    }
}

/* 1505px ve üzeri - 4 kart */
@media (min-width: 1505px) and (max-width: 1600px) {
    .content_box .content.active {
        display: flex !important;
        gap: 20px;
        flex-wrap: wrap;
    }
    .product-card-link {

        min-width: 250px;
        flex-shrink: 0;
    }
}

/* 1200-1299px arası - 3 kart (mevcut yapı) */
@media (min-width: 1200px) and (max-width: 1445px) {
    .content_box .content.active {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 0;


    }

    .product-card{ margin-bottom:10px;margin-right:10px;}
}



/* 768-991px arası - 2 kart */
@media (min-width: 768px) and (max-width: 991px) {
    .content_box .content.active {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 547-767px arası - 2 kart */
@media (min-width: 547px) and (max-width: 767px) {
    .content_box .content.active {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 0-546px - 1 kart */
@media (max-width: 546px) {
    .content_box .content.active {
        grid-template-columns: 1fr;
    }
}


/*paylaş*/
.copy-section {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-direction: row;
    align-items: center;
}

.copy-section input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

.copy-section button {
    padding: 8px 14px;
    background-color: #69b42e;
    border: none;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.copy-section button:hover {
    background-color: #45a049;
}


.share-links {
    display: flex;
    justify-content: space-around;
    padding-top: 10px;
}

.share-links a {
    color: #333;
    transition: transform 0.2s ease;
}

.share-links a:hover {
    transform: scale(1.2);
}

.share-links .whatsapp { color: #25d366; }
.share-links .facebook { color: #1877f2; }
.share-links .twitter { color: #000000; }

.share-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.share-modal.hidden {
    display: none;
}

.share-modal-content {
    background: white;
    padding: 20px;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    animation: popIn 0.3s ease;
    position: relative;
}

.share-modal .close-btn {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 22px;
    cursor: pointer;
}

.share-links a {
    display: block;
    margin: 10px 0;
    padding: 10px;
    text-align: center;
    background: #f0f0f0;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

@keyframes popIn {
    0% { transform: scale(0.7); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}


