/* Products Collection Page Styles */

.products-collection {
    padding: 60px 0;
    background-color: #fff;
}

/* Ensure all cards have same structure for alignment */

/* Force all cards to same height using grid */
.products-collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: stretch;
}

.products-collection-grid > .product-collection-card {
    display: grid;
    grid-template-rows: 400px 1fr;
    align-items: stretch;
}

.collection-title {
    font-size: 48px;
    font-weight: 700;
    color: #000;
    margin-bottom: 50px;
    text-align: center;
}

.product-collection-card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: grid;
    grid-template-rows: 400px 1fr;
    min-height: 0;
}

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

.product-collection-image {
    position: relative;
    width: 100%;
    height: 400px;
    background-color: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.product-collection-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
}

.product-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2;
}

.product-badge.preorder {
    background-color: #FF1493;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-badge.bestseller {
    background-color: #10B981;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-badge.final-sale {
    background-color: #EF4444;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-badge.sale {
    background-color: #7DD3FC;
    color: #000;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-collection-info {
    padding: 25px;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    box-sizing: border-box;
}

/* Create a wrapper for content that can grow */
.product-collection-info-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Ensure proper spacing and no overlap */
.product-collection-info {
    gap: 0;
}

.product-collection-info > .product-features {
    flex: 0 1 auto;
    margin-bottom: 25px !important;
    max-width: 100%;
    overflow: hidden;
}

/* Ensure price and button are at bottom and aligned */
.product-collection-info > .product-price {
    margin-top: auto !important;
    margin-bottom: 20px !important;
    flex-shrink: 0;
    width: 100%;
    clear: both;
    display: block;
}

.product-collection-info > .btn-buy-now {
    margin-top: 0;
    margin-bottom: 0;
    flex-shrink: 0;
    width: 100%;
    clear: both;
    display: block;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    flex-shrink: 0;
    min-height: 20px;
}

/* Ensure consistent spacing even when rating is missing */
.product-collection-info > .product-collection-name:first-child {
    margin-top: 0;
}

.product-collection-info > .product-rating:first-child + .product-collection-name {
    margin-top: 0;
}

.rating-stars {
    color: #FFD700;
    font-size: 14px;
    letter-spacing: 2px;
}

.rating-score {
    color: #000;
    font-weight: 600;
}

.rating-count {
    color: #666;
}

.product-collection-name {
    font-size: 22px;
    font-weight: 700;
    color: #000;
    margin-bottom: 15px;
    margin-top: 0;
    line-height: 1.3;
    flex-shrink: 0;
}

.product-features {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
    flex: 0 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: none;
    width: 100%;
    position: relative;
}

.product-features li {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 10px;
    padding-left: 20px;
    padding-right: 0;
    position: relative;
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-height: 22px;
    display: block;
    width: 100%;
    box-sizing: border-box;
    clear: both;
}

.product-features li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #000;
    font-weight: bold;
}

.product-features li strong {
    color: #000;
    font-weight: 700;
}

.product-price {
    font-size: 24px;
    font-weight: 700;
    color: #000;
    margin-bottom: 20px !important;
    margin-top: 0 !important;
    flex-shrink: 0;
    display: block;
    clear: both;
}

.product-price .price-sale {
    color: #EF4444;
    font-size: 24px;
    font-weight: 700;
}

.product-price .price-regular {
    display: block;
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    font-weight: 400;
    margin-top: 4px;
    line-height: 1.4;
}

.product-price .price-save {
    display: block;
    font-size: 14px;
    color: #10B981;
    font-weight: 600;
    margin-top: 4px;
    line-height: 1.4;
}

.btn-buy-now {
    display: block;
    width: 100%;
    background-color: #000;
    color: #fff;
    padding: 14px 20px;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    flex-shrink: 0;
    margin-top: 0 !important;
}

.btn-buy-now:hover {
    background-color: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .products-collection-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .collection-title {
        font-size: 36px;
        margin-bottom: 30px;
    }
    
    .products-collection-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .product-collection-image {
        height: 300px;
    }
    
    .product-collection-name {
        font-size: 20px;
    }
}
