/* magaza.css - Entegre Mağaza ve YENİ Ürün Kartı Stilleri (V2 Kararlı Sürüm) */

:root{
--mgz-green: #6B8E23;
--mgz-gray: #e9e9e9;
--mgz-dark: #111;
--mgz-radius: 12px;
--mgz-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* Basic reset */
*{box-sizing:border-box}
body { font-family:var(--mgz-font); color:var(--mgz-dark); font-size:14px; margin:0; padding:0; }
a { color:inherit; text-decoration:none; }

/* OUTER WRAPPER & GRID SETUP */
.mgz-wrapper {
display:flex; gap:20px; padding:20px; align-items:flex-start; width:100%;
}
/* Masaüstü 4 ürün/satır */
.mgz-products-wrapper.pk-grid-wrapper {
    display: grid;
    grid-template-columns: repeat(4,1fr); 
    gap: 20px;
    font-family: var(--mgz-font);
}

/* SIDEBAR & TOPBAR STİLLERİ */
.mgz-sidebar{ width:260px; background:#fff; border-radius:var(--mgz-radius); padding:18px; box-shadow:0 8px 30px rgba(0,0,0,0.06); flex-shrink:0; }
.mgz-filter-section{ margin-bottom:25px; }
.mgz-filter-section h4{ font-size:14px; font-weight:600; margin:0 0 10px 0; padding-bottom:6px; border-bottom:1px solid var(--mgz-gray); text-align:left; }
.mgz-category-list{ list-style:none; margin:8px 0 0; padding:0; }
.mgz-category-list li{ margin-bottom:8px; font-size:13px; display:flex; align-items:center; }
.mgz-price-inputs{ display:flex; gap:8px; margin-bottom:8px; }
.mgz-price-inputs input{ flex:1; padding:8px 10px; font-size:13px; border-radius:8px; border:1px solid #dcdcdc; }
.mgz-price-slider{ height:6px; background:var(--mgz-gray); border-radius:6px; position:relative; margin-top:8px; margin-bottom:12px; }
.mgz-price-slider .mgz-track{ position:absolute; top:0; left:0; right:0; height:100%; background:var(--mgz-green); border-radius:inherit; }
.mgz-price-slider .mgz-thumb{ position:absolute; top:50%; transform:translateY(-50%); width:16px; height:16px; border-radius:50%; background:#fff; border:2px solid var(--mgz-green); cursor:pointer; z-index:2; }
.mgz-filter-actions{ display:flex; gap:10px; margin-top:12px; }
.mgz-btn { flex:1; padding:9px 10px; border-radius:8px; border:none; font-size:13px; cursor:pointer; }
.mgz-btn.mgz-filter{ background:var(--mgz-green); color:#fff; }
.mgz-btn.mgz-clear{ background:#f4f4f4; color:var(--mgz-dark); }
.mgz-main { flex:1; display:flex; flex-direction:column; gap:14px; }
.mgz-topbar{ display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
.mgz-total-count { font-size:13px; color:#555; margin-left:6px; }
.mgz-controls { display:flex; align-items:center; gap:10px; }
/* Select genişliği artırıldı */
.mgz-controls select{ 
    padding:8px 10px; font-size:13px; border-radius:8px; border:1px solid #dcdcdc; 
    background:#fff; 
    min-width:160px; /* Varsayılan Sıralama metni için genişlik */
}
.mgz-view-toggle{ display:flex; gap:8px; align-items:center; }
.mgz-view-toggle i{ cursor:pointer; font-size:16px; color:#666; padding:6px; border-radius:8px; }
.mgz-view-toggle i.active{ background:var(--mgz-green); color:#fff; }


/* === YENİ ÜRÜN KARTI STİLLERİ (.pk-card) === */
.mgz-product.pk-card { 
background:#fff; border-radius:14px; padding:14px; text-align:center; position:relative;
box-shadow:0 4px 12px rgba(0,0,0,0.06); transition: transform .2s ease;
}
.mgz-product.pk-card:hover{ transform:translateY(-3px); }

/* Görsel */
.pk-image { position:relative; }
.pk-image img { width:100%; border-radius:12px; }

/* YITH Gizleme */
.yith_wcwl_after_add_to_wishlist .yith-wcwl-message,
.yith-wcwl-notification, .yith-wcwl-popup-notification,
.yith-wcwl-feedback-messages-container,
.mgz-product .hidden-yith-trigger,
.mgz-product .hidden-yith-trigger * {
display: none !important; visibility: hidden !important; width: 0 !important; height: 0 !important;
}

/* Wishlist İkonu (.pk-wishlist-icon) */
.mgz-product .pk-wishlist-icon {
position: absolute; top: 10px; right: 10px; z-index: 10;
width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
background: #fff; border-radius: 50%; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
cursor: pointer; transition: transform .2s ease;
}
.mgz-product .pk-wishlist-icon:hover { transform: scale(1.15); }
.mgz-product .pk-wishlist-icon i { font-size: 18px; line-height: 1; margin: 0; padding: 0; color: #6B8E23; }
.mgz-product .pk-wishlist-icon.added i { color: #6B8E23; }

/* Başlık ve Fiyat */
.pk-title{ font-size:15px; font-weight:500; margin:10px 0 5px; display:block; color:#111; text-decoration:none; }
.pk-price{ font-weight:700; color:#6B8E23; margin-bottom:10px; }

/* Sepete ekle (.pk-add-to-cart) */
.pk-add-to-cart{
width:100%; padding:10px; border:none; border-radius:12px;
background:linear-gradient(45deg,#6B8E23,#000000);
color:#fff; cursor:pointer; display:flex; justify-content:center; align-items:center; gap:6px;
}
.pk-add-to-cart:hover{ opacity:.9; }

/* Spinner */
.pk-add-to-cart .spinner{
width:18px; height:18px; border:2px solid transparent; border-top:2px solid #fff;
border-radius:50%; animation:spin .7s linear infinite; display:none;
}
@keyframes spin{ to{ transform:rotate(360deg); } }


/* === List View (UYARLAMA) === */
.mgz-list-view .mgz-products-wrapper{ 
display:flex; flex-direction:column; gap:14px;
}
.mgz-list-view .mgz-product.pk-card{ 
display:flex; align-items:center; text-align:left; padding:14px;
}
.mgz-list-view .pk-image{
flex-shrink:0; margin-right:14px; width:110px;
}
.mgz-list-view .pk-image img{
width:100%; height:110px; object-fit:cover; margin-bottom:0; border-radius:8px;
}
.mgz-list-view .pk-add-to-cart{
width: 150px; margin-left: auto;
}
.mgz-list-view .pk-title,
.mgz-list-view .pk-price {
text-align:left; margin-top:0; margin-bottom:0;
}


/* === Toast (#pk-toast) === */
#pk-toast{
position:fixed; top:50%; left:50%; transform:translate(-50%,-60%); background:#fff;
padding:18px 22px; border-radius:12px; display:flex; flex-direction:column; align-items:center;
gap:8px; box-shadow:0 4px 20px rgba(0,0,0,0.15); opacity:0; transition:.3s;
min-width:320px; z-index:999999;
}
#pk-toast.show{ opacity:1; transform:translate(-50%,-50%); }
.pk-toast-inner{ display:flex; align-items:center; gap:8px; }
.check{ font-size:18px; }
.msg{ font-family:Inter,sans-serif; font-size:14px; }
.toast-progress{ width:0%; height:4px; border-radius:3px; transition:width 2.5s linear; align-self:stretch; }


/* === Responsiveness === */
@media(max-width:1200px){ .mgz-products-wrapper.pk-grid-wrapper{ grid-template-columns: repeat(3,1fr); } } /* 4 -> 3 */
@media(max-width:1024px){
.mgz-wrapper{ gap:16px; }
.mgz-sidebar{ width:220px; }
.mgz-products-wrapper.pk-grid-wrapper{ grid-template-columns: repeat(3,1fr); }
}
@media(max-width:768px){
.mgz-wrapper{ flex-direction:column; padding:16px; }
.mgz-sidebar{ width:100%; order:2; }
.mgz-products-wrapper.pk-grid-wrapper{ grid-template-columns: repeat(2,1fr); order:1; } 
.mgz-list-view .mgz-product.pk-card{ flex-direction:column; align-items:center; text-align:center; padding:14px; }
.mgz-list-view .pk-image{ margin-right: 0; margin-bottom: 12px; width: 100%; }
.mgz-list-view .pk-add-to-cart{ width: 100%; margin: 12px auto 0 auto; }
}
@media(max-width:480px){
.mgz-products-wrapper.pk-grid-wrapper{ grid-template-columns: repeat(2,1fr); gap: 15px; } 
#pk-toast{ min-width:85%; padding:20px; }
}
@media(max-width:320px){
.mgz-products-wrapper.pk-grid-wrapper{ grid-template-columns: 1fr; }
}