/* ===================================
   MANOVASTRA - REPUBLIC DAY 2026 THEME
   Product Collection/Listing Page Styling
   ==================================== */

/* ===================================
   KEYFRAME ANIMATIONS
   ==================================== */

/* Wishlist Pulse Animation */
@keyframes wishlistPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Product Hover Elevation */
@keyframes productHover {
    0% {
        transform: translateY(0) scale(1);
    }
    100% {
        transform: translateY(-8px) scale(1.02);
    }
}

/* Badge Slide-In Effect */
@keyframes badgeSlide {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Overlay Fade-In */
@keyframes overlayFade {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Tricolor Gradient Flow */
@keyframes tricolorFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Ashoka Chakra Rotation */
@keyframes rotateChakra {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Cart Button Glow */
@keyframes cartGlow {
    0%, 100% {
        box-shadow: 
            0 4px 15px rgba(19, 136, 7, 0.3),
            0 0 20px rgba(19, 136, 7, 0.2);
    }
    50% {
        box-shadow: 
            0 6px 20px rgba(255, 153, 51, 0.4),
            0 0 30px rgba(255, 153, 51, 0.3);
    }
}

/* Star Twinkle */
@keyframes starTwinkle {
    0%, 100% {
        filter: drop-shadow(0 0 2px rgba(255, 215, 0, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.8));
    }
}

/* ===================================
   1. COLLECTION SECTION
   ==================================== */

.collection-section {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 1) 0%,
        rgba(248, 249, 250, 1) 100%
    );
    min-height: 70vh;
    position: relative;
    overflow: hidden;
}

/* Subtle Ashoka Chakra Watermark */
.collection-section::before {
    content: '☸';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 800px;
    color: rgba(255, 153, 51, 0.02);
    animation: rotateChakra 120s linear infinite;
    pointer-events: none;
    z-index: 0;
}

.collection-section > .container {
    position: relative;
    z-index: 1;
}

/* ===================================
   2. COLLECTION HEADER
   ==================================== */

.collection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(
        90deg,
        #FF9933 0%,
        #FFFFFF 50%,
        #138807 100%
    ) 1;
    position: relative;
}

/* Tricolor Bottom Border Accent */
.collection-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(
        90deg,
        #FF9933 0%,
        #FF9933 33%,
        #FFFFFF 33%,
        #FFFFFF 66%,
        #138807 66%,
        #138807 100%
    );
    background-size: 300% 100%;
    animation: tricolorFlow 8s ease infinite;
}

/* ===================================
   3. COLLECTION HEADER LEFT
   ==================================== */

.collection-header-left {
    flex: 1;
}

.collection-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #000080;
    margin-bottom: 0.5rem;
    position: relative;
    padding-bottom: 12px;
    display: inline-block;
}

/* Tricolor Gradient Underline */
.collection-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(
        90deg,
        #FF9933 0%,
        #FFFFFF 50%,
        #138807 100%
    );
    border-radius: 2px;
}

.collection-title:hover {
    text-shadow: 
        0 0 15px rgba(255, 153, 51, 0.3),
        0 0 25px rgba(19, 136, 7, 0.2);
}

.collection-subtitle {
    font-size: 1rem;
    color: #138807;
    margin: 0;
    font-weight: 500;
}

.collection-subtitle::before {
    content: '🇮🇳 ';
    margin-right: 5px;
}

/* ===================================
   4. COLLECTION HEADER RIGHT - SORT DROPDOWN
   ==================================== */

.collection-header-right {
    display: flex;
    align-items: center;
}

.sort-dropdown {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sort-dropdown label {
    font-size: 1rem;
    font-weight: 500;
    color: #000080;
    white-space: nowrap;
    margin: 0;
}

.sort-dropdown .form-select {
    min-width: 200px;
    border: 2px solid #FF9933;
    border-radius: 8px;
    padding: 10px 40px 10px 15px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
    background-color: #FFFFFF;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23FF9933' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.sort-dropdown .form-select:hover {
    transform: scale(1.02);
    border-color: #138807;
}

.sort-dropdown .form-select:focus {
    border-color: #138807;
    box-shadow: 
        0 0 0 3px rgba(19, 136, 7, 0.15),
        0 0 15px rgba(255, 153, 51, 0.1);
    outline: none;
}

/* ===================================
   5. SORT SELECT OPTIONS STYLING
   ==================================== */

.sort-dropdown .form-select option {
    background: #FFFFFF;
    color: #000080;
    padding: 10px;
}

.sort-dropdown .form-select option:hover {
    background: rgba(19, 136, 7, 0.1);
}

.sort-dropdown .form-select option:checked {
    background: rgba(255, 153, 51, 0.1);
    font-weight: 600;
}

/* ===================================
   6. PRODUCTS GRID
   ==================================== */

.collection-section .row {
    position: relative;
}

/* ===================================
   7. PRODUCT CARD
   ==================================== */

.product-card {
    background: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Tricolor Top Border Accent */
.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(
        90deg,
        #FF9933 0%,
        #FF9933 33%,
        #FFFFFF 33%,
        #FFFFFF 66%,
        #138807 66%,
        #138807 100%
    );
    z-index: 2;
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 12px 28px rgba(0, 0, 0, 0.15),
        0 0 25px rgba(255, 153, 51, 0.2),
        0 0 35px rgba(19, 136, 7, 0.15);
}

/* ===================================
   8. PRODUCT IMAGE WRAPPER
   ==================================== */

.product-image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 125%; /* 4:5 aspect ratio */
    overflow: hidden;
    background: #f8f9fa;
}

/* ===================================
   9. PRODUCT IMAGE
   ==================================== */

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-image {
    transform: scale(1.1);
}

/* ===================================
   10. PRODUCT BADGE
   ==================================== */

.product-badge {
    position: absolute;
    top: 15px;
    left: 0;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #FFFFFF;
    z-index: 3;
    border-radius: 0 8px 8px 0;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
    animation: badgeSlide 0.5s ease-out;
}

/* Badge Color Variations */
.product-badge {
    background: linear-gradient(
        135deg,
        #FF9933,
        #FFD700
    );
}

/* Sale/Discount Badge */
.product-card:has([class*="sale"]) .product-badge,
.product-card:has([class*="discount"]) .product-badge,
.product-card:has([class*="OFF"]) .product-badge {
    background: linear-gradient(
        135deg,
        #FF9933,
        #FFD700
    );
}

/* New Arrival Badge */
.product-card:has([class*="new"]) .product-badge {
    background: linear-gradient(
        135deg,
        #138807,
        #128807
    );
}

/* Bestseller Badge */
.product-card:has([class*="bestseller"]) .product-badge {
    background: linear-gradient(
        135deg,
        #FFD700,
        #FFA500
    );
    color: #000080;
}

/* Featured Badge */
.product-card:has([class*="featured"]) .product-badge {
    background: linear-gradient(
        135deg,
        #000080,
        #0000CD
    );
}

/* ===================================
   11. PRODUCT OVERLAY
   ==================================== */

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(255, 153, 51, 0.85) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(19, 136, 7, 0.85) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.product-card:hover .product-overlay {
    opacity: 1;
    animation: overlayFade 0.3s ease-out;
}

/* ===================================
   12. BTN QUICK VIEW
   ==================================== */

.btn-quick-view {
    background: #FFFFFF;
    color: #000080;
    border: 2px solid #FFFFFF;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-quick-view i {
    color: #FFD700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.btn-quick-view:hover {
    background: linear-gradient(
        135deg,
        #FF9933,
        #FFD700
    );
    color: #FFFFFF;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 153, 51, 0.4);
}

.btn-quick-view:hover i {
    color: #FFFFFF;
    transform: scale(1.2);
}

/* ===================================
   13. BTN WISHLIST
   ==================================== */

.btn-wishlist {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: all 0.3s ease;
    box-shadow: 
        0 2px 8px rgba(255, 153, 51, 0.2),
        0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-wishlist i {
    font-size: 1.2rem;
    color: #FF9933;
    transition: all 0.3s ease;
}

.btn-wishlist:hover {
    transform: scale(1.15);
    background: #FFFFFF;
    box-shadow: 
        0 4px 12px rgba(255, 153, 51, 0.4),
        0 0 20px rgba(255, 153, 51, 0.3);
}

.btn-wishlist:hover i {
    color: #FF9933;
}

/* Active/Saved Wishlist State */
.btn-wishlist.active,
.btn-wishlist.saved {
    background: linear-gradient(
        135deg,
        #FF9933,
        #FFD700
    );
    animation: wishlistPulse 0.6s ease;
}

.btn-wishlist.active i,
.btn-wishlist.saved i {
    color: #FFFFFF;
}

/* ===================================
   14. PRODUCT INFO
   ==================================== */

.product-info {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ===================================
   15. PRODUCT NAME
   ==================================== */

.product-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

.product-name a {
    color: #000080;
    text-decoration: none;
    transition: all 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-name a:hover {
    color: #FF9933;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: #FF9933;
}

/* ===================================
   16. PRODUCT RATING
   ==================================== */

.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

.product-rating i {
    color: #FFD700;
    font-size: 1rem;
    animation: starTwinkle 3s ease-in-out infinite;
}

.product-rating > span:first-of-type {
    color: #000080;
    font-weight: 600;
}

.rating-count {
    color: #9ca3af;
    font-size: 0.85rem;
}

/* ===================================
   17. PRODUCT PRICE SECTION
   ==================================== */

.product-price-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #FF9933;
    font-family: 'Poppins', sans-serif;
}

.product-original-price {
    font-size: 1rem;
    color: #9ca3af;
    text-decoration: line-through;
    font-weight: 400;
}

/* ===================================
   18. BTN ADD TO CART
   ==================================== */

.btn-add-to-cart {
    width: 100%;
    background: linear-gradient(
        135deg,
        #138807 0%,
        #FF9933 100%
    );
    background-size: 200% 200%;
    color: #FFFFFF;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

.btn-add-to-cart i {
    font-size: 1.1rem;
    color: #FFFFFF;
    transition: all 0.3s ease;
}

.btn-add-to-cart::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-add-to-cart:hover::before {
    width: 400px;
    height: 400px;
}

.btn-add-to-cart:hover {
    background: linear-gradient(
        135deg,
        #FF9933 0%,
        #FFD700 100%
    );
    transform: translateY(-2px);
    animation: cartGlow 2s ease-in-out infinite;
}

.btn-add-to-cart:hover i {
    transform: scale(1.2);
}

/* ===================================
   19. PAGINATION SECTION
   ==================================== */

.pagination-section {
    margin-top: 3rem;
    position: relative;
}

/* Patriotic Divider Before Pagination */
.pagination-section::before {
    content: '';
    position: absolute;
    top: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 3px;
    background: linear-gradient(
        90deg,
        #FF9933 0%,
        #FFFFFF 50%,
        #138807 100%
    );
    border-radius: 2px;
}

/* ===================================
   20. PAGINATION STYLING
   ==================================== */

.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-item {
    margin: 0;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 8px 15px;
    border: 2px solid #FF9933;
    border-radius: 8px;
    color: #000080;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    background: #FFFFFF;
}

.page-link:hover {
    background: #FF9933;
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 153, 51, 0.3);
}

.page-item.active .page-link {
    background: linear-gradient(
        135deg,
        #FF9933 0%,
        #138807 100%
    );
    color: #FFFFFF;
    border: none;
    font-weight: 700;
    box-shadow: 
        0 4px 15px rgba(255, 153, 51, 0.4),
        0 0 20px rgba(19, 136, 7, 0.3);
    pointer-events: none;
}

/* Previous/Next Buttons */
.page-item:first-child .page-link,
.page-item:last-child .page-link {
    border-color: #FF9933;
    font-weight: 700;
}

.page-item:first-child .page-link:hover,
.page-item:last-child .page-link:hover {
    background: linear-gradient(
        135deg,
        #138807,
        #128807
    );
    color: #FFFFFF;
}

/* ===================================
   21. EMPTY STATE (NO PRODUCTS)
   ==================================== */

.collection-section .text-center {
    padding: 4rem 2rem;
}

.collection-section .bi-box-seam {
    font-size: 80px !important;
    background: linear-gradient(
        135deg,
        #FF9933,
        #138807
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.collection-section .text-center h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #000080;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.collection-section .text-center h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(
        90deg,
        #FF9933,
        #138807
    );
    border-radius: 2px;
}

.collection-section .text-center .btn-primary {
    background: linear-gradient(
        135deg,
        #FF9933,
        #138807
    );
    border: none;
    color: #FFFFFF;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.4s ease;
    box-shadow: 0 6px 20px rgba(255, 153, 51, 0.3);
}

.collection-section .text-center .btn-primary:hover {
    background: linear-gradient(
        135deg,
        #138807,
        #FFD700
    );
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 10px 30px rgba(255, 153, 51, 0.4),
        0 0 40px rgba(19, 136, 7, 0.2);
}

.collection-section .text-center .btn-primary::before {
    content: '←';
    font-size: 1.3rem;
}

/* ===================================
   22. RESPONSIVE DESIGN
   ==================================== */

/* Large Desktop */
@media (min-width: 1200px) {
    .collection-title {
        font-size: 2.8rem;
    }
}

/* Desktop */
@media (max-width: 1199px) {
    .collection-title {
        font-size: 2.3rem;
    }
}

/* Tablet */
@media (max-width: 991px) {
    .collection-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .collection-header-right {
        width: 100%;
    }
    
    .sort-dropdown {
        width: 100%;
        justify-content: space-between;
    }
    
    .sort-dropdown .form-select {
        flex: 1;
    }
    
    .collection-title {
        font-size: 2rem;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .collection-section::before {
        font-size: 400px;
    }
    
    .collection-title {
        font-size: 1.75rem;
    }
    
    .collection-subtitle {
        font-size: 0.9rem;
    }
    
    .sort-dropdown label {
        font-size: 0.9rem;
    }
    
    .sort-dropdown .form-select {
        min-width: auto;
        font-size: 0.85rem;
        padding: 8px 35px 8px 12px;
    }
    
    .product-card:hover {
        transform: translateY(-5px) scale(1.01);
    }
    
    .btn-quick-view {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    
    .btn-wishlist {
        width: 36px;
        height: 36px;
    }
    
    .btn-wishlist i {
        font-size: 1rem;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .product-name {
        font-size: 0.95rem;
    }
    
    .product-price {
        font-size: 1.1rem;
    }
    
    .btn-add-to-cart {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .page-link {
        min-width: 36px;
        height: 36px;
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    /* Reduce Animation Complexity on Mobile */
    .product-card:hover .product-image {
        transform: scale(1.05);
    }
}

/* Small Mobile */
@media (max-width: 575px) {
    .collection-title {
        font-size: 1.5rem;
    }
    
    .collection-subtitle {
        font-size: 0.85rem;
    }
    
    .sort-dropdown {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .sort-dropdown .form-select {
        width: 100%;
    }
    
    .product-badge {
        font-size: 0.7rem;
        padding: 5px 10px;
    }
    
    .btn-quick-view {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    
    .product-rating {
        font-size: 0.85rem;
    }
    
    .page-link {
        min-width: 32px;
        height: 32px;
        padding: 5px 10px;
    }
    
    .pagination-section::before {
        width: 150px;
    }
}

/* ===================================
   23. ACCESSIBILITY & FOCUS STATES
   ==================================== */

.product-card:focus-within,
.btn-quick-view:focus,
.btn-wishlist:focus,
.btn-add-to-cart:focus,
.page-link:focus,
.form-select:focus {
    outline: 3px solid #FF9933;
    outline-offset: 3px;
}

/* Touch-Friendly Spacing on Mobile */
@media (max-width: 767px) {
    .btn-wishlist {
        min-width: 44px;
        min-height: 44px;
    }
    
    .btn-add-to-cart {
        min-height: 44px;
    }
}

/* ===================================
   24. REDUCED MOTION
   ==================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===================================
   25. GPU ACCELERATION
   ==================================== */

.product-card,
.product-image,
.btn-quick-view,
.btn-wishlist,
.btn-add-to-cart,
.page-link {
    will-change: transform;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* ===================================
   26. PRINT STYLES
   ==================================== */

@media print {
    .product-overlay,
    .btn-quick-view,
    .btn-wishlist,
    .btn-add-to-cart,
    .pagination-section,
    .sort-dropdown {
        display: none !important;
    }
    
    .product-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        page-break-inside: avoid;
    }
    
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ===================================
   END OF COLLECTION PAGE STYLING
   Happy 77th Republic Day 2026! 🇮🇳
   ==================================== */
