/* 
 * Новый дизайн для страницы коллекций VivaDeLuxe
 * Файл для интеграции в Joomla сайт
 * Загрузить через FTP в: /templates/vivadelux/css/collections-new-style.css
 */

/* ========================================
   1. ОСНОВНОЙ КОНТЕЙНЕР КОЛЛЕКЦИЙ
   ======================================== */

.shopcategory .categorywrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Заголовок страницы */
.shopcategory .heading h1 {
  font-size: 3.5rem;
  font-weight: 300;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4rem;
  color: #333;
}

.shopcategory .breadcrumbs {
  text-align: center;
  margin-bottom: 4rem;
  font-size: 0.9rem;
  color: #999;
}

/* ========================================
   2. ШАХМАТНОЕ РАСПОЛОЖЕНИЕ КОЛЛЕКЦИЙ
   ======================================== */

.shopcategory .subcategories ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: block;
}

.shopcategory .subcategories ul li {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 4rem !important;
  align-items: center !important;
  padding: 5rem 0 !important;
  border-bottom: 1px solid #e5e5e5 !important;
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
}

/* Первая коллекция (четная) - картинка слева, текст справа */
.shopcategory .subcategories ul li:nth-child(even) a.category {
  grid-column: 1 !important;
  grid-row: 1 !important;
}

.shopcategory .subcategories ul li:nth-child(even) .collection-content {
  grid-column: 2 !important;
  grid-row: 1 !important;
}

/* Вторая коллекция (нечетная) - текст слева, картинка справа */
.shopcategory .subcategories ul li:nth-child(odd) a.category {
  grid-column: 2 !important;
  grid-row: 1 !important;
}

.shopcategory .subcategories ul li:nth-child(odd) .collection-content {
  grid-column: 1 !important;
  grid-row: 1 !important;
}

.shopcategory .subcategories ul li:first-child {
  padding-top: 2rem;
}

.shopcategory .subcategories ul li:last-child {
  border-bottom: none;
}

/* ========================================
   3. ИЗОБРАЖЕНИЯ КОЛЛЕКЦИЙ
   ======================================== */

.shopcategory .subcategories ul li a.category {
  display: block;
  position: relative;
  overflow: hidden;
}

.shopcategory .subcategories ul li a.category img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 3/4 !important;
  max-height: 800px !important;
  object-fit: cover !important;
  display: block !important;
  transition: transform 0.7s ease !important;
}

.shopcategory .subcategories ul li a.category:hover img {
  transform: scale(1.05);
}

/* Убираем темный overlay */
.shopcategory .subcategories ul li .bg_area {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* ========================================
   4. ТЕКСТОВЫЙ КОНТЕНТ
   ======================================== */

.shopcategory .subcategories ul li .collection-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.5rem;
  position: relative;
  z-index: 1;
}

/* Заголовок коллекции */
.shopcategory .subcategories ul li .collection-content h2 {
  font-size: 3rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 1.5rem 0;
  color: #333;
}

/* Описание коллекции */
.shopcategory .subcategories ul li .collection-content .collection-description {
  font-size: 1.125rem;
  line-height: 1.75;
  color: #666;
  margin-bottom: 2rem;
  max-width: 450px;
}

/* Кнопка DISCOVER */
.shopcategory .subcategories ul li .collection-content .collection-button {
  display: inline-block;
  padding: 0.75rem 2rem;
  border: 1px solid #333;
  background: transparent;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 0.875rem;
  font-weight: 500;
  width: fit-content;
  position: relative;
  z-index: 2;
}

.shopcategory .subcategories ul li .collection-content .collection-button:hover {
  background: #333;
  color: #fff;
}

/* ========================================
   5. NEWSLETTER СЕКЦИЯ
   ======================================== */

.acy_block {
  background: #f9f9f9;
  padding: 4rem 2rem;
  margin-top: 4rem;
}

.acymailing_module .acy-title {
  font-size: 2rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  margin-bottom: 1rem;
  color: #333;
}

.acymailing_module .acy-sub {
  text-align: center;
  color: #666;
  margin-bottom: 2rem;
  font-size: 1rem;
}

.acymailing_module .acymailing_form {
  max-width: 500px;
  margin: 0 auto;
}

.acymailing_module .acyfield_email input {
  width: 100%;
  padding: 0.75rem 1.5rem;
  border: 1px solid #ccc;
  background: white;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.acymailing_module .acysubbuttons input[type="submit"] {
  width: 100%;
  padding: 0.75rem 2rem;
  background: #333;
  color: white;
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.acymailing_module .acysubbuttons input[type="submit"]:hover {
  background: #555;
}

/* ========================================
   6. АДАПТИВНОСТЬ
   ======================================== */

/* Планшеты */
@media (max-width: 1024px) {
  .shopcategory .heading h1 {
    font-size: 2.5rem;
  }
  
  .shopcategory .subcategories ul li {
    gap: 2rem;
    padding: 3rem 0;
  }
  
  .shopcategory .subcategories ul li .collection-content h2 {
    font-size: 2.5rem;
  }
  
  .shopcategory .subcategories ul li .collection-content .collection-description {
    font-size: 1rem;
  }
}

/* Мобильные */
@media (max-width: 768px) {
  .shopcategory .subcategories ul li {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    padding: 2rem 0 !important;
    height: auto !important;
  }

  .shopcategory .subcategories ul li a.category {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 2 / 3 !important;
    overflow: hidden !important;
  }
  
  /* На мобильных все коллекции в одном порядке: сначала изображение, потом текст */
  .shopcategory .subcategories ul li:nth-child(even) a.category,
  .shopcategory .subcategories ul li:nth-child(odd) a.category {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }
  
  .shopcategory .subcategories ul li:nth-child(even) .collection-content,
  .shopcategory .subcategories ul li:nth-child(odd) .collection-content {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }
  
  .shopcategory .subcategories ul li .collection-content {
    position: relative !important;
    z-index: 1 !important;
  }
  
  .shopcategory .subcategories ul li a.category img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    max-height: none !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
  }

  /* Override potential global template rule on mobile */
  .shopcategory .categorywrap li img {
    height: auto !important;
  }
  
  .shopcategory .heading h1 {
    font-size: 2rem;
  }
  
  .shopcategory .subcategories ul li .collection-content h2 {
    font-size: 2rem;
  }
  
  .shopcategory .subcategories ul li .collection-content .collection-description {
    font-size: 0.95rem;
  }
  
  .acymailing_module .acy-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .shopcategory .heading h1 {
    font-size: 1.75rem;
  }
  
  .shopcategory .subcategories ul li .collection-content h2 {
    font-size: 1.5rem;
  }
  
  .shopcategory .subcategories ul li {
    padding: 1.5rem 0;
  }
}

/* ========================================
   7. СЕТКА ТОВАРОВ - VirtueMart Integration
   ======================================== */

/* Исправление overflow для родительских контейнеров */
.shopcategory .invite_aboutUs,
.shopcategory .main_content_wrapper,
.shopcategory .categorywrap {
    overflow: visible !important;
}

.shopcategory .productView {
    margin-top: 40px;
    display: flex;
    flex-wrap: wrap;
    
    /* Full-bleed: выход за пределы контейнера 1200px */
    width: 100vw !important;
    box-sizing: border-box;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

.shopcategory .productwrapper {
    width: 33.33%;
    padding: 0 10px;
    margin-bottom: 30px;
    box-sizing: border-box;
}

.shopcategory .product {
    background: #fff;
    position: relative;
}

.shopcategory .productimage {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 2/3;
}

.shopcategory .productimage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.shopcategory .product:hover .productimage img.catNewImg {
    opacity: 0;
}

.shopcategory .productimage .other_image {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.shopcategory .product:hover .productimage .other_image.num_image_1 {
    opacity: 1;
}

.shopcategory .category_title {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
}

.shopcategory .add_to_favorites {
    cursor: pointer;
    font-size: 24px;
    color: #fff;
    text-shadow: 0 0 3px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.shopcategory .add_to_favorites:hover {
    transform: scale(1.2);
}

.shopcategory .add_to_favorites.deleted {
    opacity: 0.5;
}

.shopcategory .category_hover {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.shopcategory .product:hover .category_hover {
    transform: translateY(0);
}

.shopcategory .product_title {
    font-size: 16px;
    font-weight: 400;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #333;
}

.shopcategory .product_price {
    font-size: 18px;
    color: #666;
    margin: 0;
}

/* Pagination and Load More */
.shopcategory .vm-pagination {
    display: none;
}

.shopcategory .CategoryMore {
    text-align: center;
    margin: 40px 0;
    cursor: pointer;
}

.shopcategory .CategoryMoreWrap {
    display: inline-block;
    padding: 15px 40px;
    border: 1px solid #666;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.shopcategory .CategoryMoreWrap:hover {
    background: #666;
    color: #fff;
}

.shopcategory .spinner {
    display: none;
    text-align: center;
    margin: 20px 0;
}

.clear_both_desktop,
.clear_both_mob {
    clear: both;
}

/* Адаптив для сетки товаров */
@media screen and (max-width: 1024px) {
  .shopcategory .productwrapper {
    width: 50%;
  }
}

@media screen and (max-width: 768px) {
  .shopcategory .categorywrap {
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
  
  .shopcategory .productwrapper {
    width: 50%;
    padding: 0 5px;
  }
  
  .shopcategory .productView {
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
  
  .shopcategory .product_title {
    font-size: 14px;
  }
  
  .shopcategory .product_price {
    font-size: 16px;
  }
}

@media screen and (max-width: 480px) {
  .shopcategory .categorywrap {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  .shopcategory .productwrapper {
    width: 100%;
    padding: 0 4px;
  }
  
  .shopcategory .productView {
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}
