/* Import the main stylesheet styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #2C2C2C;
    background: #F4F4F4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section - matching landing page style */
.hero {
    padding: 140px 0 80px;
    text-align: center;
    color: white;
    display: flex;
    align-items: center;
    min-height: 80vh;
}

.hero-with-bg {
    background-image: url('../img/hero/hero_HAAD.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.hero-with-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 112, 192, 0.7), rgba(237, 85, 165, 0.6));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    padding: 0 20px;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 400;
    margin-bottom: 32px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
}

.hero-description {
    padding: 40px;
    border-radius: 40px;
    margin: 32px auto;
    max-width: 600px;
    width: 100%;
    box-sizing: border-box;
    background: rgba(250, 217, 229, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-quote {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: #ffffff;
    opacity: 0.95;
    text-shadow: 1px 1px 8px rgba(0, 0, 0, 0.6);
    line-height: 1.5;
}

/* Products Section - enhanced styling */
.products-section {
    background: white;
    padding: 30px 0;
    opacity: 0;
    transform: translateY(30px);
}

.products-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 500;
    color: #2C2C2C;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.products-content h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #ED55A5, #5BC8D2);
    border-radius: 2px;
}

.products-subtitle {
    font-size: 18px;
    color: #0070C0;
    text-align: center;
    margin-bottom: 60px;
    font-style: italic;
}

/* Filter Section - enhanced styling */
.filter-section {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 30px rgba(0, 112, 192, 0.1);
    border: 1px solid rgba(237, 85, 165, 0.1);
    margin-bottom: 60px;
    transition: all 0.3s ease;
}

.filter-section:hover {
    box-shadow: 0 15px 40px rgba(0, 112, 192, 0.15);
    transform: translateY(-2px);
}

.filter-section .form-label {
    color: #2C2C2C;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.filter-section .form-select {
    border: 2px solid #5BC8D2;
    border-radius: 15px;
    padding: 15px 20px;
    font-size: 14px;
    transition: all 0.3s ease;
    height: auto;
    min-height: 50px;
    line-height: 1.2;
    background-color: #F4F4F4;
}

.filter-section .form-select:focus {
    border-color: #ED55A5;
    box-shadow: 0 0 0 0.2rem rgba(237, 85, 165, 0.25);
    background-color: white;
}

.filter-section .btn-outline-secondary {
    border: 2px solid #5BC8D2;
    border-radius: 15px;
    padding: 15px 20px;
    font-size: 14px;
    transition: all 0.3s ease;
    height: 50px;
    color: #0070C0;
    font-weight: 600;
    background-color: #F4F4F4;
}

.filter-section .btn-outline-secondary:hover {
    background: linear-gradient(135deg, #ED55A5, #5BC8D2);
    border-color: #ED55A5;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(237, 85, 165, 0.3);
}

/* Products Grid - matching landing page */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-top: 40px;
    justify-items: center;
    max-width: 100%;
}

.products-grid.filtered {
    grid-template-columns: repeat(auto-fit, minmax(320px, 380px));
    justify-content: center;
}

/* Product Cards - enhanced styling matching landing page */
.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    border: 1px solid rgba(237, 85, 165, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    max-width: 380px;
    width: 100%;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 112, 192, 0.15);
    border-color: rgba(237, 85, 165, 0.3);
}

.product-image {
    height: 220px;
    margin: 20px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

.product-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ED55A5, #5BC8D2);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

.product-placeholder span {
    display: block;
    line-height: 1.3;
    word-wrap: break-word;
    max-width: 100%;
}

.product-info {
    padding: 20px 30px 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.product-name {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 20px;
    margin-bottom: 8px;
    color: #2C2C2C;
}

.product-category {
    font-size: 12px;
    color: #0070C0;
    font-weight: 600;
    margin-bottom: 12px;
    background: rgba(0, 112, 192, 0.1);
    padding: 6px 15px;
    border-radius: 20px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
    flex-grow: 1;
}

.product-price {
    font-size: 18px;
    color: #0070C0;
    margin-bottom: 20px;
    font-weight: 600;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
    align-items: center;
}

.view-btn,
.add-to-cart-btn {
    width: 100%;
    min-height: 50px;
    padding: 15px 25px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
}

.view-btn {
    background: transparent;
    color: #0070C0;
    border: 2px solid #0070C0;
}

.view-btn:hover {
    background: #0070C0;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 112, 192, 0.3);
    text-decoration: none;
}

.add-to-cart-btn {
    background: linear-gradient(135deg, #ED55A5, #5BC8D2);
    color: white;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(237, 85, 165, 0.4);
}

.edit-details-btn {
    background: linear-gradient(135deg, #0070C0, #5BC8D2);
    color: white;
    width: 100%;
    min-height: 50px;
    padding: 15px 25px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 14px;
}

.edit-details-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 112, 192, 0.4);
    color: white;
    text-decoration: none;
}

.add-to-cart-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Empty Products State */
.empty-products {
    padding: 60px 20px;
    background: rgba(250, 217, 229, 0.1);
    border-radius: 20px;
    border: 2px dashed rgba(237, 85, 165, 0.3);
}

.empty-products h3 {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    color: #2C2C2C;
    margin-bottom: 16px;
}

.empty-products p {
    color: #0070C0;
    font-style: italic;
}

/* Footer - matching landing page */
.products-footer {
    text-align: center;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid rgba(237, 85, 165, 0.1);
}

.back-home-btn {
    background: linear-gradient(135deg, #0070C0, #5BC8D2);
    color: white;
    padding: 16px 40px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: 0 8px 25px rgba(0, 112, 192, 0.3);
}

.back-home-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 112, 192, 0.4);
    color: white;
    text-decoration: none;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content > * {
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero h1 {
    animation-delay: 0.2s;
}

.hero-description {
    animation-delay: 0.4s;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        padding: 120px 20px 60px;
        min-height: 70vh;
    }

    .hero h1 {
        font-size: 32px;
        margin-bottom: 24px;
    }

    .hero-content {
        padding: 0;
    }

    .hero-description {
        margin: 32px 0;
        padding: 32px 24px;
        max-width: none;
    }

    .filter-section {
        padding: 30px 20px;
        margin-bottom: 40px;
    }

    .filter-section .row > div {
        margin-bottom: 20px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 30px;
    }

    .container {
        padding: 0 16px;
    }

    .products-section {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 16px 40px;
        min-height: 60vh;
    }

    .hero h1 {
        font-size: 28px;
        margin-bottom: 20px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .hero-description {
        margin: 24px 0;
        padding: 24px 16px;
        border-radius: 20px;
    }

    .filter-section {
        padding: 20px 15px;
        border-radius: 15px;
    }

    .filter-section .form-select,
    .filter-section .btn-outline-secondary {
        min-height: 45px;
        padding: 12px 15px;
    }

    .product-info {
        padding: 15px 20px 25px;
    }
}

/* Enhanced filter animations */
.filter-section .form-select,
.filter-section .btn-outline-secondary {
    position: relative;
    overflow: hidden;
}

.filter-section .form-select::before,
.filter-section .btn-outline-secondary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(237, 85, 165, 0.1) 0%, transparent 70%);
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.filter-section .form-select:focus::before,
.filter-section .btn-outline-secondary:hover::before {
    width: 100%;
    height: 100%;
}

/* Tag Filter Modal Styling */
.modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 112, 192, 0.15);
}

.modal-header {
    background: linear-gradient(135deg, #0070C0, #5BC8D2);
    color: white;
    border-radius: 20px 20px 0 0;
    border-bottom: none;
    padding: 20px 30px;
}

.modal-title {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 1.5rem;
}

.btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.btn-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    border-top: 1px solid rgba(237, 85, 165, 0.1);
    padding: 20px 30px;
    border-radius: 0 0 20px 20px;
}

/* Tag Group Sections */
.tag-group-section {
    background: rgba(250, 217, 229, 0.05);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(237, 85, 165, 0.1);
}

.tag-group-title {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    color: #0070C0;
    margin-bottom: 15px;
    font-size: 1.1rem;
    position: relative;
}

.tag-group-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(135deg, #ED55A5, #5BC8D2);
    border-radius: 1px;
}

.tag-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.form-check-inline {
    margin-right: 0;
    margin-bottom: 10px;
}

.form-check-input {
    border: 2px solid #5BC8D2;
    border-radius: 6px;
    width: 1.2em;
    height: 1.2em;
    margin-top: 0.1em;
}

.form-check-input:checked {
    background-color: #ED55A5;
    border-color: #ED55A5;
}

.form-check-input:focus {
    border-color: #ED55A5;
    box-shadow: 0 0 0 0.2rem rgba(237, 85, 165, 0.25);
}

.form-check-label {
    font-weight: 500;
    color: #2C2C2C;
    margin-left: 8px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.form-check-label:hover {
    color: #0070C0;
}

/* Tag Filter Button Styling */
#tagFilterBtn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#tagFilterBtn:hover {
    background: linear-gradient(135deg, rgba(237, 85, 165, 0.1), rgba(91, 200, 210, 0.1));
    border-color: #ED55A5;
    color: #0070C0;
}

#tagFilterText {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 10px;
}

/* Modal Button Styling */
.modal-footer .btn-secondary {
    background: transparent;
    border: 2px solid #5BC8D2;
    color: #0070C0;
    border-radius: 15px;
    padding: 12px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.modal-footer .btn-secondary:hover {
    background: #5BC8D2;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(91, 200, 210, 0.3);
}

.modal-footer .btn-primary {
    background: linear-gradient(135deg, #ED55A5, #5BC8D2);
    border: none;
    border-radius: 15px;
    padding: 12px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(237, 85, 165, 0.3);
}

.modal-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(237, 85, 165, 0.4);
}

/* Alert styling in modal */
.modal-body .alert-info {
    background: linear-gradient(135deg, rgba(0, 112, 192, 0.1), rgba(91, 200, 210, 0.1));
    border: 1px solid rgba(0, 112, 192, 0.2);
    border-radius: 15px;
    color: #0070C0;
    padding: 15px 20px;
}

.modal-body .alert-info i {
    color: #5BC8D2;
    margin-right: 8px;
}

/* Responsive adjustments for modal */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }
    
    .tag-checkboxes {
        gap: 10px;
    }
    
    .form-check-inline {
        margin-bottom: 8px;
    }
    
    .tag-group-section {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 15px;
    }
    
    .modal-title {
        font-size: 1.3rem;
    }
    
    .tag-checkboxes {
        flex-direction: column;
        gap: 8px;
    }
    
    .form-check-inline {
        display: flex;
        align-items: center;
        margin-bottom: 5px;
    }
}

/* Stock text styling */
.stock-text {
    font-size: 11px;
    font-weight: 600;
    margin: 4px 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.stock-text.out-of-stock {
    color: #dc3545;
}

.stock-text.low-stock {
    color: #ffc107;
}

.add-to-cart-btn.disabled {
    background: #6c757d !important;
    color: #fff !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

.add-to-cart-btn.disabled:hover {
    background: #6c757d !important;
    transform: none !important;
}

/* Product actions layout */
.product-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    width: 100%;
}

.view-btn {
    background: transparent;
    color: #0070C0;
    border: 2px solid #0070C0;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    text-align: center;
    min-width: 120px;
}

.view-btn:hover {
    background: #0070C0;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 112, 192, 0.3);
}

.add-to-cart-btn {
    background: linear-gradient(135deg, #ED55A5, #5BC8D2);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 120px;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(237, 85, 165, 0.4);
}

.add-to-cart-btn:active {
    transform: translateY(0);
}
