/* ─── WooCommerce Custom Styles ──────────────────────────────── */

/* Shop Archive Loop Grid (Modern & Elegant 6-Column) */
.sat-woo-wrapper ul.products {
  display: grid !important;
  grid-template-columns: repeat(6, 1fr) !important;
  gap: 30px 15px !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 40px 0 !important;
}

.sat-woo-wrapper ul.products::before,
.sat-woo-wrapper ul.products::after { display: none !important; }

.sat-woo-wrapper ul.products li.product {
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Shop Card Style Tweaks for 6-Col Density (Daha Kibar Görünüm) */
.sat-woo-wrapper .sat-premium-card__title {
  font-size: 0.88rem !important;
  height: 2.8em;
}
.sat-woo-wrapper .sat-premium-card__price {
  font-size: 1rem !important;
}
.sat-woo-wrapper .sat-premium-card__add {
  width: 32px;
  height: 32px;
  font-size: 0.75rem;
}

/* Responsiveness for shop grid */
@media (max-width: 1400px) {
  .sat-woo-wrapper ul.products { grid-template-columns: repeat(5, 1fr) !important; }
}
@media (max-width: 1100px) {
  .sat-woo-wrapper ul.products { grid-template-columns: repeat(4, 1fr) !important; }
}
@media (max-width: 991px) {
  .sat-woo-wrapper ul.products { grid-template-columns: repeat(3, 1fr) !important; gap: 20px 12px !important; }
}
@media (max-width: 576px) {
  .sat-woo-wrapper ul.products { grid-template-columns: repeat(2, 1fr) !important; gap: 15px 10px !important; }
  .sat-woo-wrapper .sat-premium-card__info { padding: 10px; }
}

/* Other WooCommerce Styles */

/* Single Product Layout Modernization (Zorlayıcı Kibar Görünüm) */
body.single-product .sat-single-product__main {
    display: flex !important;
    gap: 50px !important;
    margin-top: 30px;
    align-items: flex-start;
}

body.single-product .sat-single-product__gallery {
    flex: 0 0 50% !important; /* Perfect Split */
    max-width: 50% !important;
    width: 50% !important;
}

body.single-product .sat-single-product__summary {
    flex: 0 0 50% !important;
    max-width: 50% !important;
}

/* Elegant Image & Lightbox Strategy */
.woocommerce-product-gallery {
    position: relative;
    border-radius: 20px;
    background: #fff;
    padding: 5px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.woocommerce-product-gallery__image {
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid #f5f5f5;
    margin: 0 !important;
}
.woocommerce-product-gallery__image img {
    max-height: 800px !important; /* Scale Fix */
    object-fit: contain !important;
    width: 100% !important;
    background: #fff;
    cursor: zoom-in;
}

/* Force Disable the Giant Magnifier (Kaba Büyüteç Tamamen Kapatıldı) */
body.single-product .zoomImg {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Lightbox (PhotoSwipe) UI Polishing */
.pswp__bg { background: rgba(0, 0, 0, 0.85) !important; backdrop-filter: blur(5px); }
.pswp__img { border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.pswp__button--close { background: var(--c-accent) !important; border-radius: 50%; width: 44px; height: 44px; top: 20px; right: 20px; }

/* Summary Details & Manuel Excerpt */
body.single-product .summary .product_title {
    font-size: 1.8rem !important;
    font-weight: 900 !important;
    color: #222 !important; /* Dark Title */
    margin: 0 0 10px 0 !important;
}

body.single-product .summary .price {
    margin: 15px 0 25px 0;
    font-size: 1.6rem;
    font-weight: 800;
    color: #2d7d2d !important; /* Brand Green */
}

/* Sale Price Styles */
body.single-product .summary .price del { color: #999 !important; font-size: 1.1rem !important; font-weight: 400 !important; }
body.single-product .summary .price ins { color: #ff6600 !important; text-decoration: none !important; }

/* Manually Placed Excerpt Styling */
body.single-product .summary .woocommerce-product-details__short-description {
    margin-top: 40px !important;
    padding-top: 30px !important;
    border-top: 1px dashed #ddd !important;
    font-size: 1.05rem;
    color: #444;
    line-height: 1.8;
}

/* Responsive Single Product Force - Dropping only on Tablet/Mobile */
@media (max-width: 768px) {
    body.single-product .sat-single-product__main { flex-direction: column !important; gap: 30px !important; }
    body.single-product .sat-single-product__gallery, 
    body.single-product .sat-single-product__summary { 
        flex: 0 0 100% !important; max-width: 100% !important; width: 100% !important; 
    }
}

/* Quantity Counter Restoration */
.sat-qty {
    display: inline-flex;
    align-items: center;
    background: #fff;
    border-radius: 50px;
    padding: 4px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.sat-qty:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border-color: #ccc;
}

.sat-qty:focus-within {
    border-color: var(--c-accent);
    box-shadow: 0 0 0 4px rgba(255,102,0,0.12);
}

.sat-qty__btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 50%;
    color: #444;
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
}

.sat-qty__btn:hover {
    background: var(--c-accent);
    color: #fff;
    transform: scale(1.05);
}

.sat-qty__btn:active {
    transform: scale(0.92);
}

.sat-qty__input {
    width: 48px;
    border: none !important;
    background: transparent !important;
    text-align: center;
    font-weight: 800;
    font-size: 1.15rem;
    color: #222;
    -moz-appearance: textfield;
    padding: 0 !important;
    outline: none !important;
}

.sat-qty__input::-webkit-outer-spin-button,
.sat-qty__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Single Product Add to Cart Row */
.cart {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 35px;
}

.single_add_to_cart_button {
    flex: none !important; /* Don't stretch too much */
    background: var(--c-accent) !important;
    color: #fff !important;
    padding: 12px 30px !important; /* Compact & Kibar */
    font-size: 1rem !important;
    font-weight: 800 !important;
    border-radius: 50px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    box-shadow: 0 6px 20px rgba(255,102,0,0.2) !important;
}

.single_add_to_cart_button:hover {
    background: var(--c-accent-d) !important;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255,102,0,0.4) !important;
}

/* ─── WooCommerce Tabs ────────────────────────────────────── */
.woocommerce-tabs {
    margin: 80px 0 60px !important;
    border-top: 1px solid #eee;
    padding-top: 40px;
}

.woocommerce-tabs ul.tabs {
    display: flex !important;
    justify-content: center !important;
    gap: 40px !important;
    margin-bottom: 40px !important;
    padding: 0 !important;
    list-style: none !important;
    border: none !important;
    background: transparent !important;
}

.woocommerce-tabs ul.tabs::before,
.woocommerce-tabs ul.tabs::after { display: none !important; }

.woocommerce-tabs ul.tabs li {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    position: relative !important;
}

.woocommerce-tabs ul.tabs li a {
    font-family: var(--font-h) !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: #999 !important;
    padding: 10px 0 !important;
    transition: color 0.3s !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.woocommerce-tabs ul.tabs li.active a {
    color: var(--c-primary) !important;
}

.woocommerce-tabs ul.tabs li::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--c-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.woocommerce-tabs ul.tabs li.active::after {
    transform: scaleX(1);
}

.woocommerce-Tabs-panel {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.05rem;
    color: #555;
    line-height: 1.8;
}

.woocommerce-Tabs-panel h2 { display: none; }

/* ─── Product Meta ────────────────────────────────────────── */
.product_meta {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px dashed #eee;
    font-size: 0.88rem;
    color: #777;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product_meta > span {
    display: block;
    color: #888;
}

.product_meta b, 
.product_meta strong {
    color: #222;
    font-weight: 700;
    margin-right: 5px;
}

.product_meta a {
    color: var(--c-primary);
    font-weight: 700;
    transition: color 0.2s;
}

.product_meta a:hover {
    color: var(--c-accent);
}

/* ─── Homepage Area Rescue (Horizontal Fix) ───────────────── */
.sat-mid-rescue {
    padding: 70px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    overflow: hidden;
}

.sat-mid-rescue__inner {
    display: flex !important;
    align-items: stretch !important; /* Stretch columns to reach 910px height */
    justify-content: center;
    gap: 30px !important;
    max-width: 1650px;
    margin: 0 auto;
    padding: 0 15px;
    flex-wrap: nowrap;
}

@media (max-width: 1100px) {
    .sat-mid-rescue__inner { flex-direction: column !important; align-items: center !important; gap: 30px !important; }
}

.sat-mid-col { width: 530px; min-width: 530px; height: 910px; display: flex !important; flex-direction: column !important; justify-content: flex-end !important; }
.sat-mid-col--center { flex: none; width: 530px; }

.sat-mid-nav { display: flex; align-items: center; gap: 10px; height: 40px; margin-bottom: 20px; }
.sat-mid-nav--right { justify-content: flex-end; }
.sat-mid-nav span { font-size: 1rem; font-weight: 800; color: #333; }

.sat-mid-nav__btns { display: flex; gap: 8px; }
.sat-mid-nav__btns button {
    width: 38px; height: 38px; border-radius: 50%;
    border: 2px solid #84c547; color: #84c547;
    background: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; cursor: pointer; transition: all 0.3s;
}
.sat-mid-nav__btns button:hover { background: #84c547; color: #fff; transform: scale(1.1); }

/* Swipe Height matches grid precisely */
.swiper.sat-mid-swiper-l, .swiper.sat-mid-swiper-r { height: 850px; margin: 0 !important; }

/* Banner (850x530px - The Grid Mirror) */
.sat-as-banner { 
    border-radius: 20px; 
    overflow: hidden; 
    position: relative; 
    width: 530px;
    height: 850px; 
    box-shadow: var(--shadow-xl); 
    display: block;
    margin: 0 !important;
}

.sat-as-banner__bg-link { display: block; height: 100%; width: 100%; }
.sat-as-banner__img { width: 100%; height: 100%; object-fit: cover; }
.sat-as-banner__overlay { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 40px; background: linear-gradient(to top, rgba(0,0,0,0.6), transparent 70%); }
.sat-as-banner__title { color: #fff; font-size: 1.8rem; margin-bottom: 25px; text-align: center; font-weight: 800; line-height: 1.2; }
.sat-as-banner__menu { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.sat-as-banner__btn { background: #fff; color: #333; padding: 14px; border-radius: 50px; font-weight: 800; font-size: 0.85rem; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.sat-as-banner__btn:hover { background: var(--c-accent); color: #fff; transform: translateY(-3px); }

/* Product Cards (250x400px Original Ratio) */
.sat-product-mini { 
    background: #fff; border-radius: 20px; padding: 20px; border: 1px solid #f0f0f0; 
    position: relative; transition: all 0.3s; display: flex; flex-direction: column; 
    width: 250px;
    height: 400px; 
    box-sizing: border-box;
    margin: 0;
}
.sat-mid-grid {
    display: grid;
    grid-template-columns: 250px 250px;
    grid-template-rows: 400px 400px;
    gap: 50px 30px !important; /* Force 50px Vertical Gap */
    width: 530px;
    height: 850px;
}
.sat-product-mini__image { 
    height: 240px; /* Increased from 210px for better fit */
    margin-bottom: 20px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    background: #fff;
    border-radius: 10px;
}
.sat-product-mini__image img { 
    max-width: 100%; 
    max-height: 100%; 
    object-fit: contain !important; /* Force fit without cropping */
    margin: 0 auto; 
    transition: transform 0.3s;
}
.sat-product-mini:hover .sat-product-mini__image img { transform: scale(1.05); }
.sat-product-mini__title { font-size: 0.95rem !important; font-weight: 800 !important; color: #222 !important; line-height: 1.3; height: 2.6em; overflow: hidden; margin-bottom: 10px !important; }
.sat-product-mini__price { font-size: 1.15rem !important; font-weight: 900 !important; color: #e74c3c; margin-top: auto; }
.sat-product-mini__add { 
    position: absolute; bottom: 20px; right: 20px;
    width: 42px; height: 42px; background: #84c547 !important; color: #fff !important; 
    border-radius: 50% !important; display: flex !important; align-items: center !important; 
    justify-content: center !important; box-shadow: 0 5px 15px rgba(132,197,71,0.4) !important; 
    z-index: 10 !important; cursor: pointer; transition: 0.3s;
}
.sat-product-mini__add:hover { transform: scale(1.1); background: #71af39 !important; }
/* ─── Utilities ────────────────────────────────────────── */
.sat-dotted-path {
    background-image: radial-gradient(#d0e0c0 1px, transparent 1px);
    background-size: 20px 20px;
    height: 100px;
    width: 100%;
}

.sat-texture-wood {
    background-image: url('https://www.transparenttextures.com/patterns/pinstriped-suit.png'); /* Placeholder for wood texture */
    background-color: #f7f9f2;
}

/* ==========================================================================
   MOBILE FIXES FOR MIDDLE RESCUE GRID (VITRIN)
   ========================================================================== */

/* ==========================================================================
   MOBILE FIXES FOR MIDDLE RESCUE GRID (VITRIN)
   ========================================================================== */
@media (max-width: 768px) {
    .sat-mid-col, .sat-mid-col--center, .sat-as-banner {
        width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: 400px !important;
    }
    
    .swiper.sat-mid-swiper-l, .swiper.sat-mid-swiper-r {
        height: auto !important;
    }
    
    .sat-mid-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        grid-template-rows: auto !important;
        gap: 15px !important;
    }
    
    .sat-as-banner {
        height: 450px !important;
    }
    
    /* Make the buttons wrap inside the banner on mobile if they are too wide */
    .sat-as-banner__menu {
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
    .sat-as-banner__btn {
        font-size: 14px !important;
        padding: 8px 16px !important;
        flex: 1 1 40% !important;
        text-align: center !important;
    }
}

@media (max-width: 480px) {
    .sat-mid-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        grid-template-rows: auto auto !important;
        gap: 10px !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
    
    .sat-as-banner {
        height: 350px !important;
    }
    
    /* Shrink the mini product cards for mobile 2-column view */
    .sat-product-mini {
        width: 100% !important;
        height: auto !important;
        min-height: 220px !important;
        padding: 8px !important;
    }

/* Remove square constraint from vitrin images so bottles fit perfectly without side gaps */
.sat-mid-grid .sat-premium-card__img {
    aspect-ratio: auto !important;
    padding: 0 !important;
    background: transparent !important;
}
.sat-mid-grid .sat-premium-card__img img {
    object-fit: contain !important;
}
    
    .sat-product-mini__image {
        height: 100px !important;
        margin-bottom: 8px !important;
    }
    
    .sat-product-mini__title {
        font-size: 0.85rem !important;
        height: 2.8em !important;
        margin-bottom: 5px !important;
    }
    
    .sat-product-mini__price {
        font-size: 1rem !important;
    }
    
    .sat-product-mini__add {
        width: 32px !important;
        height: 32px !important;
        bottom: 10px !important;
        right: 10px !important;
        font-size: 0.8rem !important;
    }
}

/* ==========================================================================
   HIDE MIDDLE RESCUE BANNER ON MOBILE (Keep Sliders 2x2)
   ========================================================================== */
@media (max-width: 768px) {
    .sat-mid-col--center {
        display: none !important;
    }
}


/* Final single-product layout. Kept here so it can be cached instead of
   being emitted as a duplicate inline <style> block on every product view. */
html body.single-product .sat-single-product__main {
    display: flex !important;
    flex-flow: row nowrap !important;
    gap: 60px !important;
    align-items: flex-start !important;
    width: 100% !important;
    max-width: 1360px !important;
    margin: 40px auto !important;
    padding: 0 40px !important;
}

html body.single-product .sat-single-product__gallery {
    flex: 0 0 40% !important;
    width: 40% !important;
    max-width: 480px !important;
    display: block !important;
    background: #fff !important;
    border-radius: 8px !important;
    position: relative !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
}

html body.single-product .woocommerce-product-gallery,
html body.single-product .woocommerce-product-gallery__wrapper,
html body.single-product .woocommerce-product-gallery__image {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
}

html body.single-product .woocommerce-product-gallery__image img {
    width: 100% !important;
    height: auto !important;
    max-height: 800px !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

html body.single-product .sat-single-product__summary {
    flex: 1 !important;
    padding-left: 20px !important;
    margin: 0 !important;
    display: block !important;
}

.woocommerce div.product .summary .price {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    margin: 25px 0 !important;
    font-size: 2.1rem !important;
    color: #222 !important;
}

.woocommerce div.product .summary .price ins,
.woocommerce div.product .summary .price > .amount:last-child {
    color: #ff4d4d !important;
    text-decoration: none !important;
    font-weight: 800 !important;
}

html body.single-product .single_add_to_cart_button {
    background-color: #ff5a5f !important;
    color: #fff !important;
    padding: 16px 50px !important;
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    border-radius: 50px !important;
    box-shadow: 0 10px 30px rgba(255, 90, 95, 0.4) !important;
    border: 0 !important;
}

html body.single-product .brand-name {
    color: #84c547 !important;
    font-weight: 700 !important;
    margin-bottom: 10px !important;
    display: block !important;
    text-transform: uppercase !important;
    font-size: 0.85rem !important;
}

@media (max-width: 900px) {
    html body.single-product .sat-single-product__main {
        flex-direction: column !important;
        padding: 0 20px !important;
    }

    html body.single-product .sat-single-product__gallery,
    html body.single-product .sat-single-product__summary {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
    }
}
