:root {
   --partner-green: #2a8144;
    --partner-green-dark: #216335;
    --partner-green-light: #f0f7f2;
    --accent-orange: #e67e22;
    --text-dark: #2c2c2c;
    --border-color: #eee;
}

.shop-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px 60px;
}

.shop-header {
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}
.shop-header h1 {
    color: var(--partner-green);
    margin: 0 0 5px;
}
.shop-subtitle {
    color: #777;
    margin: 0;
}

.subtitle-container {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    width: 100%;
    margin-top: 10px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.shop-cart-link-large {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--partner-green);
    color: #ffffff;
    width: 60px;  
    height: 60px; 
    border-radius: 8px; 
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(42, 129, 68, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 24px; 
}

.shop-cart-link-large:hover {
    transform: scale(1.1);
    background-color: var(--partner-green-dark);
    box-shadow: 0 8px 25px rgba(42, 129, 68, 0.3);
    filter: brightness(1.1);
}

.shop-cart-link-large .cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-orange);
    color: white;
    font-size: 13px;
    font-weight: 800;
    height: 30px;
    padding: 0 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

@media (max-width: 480px) {
    .shop-cart-link-large {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

.shop-layout {
    display: flex;
    gap: 40px;
}

.shop-sidebar {
    width: 250px;
    flex-shrink: 0;
}
.sidebar-block h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--partner-green);
}
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}
.category-list li {
    border-bottom: 1px solid var(--border-color);
}
.category-list li:last-child { border-bottom: none; }

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
    font-size: 0.95rem;
}
.category-list a:hover, .category-list a.active {
   background-color: var(--partner-green);
    color: #fff;
}
.category-list a i { font-size: 0.8rem; opacity: 0.5; }
.category-list a:hover i, .category-list a.active i { opacity: 1; }

/* --- Сітка товарів --- */
.shop-main {
    flex-grow: 1;
}


.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.product-card {
    border-radius: 16px; 
    overflow: hidden;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
    border: 1px solid transparent; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    border-color: var(--partner-green-light);
}

.product-thumb {
    position: relative;
    height: 220px; 
    width: 100%;
    overflow: hidden;
    border-bottom: 1px solid #f0f0f0; 
}

.product-thumb a.thumb-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative; 
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    object-position: center;
    transition: transform 0.6s ease;
}

.product-card:hover .product-thumb img {
    transform: scale(1.08);
}

.card-overlay {
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0); 
    display: flex;
    align-items: flex-end; 
    justify-content: flex-end; 
    padding: 15px;
    opacity: 1; 
    transition: all 0.3s;
    pointer-events: none; 
}

.btn-action {
    width: 45px;
    height: 45px;
    background: #fff;
    color: var(--partner-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transform: translateY(5px); 
    opacity: 1; 
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto; 
    font-size: 1.1rem;
}

.product-card:hover .btn-action {
    opacity: 1;
    transform: translateY(0);
    background: var(--partner-green);
    color: #fff;
}

.product-details {
    padding: 15px;
    background: #fff;
}

.title-price-row {
    display: flex;
    justify-content: space-between; 
    align-items: flex-start; 
    gap: 10px;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    flex-grow: 1; 
}

.product-title a {
    text-decoration: none;
    color: var(--partner-green-dark);
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card:hover .product-title a {
    color: var(--partner-green);
}

.price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--partner-green);
    white-space: nowrap; 
    background: var(--partner-green-light); 
    padding: 4px 8px;
    border-radius: 6px;
    margin-top: -2px; 
}

@media (max-width: 768px) {
    .btn-action {
        opacity: 1; 
        transform: translateY(0);
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .price {
        font-size: 0.95rem;
        padding: 2px 6px;
    }
}
/* Кнопка */
.btn-partner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #fff;
    color: var(--partner-blue);
    border: 1px solid var(--partner-blue);
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-partner:hover {
    background-color: var(--partner-green-dark);
    color: #fff;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
}
.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}
.page-link:hover, .page-link.active {
   background-color: var(--partner-green);
    border-color: var(--partner-green);
    color: #fff;
}

@media (max-width: 900px) {
    .shop-layout {
        flex-direction: column;
    }
    .shop-sidebar {
        width: 100%;
    }
    .category-list {
        display: flex;
        flex-wrap: wrap; 
    }
    .category-list li {
        border-bottom: none;
        border-right: 1px solid var(--border-color);
        flex-grow: 1;
        text-align: center;
    }
    .category-list a {
        justify-content: center;
    }
    .category-list a i { display: none; }
}

.shop-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--partner-green-light);
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid rgba(42, 129, 68, 0.2);
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.partner-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.top-bar-text h1, .back-to-shop-title {
    margin: 0;
    font-size: 1.5rem;
    color: var(--partner-green);
}

.back-to-shop {
    display: block;
    font-weight: bold;
    font-size: 1.2rem;
    color: #333;
}

.shop-subtitle {
    margin: 5px 0 0 0;
    color: #666;
    font-size: 0.9rem;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -12px;
    background: #333;
    color: #fff;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
}

/* Стилі для адаптивності */
@media (max-width: 768px) {
    .shop-top-bar {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .top-bar-left {
        flex-direction: column;
        gap: 10px;
    }
}