/*
 * 2007-2026 PrestaShop
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to http://www.prestashop.com for more information.
 *
 * @author    Felipe Maya
 * @copyright 2007-2026 PrestaShop SA
 * @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 *  International Registered Trademark & Property of PrestaShop SA
 */

.mw-sidepromo-btn {
  position: fixed;
  z-index: 9999;
  cursor: pointer;
  background-color: #e91e63;
  color: white;
  padding: 15px 10px;
  font-weight: bold;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
  z-index:1;
  /* Specific positioning moved to .mw-pos-* classes */
}

.mw-sidepromo-btn:hover {
  background-color: #c2185b;
}

/* Modes logic */
.mw-sidepromo-container {
  display: none;
  /* JS toggles this */
  position: fixed;
  z-index: 10000;
}

/* MODAL MODE (Classic) */
.mw-sidepromo-container.mw-mode-modal {
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.4);
  /* Flex centering */
  display: none;
  /* JS toggles to flex */
  justify-content: center;
  align-items: center;
}

.mw-sidepromo-container.mw-mode-modal .mw-sidepromo-content {
  background-color: #fefefe;
  margin: 0;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 600px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  position: relative;
}

/* PANEL MODE (Slide out) */
/* PANEL MODE (Slide out) */
.mw-sidepromo-container.mw-mode-panel {
  display: block;
  position: fixed;
  background-color: white;
  z-index: 10000;
  transition: transform 0.3s ease-in-out;
  overflow-y: auto;
  /* Specific positioning/dimensions moved to .mw-pos-* classes */
}

.mw-sidepromo-container.mw-mode-panel.active {
  transform: translateX(0);
}

.mw-sidepromo-container.mw-mode-panel .mw-sidepromo-content {
  padding: 20px;
  height: 100%;
}


.mw-sidepromo-close {
  color: #aaa;
  position: absolute;
  /* Changed from float */
  top: 10px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
}

.mw-sidepromo-close:hover,
.mw-sidepromo-close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.mw-sidepromo-body {
  margin-top: 10px;
  text-align: center;
}

.mw-sidepromo-products {
  margin-top: 5px;
  /* Reduced */
  border-top: 1px solid #eee;
  padding-top: 5px;
  /* Reduced */
}

.mw-sidepromo-products h3 {
  margin-top: 5px;
  margin-bottom: 0;
  font-size: 18px;
  /* Slightly larger title */
}

/* Product Layouts Wrapper */
.mw-sidepromo-list-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  /* Reduced */
  gap: 5px;
  /* Add gap for arrows */
}

.mw-mode-panel .mw-sidepromo-list-wrapper {
  /* Ensure it fits in panel */
  width: 100%;
  overflow: hidden;
  /* Prevent horizontal scroll on body */
  justify-content: center;
  /* Force centering */
}

.mw-sidepromo-list {
  width: 100%;
}

/* GRID in MODAL mode (Side by Side) */
.mw-mode-modal .mw-sidepromo-list.mw-layout-grid {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
}

.mw-mode-modal .mw-sidepromo-list.mw-layout-grid .mw-sidepromo-item {
  width: auto;
  flex: 0 1 48%;
  /* 2 per row approx */
  flex-direction: column;
  /* Stack img and text inside the item */
  text-align: center;
}

.mw-mode-modal .mw-sidepromo-list.mw-layout-grid .mw-sidepromo-item img {
  width: 120px;
  /* Larger image */
  margin-right: 0;
  margin-bottom: 10px;
}

/* GRID / LIST (Vertical) */
.mw-sidepromo-list.mw-layout-grid {
  display: flex;
  flex-direction: column;
  /* Vertical stack */
  gap: 15px;
}

.mw-sidepromo-list.mw-layout-grid .mw-sidepromo-item {
  width: 100%;
  /* Full width */
  display: flex;
  /* Horizontal item layout */
  align-items: center;
  text-align: left;
}

.mw-sidepromo-list.mw-layout-grid .mw-sidepromo-item img {
  width: 60px;
  margin-right: 15px;
  margin-bottom: 0;
}

.mw-sidepromo-list.mw-layout-grid .mw-sidepromo-name {
  margin-top: 0;
  white-space: normal;
  /* Allow wrapping */
}

/* SLIDER (Single Item) */
.mw-sidepromo-list.mw-layout-slider {
  display: flex;
  overflow-x: hidden;
  /* Hide scrollbar, use arrows */
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  /* Add snap */
  /* Restrict width for single item center (250 < 350 - arrows) */
  /* Default / Modal Width */
  width: 300px;
  margin: 0 auto;
  padding: 15px;
  /* Add padding so shadow/margin isn't clipped */
}

.mw-sidepromo-list.mw-layout-slider .mw-sidepromo-item {
  flex: 0 0 300px;
  /* Same as container width */
  width: 300px;
  border: none;
  scroll-snap-align: center;
  /* Snap to center */
}

/* Panel Specific Slider Width (240px to fit 350px panel) */
.mw-mode-panel .mw-sidepromo-list.mw-layout-slider {
  width: 240px;
}

.mw-mode-panel .mw-sidepromo-list.mw-layout-slider .mw-sidepromo-item {
  flex: 0 0 240px;
  width: 240px;
}

/* ARROWS */
.mw-slider-arrow {
  cursor: pointer;
  font-size: 24px;
  font-weight: bold;
  user-select: none;
  padding: 0 10px;
  color: #555;
}

.mw-slider-arrow:hover {
  color: #000;
}

/* Alignment inside Modal/Panel */
.mw-sidepromo-content {
  display: flex;
  flex-direction: column;
  position: relative;
  /* Added for absolute close button */
}

.mw-sidepromo-content.mw-align-top {
  justify-content: flex-start;
}

.mw-sidepromo-content.mw-align-center {
  justify-content: center;
}

.mw-sidepromo-content.mw-align-bottom {
  justify-content: flex-end;
}

.mw-sidepromo-body {
  width: 100%;
}

.mw-sidepromo-item {
  border: 1px solid #f1f1f1;
  padding: 10px;
  border-radius: 4px;
  text-align: center;
  background-color: #fff;
  /* Ensure white bg */
  /* Default/Fallback Shadow */
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  margin: 0;
}

/* Modal Specific: Bottom-Right Shadow (Refined: Dist 16px, Size 25px, Opacity 30%) */
.mw-mode-modal .mw-sidepromo-item {
  box-shadow: 12px 10px 25px rgba(0, 0, 0, 0.3);
}

/* Panel Specific: Floating Uniform Shadow & Margins */
.mw-mode-panel .mw-sidepromo-item {
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.15);
  margin: 10px;
  /* Explicit margin for side panel */
}

/* Fix for slider in panel mode: Remove margin to prevent shifting */
.mw-mode-panel .mw-sidepromo-list.mw-layout-slider .mw-sidepromo-item {
  margin: 0;
}

.mw-sidepromo-item img {
  max-width: 100%;
  width: 100%;
  /* Force full width of container */
  height: auto;
  margin-bottom: 10px;
}

.mw-sidepromo-name {
  font-size: 16px;
  /* Increased from 13px */
  white-space: normal;
  /* Allow wrapping */
  /* overflow: hidden; Removed */
  /* text-overflow: ellipsis; Removed */
  margin: 8px 0;
  font-weight: 600;
  line-height: 1.2;
}

.mw-sidepromo-name a:hover {
  text-decoration: underline;
  color: inherit;
}

/* Levitation Effect */
@keyframes mw-float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-8px);
  }

  100% {
    transform: translateY(0px);
  }
}

.mw-levitation {
  animation: mw-float 3s ease-in-out infinite;
}

.mw-sidepromo-price-box {
  margin-bottom: 5px;
}

.mw-sidepromo-old-price {
  text-decoration: line-through;
  color: #999;
  font-size: 14px;
  /* Increased */
  margin-right: 5px;
}

.mw-sidepromo-price {
  color: #e91e63;
  font-weight: bold;
  font-size: 18px;
  /* Increased */
}

.mw-sidepromo-countdown {
  font-size: 14px;
  /* Increased from 11px */
  color: #d32f2f;
  font-weight: bold;
  background: #ffebee;
  padding: 8px;
  /* Increased padding */
  border-radius: 4px;
}

/* Class to remove shadow if option is disabled */
.mw-no-shadow,
#mw-sidepromo-container .mw-sidepromo-item.mw-no-shadow,
.mw-sidepromo-container.mw-mode-modal .mw-sidepromo-item.mw-no-shadow,
.mw-sidepromo-container.mw-mode-panel .mw-sidepromo-item.mw-no-shadow {
  box-shadow: none !important;
  filter: none !important;
  /* Ensure no drop-shadow filter */
}

/* --- TAB POSITIONS --- */

/* RIGHT (Default) */
.mw-pos-right.mw-sidepromo-btn {
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  border-top-left-radius: 5px;
  border-bottom-left-radius: 5px;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
}

.mw-mode-panel.mw-pos-right {
  top: 0;
  right: 0;
  left: auto;
  bottom: auto;
  width: 350px;
  height: 100vh;
  transform: translateX(100%);
}

.mw-mode-panel.mw-pos-right.active {
  transform: translateX(0);
}

/* LEFT */
.mw-pos-left.mw-sidepromo-btn {
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  border-top-right-radius: 5px;
  border-bottom-right-radius: 5px;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
}

.mw-mode-panel.mw-pos-left {
  top: 0;
  left: 0;
  right: auto;
  bottom: auto;
  width: 350px;
  height: 100vh;
  transform: translateX(-100%);
}

.mw-mode-panel.mw-pos-left.active {
  transform: translateX(0);
}

/* TOP */
.mw-pos-top.mw-sidepromo-btn {
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  writing-mode: horizontal-tb;
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.mw-mode-panel.mw-pos-top {
  top: 0;
  left: 0;
  right: 0;
  bottom: auto;
  width: 100%;
  height: 350px;
  max-height: 80vh;
  transform: translateY(-100%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.mw-mode-panel.mw-pos-top.active {
  transform: translateY(0);
}

/* BOTTOM */
.mw-pos-bottom.mw-sidepromo-btn {
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  writing-mode: horizontal-tb;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
}

.mw-mode-panel.mw-pos-bottom {
  top: auto;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 350px;
  max-height: 80vh;
  transform: translateY(100%);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.mw-mode-panel.mw-pos-bottom.active {
  transform: translateY(0);
}

@media (max-width: 750px) {   
.mw-sidepromo-btn {
    padding: 5px 2px;
}
div#mw-sidepromo-btn {
    font-size: 80%;
}
}

.btn-cerrar {
  position: absolute;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: #ffffff;
  color: #333;
  font-size: 20px;
  font-weight: bold;
  line-height: 24px;
  padding: 0;
  top: -21px;
  right: 1px;
  cursor: pointer;
}

.btn-cerrar:hover {
  background: #f2f2f2;
}

@media (min-width: 1200px) {   
.btn-cerrar {
  font-size: 20px;
  line-height: 24px;
  top: -21px;
  right: 1px;
}
}