/* E-shop Frontend Styles */

/* Product Card Styles */
.product-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.product-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1.8;
    background: #f8f9fa;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.product-card-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #adb5bd;
    font-size: 2rem;
}

.product-card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.product-card-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    flex: 1;
}

.product-card-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 1rem;
}

.product-card-button {
    width: 100%;
    padding: 0.75rem;
    background: #BD0A0B;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background 0.2s ease;
    text-decoration: none;
    text-align: center;
    display: inline-block;
}

.product-card-button:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin: 0 0 2rem 0;
}

/* Product Detail Styles */
.product-detail {
    margin: 3rem 0;
}

.product-gallery {
    position: sticky;
    top: 2rem;
}

.product-main-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.product-thumbnails {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.product-thumbnail {
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s ease;
    object-fit: cover;
}

.product-thumbnail:hover,
.product-thumbnail.active {
    border-color: #BD0A0B;
}

.product-info {
    padding-left: 2rem;
}

.product-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
}

.product-short-description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.product-price {
    font-size: 2rem;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 0.5rem;
}

.product-variants {
    margin-bottom: 2rem;
}

.product-variants h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #333;
}

.variant-option {
    display: block;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.variant-option:hover {
    border-color: #BD0A0B;
    background: #f8f9fa;
}

.variant-option.selected {
    border-color: #BD0A0B;
    background: #e7e7e7;
}

.product-description {
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.product-description h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.product-description p {
    line-height: 1.6;
    color: #666;
    margin-bottom: 1rem;
}

/* Related Products */
.related-products {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid #e0e0e0;
}

.related-products h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #333;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }

    .product-info {
        padding-left: 0;
        margin-top: 2rem;
    }

    .product-title {
        font-size: 2rem;
    }

    .product-price {
        font-size: 1.5rem;
    }

    .product-thumbnails {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 0.75rem;
    }

    .product-card-body {
        padding: 0.75rem;
    }

    .product-title {
        font-size: 1.75rem;
    }
}

/* Utility Classes */
.text-price {
    color: #e74c3c !important;
    font-weight: 700;
}

.btn-add-to-cart {
    background: #28a745;
    border-color: #28a745;
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.btn-add-to-cart:hover {
    background: #218838;
    border-color: #1e7e34;
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #ffffff;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
    transition: opacity 0.2s ease;
}

.lightbox-close:hover,
.lightbox-close:focus {
    opacity: 0.7;
}

.lightbox-caption {
    color: #ffffff;
    padding: 15px;
    font-size: 1.1rem;
    text-align: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive lightbox */
@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95%;
        max-height: 95%;
    }

    .lightbox-close {
        font-size: 30px;
        top: -35px;
    }

    .lightbox-caption {
        font-size: 1rem;
        padding: 10px;
    }
}

.method-option {
    display: block;
    padding: 1rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.method-option:hover {
    border-color: #BD0A0B;
    background: #f4f4f4;
}

.method-option.selected {
    border-color: #BD0A0B;
    background: #e7e7e7;
}

.method-option input[type="radio"] {
    display: none;
}

.method-name {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.method-description {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.method-delivery-time {
    font-size: 0.85rem;
    color: #6c757d;
}

.method-price {
    font-size: 1.1rem;
}

.form-check-input:focus {
    border-color: #BD0A0B;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.card-header.bg-success {
    background-color: #198754 !important;
}

.card-header.bg-info {
    background-color: #0dcaf0 !important;
}

.table-success th {
    background-color: rgba(25, 135, 84, 0.1);
}

form table{
    width: 100%;
}

form td, form th{
    padding-bottom: 1rem;
}

form table input[type=submit] {
    width: auto !important;
}

/* Product Filters Sidebar */
.product-filters {
    position: sticky;
    top: 2rem;
}

.filters-header {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-section {
    background: #f6f9fb;
    border: 1px solid #cce7ff;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s ease;
}

.filter-section:hover {
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* Price Filter */
.price-filter input {
    font-size: 0.9rem;
}

/* Brand Filter */
.brands-filter{
    max-height: 300px;
    overflow-y: auto;
}

.brands-filter .form-check {
    margin-bottom: 0.5rem;
}

.brands-filter .form-check-label {
    font-size: 0.9rem;
    cursor: pointer;
}

/* Category Filter */

.category-item {
    margin-bottom: 0.25rem;
}

.category-link-wrapper {
    padding: 0.25rem 0;
}

.category-link {
    color: #495057;
    padding: 0.25rem 0;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.category-link:hover {
    color: #BD0A0B;
}

.category-link.active span {
    color: #BD0A0B;
    font-weight: 700;
}

.category-toggle {
    color: #6c757d;
    font-size: 0.8rem;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-toggle:hover {
    color: #BD0A0B;
}

.category-children {
    margin-top: 0.25rem;
    border-left: 2px solid #e9ecef;
    padding-left: 0.75rem;
}

.category-children .category-link {
    font-size: 0.85rem;
}

/* Form Controls in Filters */
.product-filters .form-control-sm {
    font-size: 0.875rem;
    padding: 0.375rem 0.5rem;
}

.product-filters .form-check-input {
    margin-top: 0.125rem;
}

.product-filters .form-check-label {
    font-size: 0.9rem;
    margin-left: 0.25rem;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .product-filters {
        position: static;
        max-height: none;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .filter-section {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .filters-header {
        padding: 0.75rem;
    }

    .brands-filter {
        max-height: 250px;
    }

    .filter-title {
        font-size: 0.9rem;
    }
}

.property-select-wrapper{
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.property-label{
    width: fit-content;
    min-width: 136px;
    display: flex;
    align-items: center;
    margin: 0.5rem 0;
}

/* Color swatches */
.color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.color-swatch {
    border: 2px solid transparent;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: .85rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .15s, border-radius 0.15s, transform .1s;
    outline: none;
}

.color-swatch:hover {
    transform: scale(1.05);
}

.color-swatch.selected {
    border-color: #333;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .25);
    border-radius: 3rem;
}

.template .rental-inquiry-form input{ padding-top: 0.5rem; padding-bottom: 0.5rem;}
.template .rental-inquiry-form .btn {padding: 8px 16px !important; border-radius: 0.5rem;}
