/* Custom Styles for BPA Wine Store */

/* Bootstrap Override for Profile Dropdown */
.header-action-icon-2 .dropdown-toggle {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333333;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s;
}

.header-action-icon-2 .dropdown-toggle:hover {
    background-color: rgba(255, 107, 107, 0.1);
}

.header-action-icon-2 .dropdown-toggle::after {
    margin-left: 5px;
}

.header-action-icon-2 .dropdown-menu {
    min-width: 200px;
    border: 1px solid #ececec;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    margin-top: 10px;
}

.header-action-icon-2 .dropdown-header {
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #ececec;
    border-radius: 10px 10px 0 0;
}

.header-action-icon-2 .dropdown-item {
    padding: 10px 15px;
    color: #333333;
    transition: all 0.3s;
}

.header-action-icon-2 .dropdown-item:hover {
    background-color: rgba(255, 107, 107, 0.1);
    color: #FF6B6B;
    padding-left: 20px;
}

.header-action-icon-2 .dropdown-item i {
    width: 20px;
    margin-right: 10px;
}

/* Login Button Styles */
.header-action-icon-2 .btn-primary {
    background-color: #800020;
    border-color: #800020;
    color: #fff;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 5px;
    transition: all 0.3s;
}

.header-action-icon-2 .btn-primary:hover {
    background-color: #600018;
    border-color: #600018;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(128, 0, 32, 0.3);
}

/* Mobile specific styles */
@media (max-width: 768px) {
    .header-action-icon-2 .dropdown-menu {
        position: fixed;
        right: 10px;
        left: auto;
        top: 60px;
    }
}

/* Account Dropdown Styles */
.account-dropdown-wrap {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    width: 250px;
    z-index: 999;
    margin-top: 15px;
}

.account-dropdown-inner {
    padding: 20px;
}

.account-dropdown-header {
    border-bottom: 1px solid #ececec;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.account-dropdown-header h5 {
    margin-bottom: 5px;
    color: #333333;
    font-size: 16px;
    font-weight: 700;
}

.account-dropdown-header p {
    font-size: 13px;
    color: #7E7E7E;
    margin: 0;
}

.account-dropdown-inner ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.account-dropdown-inner ul li {
    margin-bottom: 10px;
}

.account-dropdown-inner ul li:last-child {
    margin-bottom: 0;
    padding-top: 10px;
    border-top: 1px solid #ececec;
    margin-top: 10px;
}

.account-dropdown-inner ul li a {
    color: #333333;
    font-size: 14px;
    display: flex;
    align-items: center;
    padding: 8px 0;
    transition: all 0.3s;
    text-decoration: none;
}

.account-dropdown-inner ul li a:hover {
    color: #FF6B6B;
    padding-left: 5px;
}

.account-dropdown-inner ul li a i {
    font-size: 16px;
    width: 20px;
}

.account-dropdown-buttons {
    display: flex;
    gap: 10px;
}

.account-dropdown-buttons .btn {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
}

.account-dropdown-buttons .btn:first-child {
    background-color: #800020;
    color: #fff;
    border: 1px solid #800020;
}

.account-dropdown-buttons .btn:first-child:hover {
    background-color: #600018;
    border-color: #600018;
}

.account-dropdown-buttons .btn.btn-outline {
    background-color: transparent;
    color: #FF6B6B;
    border: 1px solid #800020;
}

.account-dropdown-buttons .btn.btn-outline:hover {
    background-color: #800020;
    color: #fff;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .account-dropdown-wrap {
        position: fixed;
        width: 90%;
        max-width: 300px;
        right: 5%;
        top: 70px;
    }

    .header-action-icon-2 .account-dropdown-wrap {
        right: -10px;
        width: 240px;
    }
}

/* Animation for dropdown */
.account-dropdown-wrap.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Active state for menu items */
.account-dropdown-inner ul li a.active {
    color: #FF6B6B;
    font-weight: 600;
}

/* Equal height product cards - Universal solution */
.product-grid-3 .row,
.product-grid-4 .row,
.row {
    display: flex;
    flex-wrap: wrap;
}

/* Basic carousel adjustments for Slick */
.carausel-4-columns .slick-slide,
.carausel-6-columns .slick-slide {
    height: auto !important;
}

.carausel-4-columns .product-cart-wrap,
.carausel-6-columns .product-cart-wrap {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
}

/* Target all column variations used in product layouts */
.product-grid-3 .col-lg-4,
.product-grid-3 .col-md-4,
.product-grid-3 .col-sm-6,
.product-grid-3 .col-12,
.product-grid-4 .col-lg-3,
.product-grid-4 .col-md-4,
.product-grid-4 .col-6,
.product-grid-4 .col-sm-6 {
    display: flex;
    flex-direction: column;
}

/* Also target any column that contains a product card */
[class*="col-"] .product-cart-wrap {
    height: 100%;
}

/* Main product card container */
.product-cart-wrap {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 400px !important;
    /* Ensure minimum height for consistency */
}

/* Override slick carousel styles that might interfere */
.slick-track .product-cart-wrap {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    margin-bottom: 0 !important;
}

/* Maintain original carousel spacing */
.carausel-4-columns-cover .carausel-4-columns .product-cart-wrap {
    margin-right: 12px;
    margin-left: 12px;
}

/* Product image container - fixed height */
.product-cart-wrap .product-img-action-wrap {
    height: 150px;
    overflow: hidden;
    position: relative;
}

.product-cart-wrap .product-img-action-wrap .product-img {
    height: 100%;
}

.product-cart-wrap .product-img-action-wrap .product-img a {
    height: 100%;
    display: block;
}

.product-cart-wrap .product-img-action-wrap .product-img a img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* Product content wrapper - flexible height */
.product-content-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 15px 0;
}

/* Product title area - allow natural height but maintain consistency */
.product-content-wrap h2 {
    min-height: 48px;
    /* Approximately 2 lines */
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
}

/* Product price and action area - fixed at bottom */
.product-content-wrap .product-price {
    margin-top: auto;
    margin-bottom: 10px;
}

.product-content-wrap .product-action-1.show {
    margin-top: auto;
}

/* Responsive adjustments for equal height cards */
@media (max-width: 768px) {
    .product-cart-wrap {
        min-height: 350px;
        /* Smaller min height on mobile */
    }

    .product-cart-wrap .product-img-action-wrap {
        height: 135px;
        /* Smaller image height on mobile */
    }

    .product-content-wrap h2 {
        min-height: 40px;
        /* Smaller title area on mobile */
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .product-cart-wrap {
        min-height: 320px;
        /* Even smaller on very small screens */
    }

    .product-cart-wrap .product-img-action-wrap {
        height: 250px;
    }
}

.header-action-2 .header-action-icon-2:hover .cart-dropdown-wrap {
    max-height: 700px;
    overflow-y: scroll;
}

/* User Dropdown Custom Styles */
.user-dropdown-custom {
    position: relative;
}

.header-action-icon-2 .user-dropdown-custom {
    position: static;
}

.header-action-icon-2 .user-dropdown-custom .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 250px;
    background-color: #fff !important;
    border: 1px solid #ececec;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
    padding: 0;
    list-style: none;
    z-index: 9999 !important;
}

.user-dropdown-custom .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 250px;
    background-color: #fff !important;
    border: 1px solid #ececec;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
    padding: 0;
    list-style: none;
    z-index: 9999 !important;
}

.user-dropdown-custom .dropdown-menu .dropdown-header {
    padding: 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #ececec;
    border-radius: 10px 10px 0 0;
}

.user-dropdown-custom .dropdown-menu .dropdown-header h6 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.user-dropdown-custom .dropdown-menu .dropdown-header small {
    font-size: 12px;
    color: #7E7E7E;
}

.user-dropdown-custom .dropdown-menu .dropdown-divider {
    margin: 0;
    border-top: 1px solid #ececec;
}

.user-dropdown-custom .dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.user-dropdown-custom .dropdown-menu .dropdown-item:hover {
    background-color: rgba(59, 183, 126, 0.1);
    color: #3BB77E;
    padding-left: 20px;
}

.user-dropdown-custom .dropdown-menu .dropdown-item i {
    width: 20px;
    margin-right: 10px;
}

.user-dropdown-toggle {
    cursor: pointer;
    text-decoration: none !important;
}

.user-dropdown-toggle:hover {
    opacity: 0.8;
}