/**
 * Packages Grid Styles
 */

/* Recoleta Font Face Declarations */
@font-face {
    font-family: 'Recoleta';
    src: url('../fonts/Recoleta-RegularDEMO.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Recoleta';
    src: url('../fonts/Recoleta SemiBold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Recoleta Alt';
    src: url('../fonts/Recoleta Alt Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Recoleta Alt';
    src: url('../fonts/Recoleta Alt Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Recoleta Alt';
    src: url('../fonts/Recoleta Alt Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Recoleta Alt';
    src: url('../fonts/Recoleta Alt SemiBold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

.twicely-packages-grid {
    padding: 2rem 0;
    background-color: transparent;
    font-family: 'Recoleta', 'Recoleta Alt', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.twicely-packages-grid-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
    font-size: 1.125rem;
}

.twicely-packages-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .twicely-packages-grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .twicely-packages-grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

.twicely-package-card {
    position: relative;
    background: #ffffff;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.twicely-package-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid black;
    border-radius: 25px;
    pointer-events: none;
    z-index: 1;
    box-sizing: border-box;
}

.twicely-package-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.twicely-package-card:hover::before {
    border: 2px solid black;
}

.twicely-package-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Image Section */
.twicely-package-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 aspect ratio */
    overflow: hidden;
    background-color: #f0f0f0;
    border-bottom: 1.5px solid black;
}

.twicely-package-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
}

.twicely-package-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e0e0e0;
    color: #999;
    font-size: 0.875rem;
}

/* Package Availability Status Badge */
.twicely-package-availability-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'Recoleta', 'Recoleta Alt', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid black;
}

.twicely-package-availability-badge.twicely-availability-active {
    background: #d4edda;
    color: #155724;
    border-color: #155724;
}

.twicely-package-availability-badge.twicely-availability-sold {
    background: #fff3cd;
    color: #856404;
    border-color: #856404;
}

.twicely-package-availability-badge.twicely-availability-expired {
    background: #f8d7da;
    color: #721c24;
    border-color: #721c24;
}

.twicely-package-discount-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #a0dbff;
    color: #000000;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    z-index: 2;
    border: 1px solid black;
}


/* Content Section */
.twicely-package-content {
    padding: 1rem 1.25rem 1.25rem;
}

/* Category and Like Row */
.twicely-package-category-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.twicely-package-categories {
    flex: 1;
}

.twicely-package-category-text {
    font-size: 0.8125rem;
    font-weight: 500;
}

/* Main category colors */
.twicely-category-main.twicely-category-for-him {
    color: #0691d7 !important;
}

.twicely-category-main.twicely-category-for-her {
    color: #ff014e !important;
}

.twicely-category-main.twicely-category-biz {
    color: #325d24 !important;
}

.twicely-category-main.twicely-category-general {
    color: #0691d7 !important;
}

/* Secondary category - black */
.twicely-category-secondary {
    color: #000000;
}

/* Separator - black */
.twicely-category-separator {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.twicely-category-separator-icon {
    width: 12px;
    height: 12px;
    color: #000000;
    stroke: currentColor;
    fill: none;
    display: inline-block;
}

.twicely-package-like-btn-inline {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: none;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
}

.twicely-package-like-btn-inline:hover {
    color: #fbbd03;
}

.twicely-package-like-btn-inline:hover .twicely-heart-icon {
    fill: #fbbd03;
    stroke: #fbbd03;
}

.twicely-package-like-btn-inline.is-liked {
    color: #fbbd03;
}

.twicely-package-like-btn-inline.is-liked .twicely-heart-icon {
    fill: #fbbd03 !important;
    stroke: #000000 !important;
    stroke-width: 1.5;
}

.twicely-package-like-btn-inline.is-liked .twicely-heart-icon path {
    fill: #fbbd03 !important;
    stroke: #000000 !important;
    stroke-width: 1.5;
}

.twicely-heart-icon {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    transition: all 0.2s ease;
}

.twicely-like-count-number {
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    color: black;
}

/* Title */
.twicely-package-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Pricing */
.twicely-package-pricing {
    display: flex;
    align-items: baseline;
    margin-bottom: 0.75rem;
    flex-direction: column;
}

.twicely-package-original-price {
    font-size: 0.875rem;
    color: #999;
    text-decoration: line-through;
}

.twicely-package-discounted-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: #273db7
}

/* Owner Info */
.twicely-package-owner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.twicely-package-owner-avatar {
    width: 34px;
    height: 34px !important;
    border-radius: 50%;
    object-fit: cover;
    border-radius: 50% !important;

}

.twicely-package-owner-name {
    font-size: 0.8125rem;
    color: #000000;
}

/* Loading state for inline like button */
.twicely-package-like-btn-inline.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Carousel Styles */
.twicely-packages-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    font-family: 'Recoleta', 'Recoleta Alt', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.twicely-packages-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-top: 10px;
    margin-bottom: 10px;
    padding: 0;
    box-sizing: border-box;
}

.twicely-packages-carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    will-change: transform;
}

.twicely-packages-carousel .twicely-carousel-slide {
    flex-shrink: 0;
    transition: transform 0.3s ease;
    /* Width will be set by JavaScript for proper calculation */
}

.twicely-packages-carousel .twicely-package-card {
    height: 100%;
    width: 100%;
}

/* Carousel Navigation */
.twicely-carousel-prev,
.twicely-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.twicely-carousel-prev:hover,
.twicely-carousel-next:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-50%) scale(1.1);
}

.twicely-carousel-prev:disabled,
.twicely-carousel-next:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.twicely-carousel-prev {
    left: 10px;
}

.twicely-carousel-next {
    right: 10px;
}

.twicely-carousel-prev svg,
.twicely-carousel-next svg {
    width: 20px;
    height: 20px;
    color: #333;
}

/* Responsive Carousel - Always show one slide */
@media (max-width: 1024px) {
    .twicely-packages-carousel {
        padding: 0;
    }
    
    /* Let JavaScript handle width calculation */
    .twicely-packages-carousel .twicely-carousel-slide {
        flex-shrink: 0;
    }
    
    .twicely-carousel-prev,
    .twicely-carousel-next {
        width: 36px;
        height: 36px;
    }
    
    .twicely-carousel-prev svg,
    .twicely-carousel-next svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 768px) {
    .twicely-packages-carousel {
        padding: 0;
    }
    
    /* Let JavaScript handle width calculation */
    .twicely-packages-carousel .twicely-carousel-slide {
        flex-shrink: 0;
    }
    
    .twicely-carousel-prev,
    .twicely-carousel-next {
        width: 32px;
        height: 32px;
    }
    
    .twicely-carousel-prev {
        left: 6px;
    }
    
    .twicely-carousel-next {
        right: 6px;
    }
    
    .twicely-carousel-prev svg,
    .twicely-carousel-next svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .twicely-packages-carousel {
        padding: 0;
    }
    
    /* Let JavaScript handle width calculation */
    .twicely-packages-carousel .twicely-carousel-slide {
        flex-shrink: 0;
    }
    
    .twicely-carousel-prev,
    .twicely-carousel-next {
        width: 28px;
        height: 28px;
    }
    
    .twicely-carousel-prev {
        left: 4px;
    }
    
    .twicely-carousel-next {
        right: 4px;
    }
    
    .twicely-carousel-prev svg,
    .twicely-carousel-next svg {
        width: 14px;
        height: 14px;
    }
}

