/* Body Home Plugin Styles */
/* Todas las clases tienen prefijo bh- para evitar conflictos */

.body-home-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.body-home-container {
    position: relative;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #FFFFFF;
    color: #212121;
}

.body-home-container.light-mode {
    --bh-bg-white: #FFFFFF;
    --bh-bg-grey: #F5F5F5;
    --bh-bg-light-grey: #FAFAFA;
    --bh-text-dark: #212121;
    --bh-text-grey: #757575;
    --bh-text-light-grey: #BDBDBD;
    --bh-border-grey: #E0E0E0;
}

.body-home-container.dark-mode {
    --bh-bg-white: #1E1E1E;
    --bh-bg-grey: #2D2D2D;
    --bh-bg-light-grey: #383838;
    --bh-text-dark: #FFFFFF;
    --bh-text-grey: #B0B0B0;
    --bh-border-grey: #404040;
    background-color: #1E1E1E;
    color: #FFFFFF;
}

/* Header */
.bh-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background-color: var(--bh-bg-white, #FFFFFF);
    border-bottom: 1px solid var(--bh-border-grey, #E0E0E0);
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.bh-toolbar {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 16px;
    gap: 16px;
}

.bh-dark-mode-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bh-dark-mode-toggle i {
    font-size: 38px;
    color: var(--bh-text-grey, #757575);
}

.bh-toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.bh-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.bh-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bh-border-grey, #E0E0E0);
    transition: 0.3s;
    border-radius: 34px;
}

.bh-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.bh-toggle-switch input:checked + .bh-toggle-slider {
    background-color: #FFC107;
}

.bh-toggle-switch input:checked + .bh-toggle-slider:before {
    transform: translateX(22px);
}

.bh-spacer {
    flex: 1;
}

.bh-icon-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--bh-text-grey, #757575);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.bh-icon-btn:hover {
    background-color: var(--bh-bg-grey, #F5F5F5);
}

.bh-icon-btn i {
    font-size: 24px;
}

/* Main Content */
.bh-main-content {
    padding: 24px 16px 80px 16px;
    max-width: 100%;
}

/* Hero Section */
.bh-hero-section {
    margin-bottom: 24px;
}

.bh-hero-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    color: var(--bh-text-dark, #212121);
}

.bh-text-primary {
    color: #FFC107;
}

/* Delivery Selector */
.bh-delivery-selector {
display: flex;
  gap: 16px;
  padding: 20px;
  align-items: center;
  border-radius: 16px;
  background: whitesmoke;
  margin: auto;
  align-content: center;
  justify-content: center;
}

.bh-location-btn {
    width: 48px;
    height: 48px;
    border: 2px solid var(--bh-border-grey, #E0E0E0);
    border-radius: 50px;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bh-text-grey, #757575);
    font-size: 24px;
    transition: all 0.3s;
}

.bh-location-btn:hover {
    border-color: #FFC107;
    color: #FFC107;
}

.bh-delivery-info {
}

.bh-delivery-label {
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 2px;
    color: var(--bh-text-dark, #212121);
}

.bh-address-btn {
    background: none;
    border: none;
    color: #FFC107;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    text-align: left;
    font-weight: 500;
}

.bh-address-btn:hover {
    text-decoration: underline;
}

/* Spacing */
.bh-section-spacing {
    height: 16px;
}

.bh-section-spacing-sm {
    height: 4px;
}

/* Section Header */
.bh-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.bh-section-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--bh-text-dark, #212121);
}

.bh-see-all-btn {
    background: none;
    border: none;
    color: #FFC107;
    font-size: 14px;
    cursor: pointer;
    padding: 8px;
    font-weight: 500;
}

.bh-see-all-btn:hover {
    text-decoration: underline;
}

/* Categories Swiper */
.bh-categories-swiper {
    margin-bottom: 16px;
}

.bh-categories-swiper .swiper-slide {
    width: auto;
}

.bh-category-card {
    background-color: var(--bh-bg-grey, #F5F5F5);
    border-radius: 20px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 200px;
}

.bh-category-card:hover {
    background-color: var(--bh-border-grey, #E0E0E0);
    transform: translateY(-2px);
}

.bh-category-avatar {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.bh-category-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bh-category-name {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--bh-text-dark, #212121);
}

/* Banner Swiper */
.bh-banner-swiper {
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: hidden;
}

.bh-banner-image {
    height: auto;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    background: #f1c933;
  border-radius: 20px;
  padding: 10px 30px;
}

.bh-banner-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.bh-banner-swiper .swiper-pagination {
    bottom: 10px;
}

.bh-banner-swiper .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.7);
    opacity: 1;
}

.bh-banner-swiper .swiper-pagination-bullet-active {
    background: #FFC107;
}

/* Products Grid */
.bh-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.bh-product-card {
    background-color: var(--bh-bg-grey, #F5F5F5);
    border-radius: 20px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.bh-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.bh-product-image {
    width: 100%;
    height: 120px;
    margin-bottom: 8px;
    border-radius: 12px;
    overflow: hidden;
}

.bh-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.bh-product-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    min-height: 40px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--bh-text-dark, #212121);
}

.bh-product-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--bh-text-dark, #212121);
}

/* Recommended Swiper */
.bh-recommended-swiper {
    margin-bottom: 16px;
}

.bh-recommended-swiper .swiper-slide {
    width: auto;
    max-width: 85%;
}

.bh-recommended-card {
    background-color: #E8F5E9;
    border-radius: 20px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.3s;
    height: 100%;
}

.bh-recommended-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.bh-recommended-image {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.bh-recommended-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.bh-recommended-info {
    flex: 1;
}

.bh-recommended-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    color: #212121;
}

.bh-recommended-price {
    font-size: 14px;
    font-weight: 700;
    color: #C62828;
}

/* Reviews Swiper */
.bh-reviews-swiper {
    margin-bottom: 16px;
}

.bh-reviews-swiper .swiper-slide {
    width: auto;
    max-width: 85%;
}

.bh-review-card {
    display: flex;
    gap: 16px;
    padding: 16px;
}

.bh-review-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.bh-review-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bh-review-content {
    flex: 1;
}

.bh-review-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
    color: var(--bh-text-dark, #212121);
}

.bh-review-date {
    font-size: 12px;
    color: var(--bh-text-grey, #757575);
    margin-bottom: 8px;
}

.bh-review-text {
    font-size: 14px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--bh-text-dark, #212121);
}

/* Bottom Navigation */
.bh-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #FFC107;
    border-radius: 50px 50px 0 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 4px 16px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.bh-nav-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 28px;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
    min-width: 44px;
}

.bh-nav-btn:hover {
    color: rgba(255, 255, 255, 0.9);
}

.bh-nav-btn.active {
    color: white;
    background-color: rgba(0, 0, 0, 0.1);
}

.bh-nav-btn i {
    font-size: 24px;
}

/* Responsive Design */
@media (min-width: 768px) {
    .bh-main-content {
        max-width: 1300px;
        margin: 0 auto;
    }
    
    .bh-bottom-nav {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .bh-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .bh-main-content {
    }
    
    .bh-bottom-nav {
        max-width: 800px;
    }
    
    .bh-products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Animaciones */
@keyframes bhFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bh-product-card,
.bh-category-card,
.bh-recommended-card,
.bh-review-card {
    animation: bhFadeIn 0.3s ease-out;
}

@keyframes bhSlideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes bhSlideDown {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

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

.bh-la-spin {
    animation: bhSpin 1s linear infinite;
}

/* Toast Notifications */
.bh-toast-notification {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 24px;
    z-index: 10000;
    animation: bhSlideUp 0.3s ease-out;
}

/* Swiper Override para este plugin */
.body-home-wrapper .swiper {
    width: 100%;
    height: 100%;
}

.body-home-wrapper .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}
