/**
 * Frontend Styles
 *
 * @package EcomEg_ByDopamine
 */

/* ========================================
   Price Display Enhancements
   ======================================== */

.ecom-eg-price-display {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 10px 0;
}

.ecom-eg-price-regular {
    font-size: 14px;
    color: #999;
}

.ecom-eg-price-regular del {
    text-decoration: line-through;
}

.ecom-eg-price-sale {
    font-size: 16px;
    color: #666;
    font-weight: 500;
}

.ecom-eg-price-upsell {
    font-size: 20px;
    color: #667eea;
    font-weight: 700;
}

.ecom-eg-savings-badge {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Stock Badge */
.ecom-eg-stock-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #ff6b6b;
    color: #fff;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ========================================
   AJAX Upsell Button Styles
   ======================================== */

.ecom-eg-upsell-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.ecom-eg-upsell-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.ecom-eg-upsell-button.loading {
    opacity: 0.7;
    cursor: wait;
}

.ecom-eg-upsell-button.loading .ecom-eg-cart-icon {
    animation: spin 1s linear infinite;
}

.ecom-eg-upsell-button.added {
    background: linear-gradient(135deg, #51cf66 0%, #37b24d 100%);
}

.ecom-eg-upsell-button.error {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
}

.ecom-eg-upsell-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ecom-eg-upsell-button.disabled:hover {
    transform: none;
    box-shadow: none;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Notification Styles */
.ecom-eg-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 999999;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    max-width: 300px;
}

.ecom-eg-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.ecom-eg-notification.success {
    border-left: 4px solid #51cf66;
}

.ecom-eg-notification.error {
    border-left: 4px solid #ff6b6b;
}

/* ========================================
   WhatsApp Button Styles
   ======================================== */

.ecom-eg-whatsapp-wrapper {
    margin: 20px 0;
}

.ecom-eg-whatsapp-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background-color: #25D366;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.ecom-eg-whatsapp-button:hover {
    background-color: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.ecom-eg-whatsapp-button--rounded {
    border-radius: 50px;
}

.ecom-eg-whatsapp-button--minimal {
    background-color: transparent;
    color: #25D366 !important;
    border: 2px solid #25D366;
}

.ecom-eg-whatsapp-button--minimal:hover {
    background-color: #25D366;
    color: #ffffff !important;
}

.ecom-eg-whatsapp-icon {
    width: 20px;
    height: 20px;
}

.ecom-eg-whatsapp-button--loop {
    padding: 8px 16px;
    font-size: 14px;
}

/* ========================================
   Free Shipping Notice
   ======================================== */

.ecom-eg-free-shipping-notice {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.ecom-eg-free-shipping-notice--achieved {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.ecom-eg-free-shipping-notice__content {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.ecom-eg-free-shipping-notice__icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.ecom-eg-free-shipping-notice__text {
    font-size: 16px;
    font-weight: 600;
}

.ecom-eg-free-shipping-notice__progress {
    height: 8px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.ecom-eg-free-shipping-notice__progress-bar {
    height: 100%;
    background-color: #ffffff;
    transition: width 0.3s ease;
}

/* ========================================
   Upsell Sections
   ======================================== */

.ecom-eg-upsells {
    margin: 40px 0;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.ecom-eg-upsells__title {
    font-size: 28px;
    margin-bottom: 20px;
    text-align: center;
}

.ecom-eg-upsells__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.ecom-eg-upsell-item {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ecom-eg-upsell-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.ecom-eg-upsell-item__image {
    position: relative;
    overflow: hidden;
}

.ecom-eg-upsell-item__image img {
    width: 100%;
    height: auto;
    display: block;
}

.ecom-eg-upsell-item__badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ff6b6b;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.ecom-eg-upsell-item__content {
    padding: 20px;
}

.ecom-eg-upsell-item__title {
    font-size: 16px;
    margin: 0 0 10px;
}

.ecom-eg-upsell-item__title a {
    color: inherit;
    text-decoration: none;
}

.ecom-eg-upsell-item__description {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.ecom-eg-upsell-item__price {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
}

.ecom-eg-upsell-item__discount {
    display: inline-block;
    margin-left: 8px;
    font-size: 14px;
    color: #ff6b6b;
}

.ecom-eg-upsell-item__button {
    width: 100%;
    text-align: center;
}

/* ========================================
   Bundle Sections
   ======================================== */

.ecom-eg-bundles {
    margin: 40px 0;
}

.ecom-eg-bundles__title {
    font-size: 28px;
    margin-bottom: 20px;
    text-align: center;
}

.ecom-eg-bundles__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.ecom-eg-bundle-item {
    background-color: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.ecom-eg-bundle-item:hover {
    border-color: #000000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.ecom-eg-bundle-item__header {
    position: relative;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.ecom-eg-bundle-item__badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ffd700;
    color: #000000;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.ecom-eg-bundle-item__content {
    padding: 20px;
}

.ecom-eg-bundle-item__title {
    font-size: 20px;
    margin: 0 0 10px;
}

.ecom-eg-bundle-item__description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.ecom-eg-bundle-item__products {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.ecom-eg-bundle-item__product {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.ecom-eg-bundle-item__product img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.ecom-eg-bundle-item__pricing {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.ecom-eg-bundle-item__original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 16px;
}

.ecom-eg-bundle-item__price {
    font-size: 24px;
    font-weight: 700;
    color: #000000;
}

.ecom-eg-bundle-item__savings {
    background-color: #ff6b6b;
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.ecom-eg-bundle-item__button {
    width: 100%;
}

/* ========================================
   Mix & Match Builder
   ======================================== */

.ecom-eg-mix-match {
    margin: 40px 0;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 12px;
}

.ecom-eg-mix-match__title {
    font-size: 32px;
    text-align: center;
    margin-bottom: 10px;
}

.ecom-eg-mix-match__subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

.ecom-eg-mix-match__tiers {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.ecom-eg-mix-match__tier {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    min-width: 150px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ecom-eg-mix-match__tier-badge {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.ecom-eg-mix-match__tier-title {
    font-size: 14px;
    margin-bottom: 4px;
}

.ecom-eg-mix-match__tier-discount {
    color: #ff6b6b;
    font-weight: 700;
    font-size: 18px;
}

.ecom-eg-mix-match__builder {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

.ecom-eg-mix-match__selected {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.ecom-eg-mix-match__selected-title {
    font-size: 20px;
    margin-bottom: 15px;
}

.ecom-eg-mix-match__selected-items {
    min-height: 100px;
    margin-bottom: 20px;
}

.ecom-eg-mix-match__calculator {
    border-top: 2px solid #e0e0e0;
    padding-top: 15px;
    margin-bottom: 20px;
}

.ecom-eg-mix-match__calculator-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.ecom-eg-mix-match__calculator-row--discount {
    color: #ff6b6b;
}

.ecom-eg-mix-match__calculator-row--total {
    font-size: 20px;
    font-weight: 700;
    border-top: 2px solid #000000;
    padding-top: 10px;
    margin-top: 10px;
}

.ecom-eg-mix-match__add-bundle {
    width: 100%;
}

.ecom-eg-mix-match__add-bundle:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ecom-eg-mix-match__products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.ecom-eg-mix-match-product {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.ecom-eg-mix-match-product:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.ecom-eg-mix-match-product__image img {
    width: 100%;
    height: auto;
    display: block;
}

.ecom-eg-mix-match-product__content {
    padding: 15px;
}

.ecom-eg-mix-match-product__title {
    font-size: 14px;
    margin: 0 0 10px;
}

.ecom-eg-mix-match-product__price {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
}

.ecom-eg-mix-match-product__add {
    width: 100%;
}

/* ========================================
   Recommendations
   ======================================== */

.ecom-eg-recommendations,
.ecom-eg-wardrobe-recommendations {
    margin: 40px 0;
}

.ecom-eg-recommendations__title,
.ecom-eg-wardrobe-recommendations__title {
    font-size: 28px;
    margin-bottom: 10px;
    text-align: center;
}

.ecom-eg-recommendations__subtitle,
.ecom-eg-wardrobe-recommendations__subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
}

.ecom-eg-recommendations__grid,
.ecom-eg-wardrobe-recommendations__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.ecom-eg-recommendation-item {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.ecom-eg-recommendation-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.ecom-eg-recommendation-item__image {
    position: relative;
}

.ecom-eg-recommendation-item__image img {
    width: 100%;
    height: auto;
    display: block;
}

.ecom-eg-recommendation-item__badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #4CAF50;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.ecom-eg-recommendation-item__content {
    padding: 20px;
}

.ecom-eg-recommendation-item__title {
    font-size: 16px;
    margin: 0 0 10px;
}

.ecom-eg-recommendation-item__title a {
    color: inherit;
    text-decoration: none;
}

.ecom-eg-recommendation-item__reason {
    font-size: 13px;
    color: #4CAF50;
    font-style: italic;
    margin-bottom: 10px;
}

.ecom-eg-recommendation-item__price {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
}

.ecom-eg-recommendation-item__button {
    width: 100%;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .ecom-eg-upsells__grid,
    .ecom-eg-bundles__grid,
    .ecom-eg-recommendations__grid,
    .ecom-eg-wardrobe-recommendations__grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .ecom-eg-mix-match__builder {
        grid-template-columns: 1fr;
    }
    
    .ecom-eg-mix-match__selected {
        position: static;
    }
}

