/**
 * Products Page Styles - World Class E-commerce Design
 * صفحة المنتجات - تصميم عالمي احترافي
 */

/* Hero Section - Interactive Canvas */
.products-hero {
    position: relative;
    min-height: auto !important;
    background: linear-gradient(180deg, #1a1a1a 0%, #2c2c2c 50%, #1a1a1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 0;
    padding-top: 180px;
    padding-bottom: 40px;
}

.products-hero .container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.hero-canvas {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.particle-field {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.particle-field canvas {
    width: 100%;
    height: 100%;
}

.gradient-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 50%, #1a1a1a 100%),
        radial-gradient(
            ellipse at center,
            rgba(212, 170, 64, 0.15) 0%,
            rgba(191, 152, 53, 0.1) 50%,
            transparent 100%
        );
}

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

.products-hero .hero-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 30px;
    line-height: 1.2;
}

.title-word {
    color: white;
}

.title-accent {
    background: linear-gradient(135deg, #D4AA40, #BF9835);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.products-hero .hero-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
}

/* Hero Badge Icon */
.products-hero .hero-badge {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #D4AA40, #BF9835) !important;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(212, 170, 64, 0.4);
}

.products-hero .hero-badge i {
    font-size: 2.5rem;
    color: #000000 !important;
}

/* Search Bar */
.hero-search {
    max-width: 650px;
    margin: 0 auto;
}

.search-form {
    width: 100%;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(212, 170, 64, 0.4);
    border-radius: 50px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.search-wrapper:focus-within {
    background: rgba(0, 0, 0, 0.7);
    border-color: #D4AA40;
    box-shadow: 0 0 30px rgba(212, 170, 64, 0.4);
}

.search-input {
    flex: 1;
    padding: 18px 30px;
    background: transparent;
    border: none;
    color: #F2E8C9;
    font-size: 1.1rem;
    outline: none;
}

.search-input::placeholder {
    color: rgba(212, 170, 64, 0.5);
}

.search-btn {
    padding: 18px 35px;
    background: linear-gradient(135deg, #D4AA40, #BF9835);
    border: none;
    color: #000000;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 4px;
    border-radius: 50px;
}

.search-btn i {
    color: #000000;
}

.search-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(212, 170, 64, 0.4);
}

/* Filters Section */
.products-filters {
    background: linear-gradient(135deg, #1a1a1a, #2c2c2c);
    padding: 30px 0;
    border-bottom: 1px solid rgba(212, 170, 64, 0.2);
    position: sticky;
    top: 80px;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.filters-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
}

.filter-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #D4AA40;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-select {
    padding: 12px 20px;
    background: #2c2c2c;
    border: 2px solid rgba(212, 170, 64, 0.3);
    border-radius: 10px;
    font-size: 1rem;
    color: #F2E8C9;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFD700' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 20px;
    padding-right: 45px;
}

.filter-select:focus {
    border-color: #D4AA40;
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 170, 64, 0.2);
}

/* View Toggle */
.view-toggle {
    display: flex;
    background: #2c2c2c;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(212, 170, 64, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.view-btn {
    padding: 14px 22px;
    background: transparent;
    border: none;
    color: #D4AA40;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn i {
    color: #D4AA40;
    transition: all 0.3s ease;
}

.view-btn:hover {
    background: rgba(212, 170, 64, 0.1);
}

.view-btn.active {
    background: linear-gradient(135deg, #D4AA40, #BF9835);
    color: #000000;
}

.view-btn.active i {
    color: #000000;
}

/* Products Section */
.products-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #0a0a0a, #1a1a1a);
    min-height: 500px;
}

.products-count {
    margin-bottom: 30px;
    font-size: 1rem;
    color: #F2E8C9;
}

.products-count span {
    background: linear-gradient(135deg, #1a1a1a, #2c2c2c);
    padding: 8px 20px;
    border-radius: 50px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(212, 170, 64, 0.2);
    color: #D4AA40;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

/* Product Card */
.product-card {
    background: linear-gradient(135deg, #1a1a1a, #2c2c2c);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid rgba(212, 170, 64, 0.2);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(212, 170, 64, 0.2);
    border-color: #D4AA40;
}

/* Product Badge */
.product-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

[dir="rtl"] .product-badge {
    right: auto;
    left: 20px;
}

.product-badge span {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #D4AA40, #BF9835);
    color: #000000;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(212, 170, 64, 0.4);
}

/* Product Image */
.product-image {
    position: relative;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2c2c2c, #1a1a1a);
    color: #D4AA40;
    font-size: 4rem;
}

/* Product Overlay */
.product-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.7) 100%
    );
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.quick-view-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, #D4AA40, #BF9835);
    color: #000000;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.product-card:hover .quick-view-btn {
    transform: translateY(0);
}

.quick-view-btn:hover {
    background: linear-gradient(135deg, #A58230, #8B6914);
    color: #F2E8C9;
}

/* Product Info */
.product-info {
    padding: 25px;
}

.product-company {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    background: rgba(212, 170, 64, 0.08);
    border-radius: 10px;
    border: 1px solid rgba(212, 170, 64, 0.15);
}

.product-company img {
    height: 35px;
    width: 35px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    padding: 3px;
}

.product-company-name {
    font-size: 0.85rem;
    color: #D4AA40;
    font-weight: 600;
}

.product-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #D4AA40;
    margin-bottom: 10px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-category {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(212, 170, 64, 0.1);
    color: #D4AA40;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 15px;
    border: 1px solid rgba(212, 170, 64, 0.3);
}

.product-description {
    font-size: 0.95rem;
    color: #F2E8C9;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Product Footer */
.product-footer {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid rgba(212, 170, 64, 0.1);
}

.btn-quote {
    flex: 1;
    padding: 14px 20px;
    background: linear-gradient(135deg, #D4AA40, #BF9835);
    color: #000000;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.95rem;
}

.btn-quote i {
    color: #000000;
    font-size: 1rem;
}

.btn-quote:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 170, 64, 0.4);
}

.btn-details {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 170, 64, 0.1);
    color: #D4AA40;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid rgba(212, 170, 64, 0.3);
    font-size: 1.2rem;
}

.btn-details i {
    color: #D4AA40;
    transition: all 0.3s ease;
}

.btn-details:hover {
    background: linear-gradient(135deg, #D4AA40, #BF9835);
    border-color: #D4AA40;
}

.btn-details:hover i {
    color: #000000;
}

/* List View */
.products-grid.list-view {
    grid-template-columns: 1fr;
    gap: 25px;
}

.list-view .product-card {
    display: flex;
    flex-direction: row;
    height: auto;
    min-height: 220px;
}

.list-view .product-image {
    width: 280px;
    min-width: 280px;
    height: 100%;
    min-height: 220px;
}

.list-view .product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 25px;
}

.list-view .product-company {
    margin-bottom: 12px;
}

.list-view .product-name {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.list-view .product-description {
    flex: 1;
    -webkit-line-clamp: 2;
}

.list-view .product-footer {
    margin-top: 15px;
}

.list-view .product-overlay {
    opacity: 0;
}

.list-view .product-card:hover .product-overlay {
    opacity: 1;
}

/* No Products */
.no-products {
    text-align: center;
    padding: 100px 20px;
    background: linear-gradient(135deg, #1a1a1a, #2c2c2c);
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(212, 170, 64, 0.2);
}

.no-products-icon {
    font-size: 5rem;
    color: rgba(212, 170, 64, 0.3);
    margin-bottom: 20px;
}

.no-products h3 {
    font-size: 1.8rem;
    color: #D4AA40;
    margin-bottom: 10px;
}

.no-products p {
    font-size: 1.1rem;
    color: #F2E8C9;
    margin-bottom: 30px;
}

.btn-reset {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #D4AA40, #BF9835);
    color: #000000;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-reset:hover {
    background: linear-gradient(135deg, #A58230, #8B6914);
    color: #F2E8C9;
    transform: translateY(-2px);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    padding: 20px;
    overflow-y: auto;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a1a, #2c2c2c);
    max-width: 600px;
    margin: 50px auto;
    border-radius: 20px;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
    border: 1px solid rgba(212, 170, 64, 0.3);
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(212, 170, 64, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #D4AA40;
}

[dir="rtl"] .modal-close {
    right: auto;
    left: 20px;
}

.modal-close:hover {
    background: #D4AA40;
    color: #000000;
    transform: rotate(90deg);
}

.modal-header {
    padding: 30px;
    background: linear-gradient(135deg, #D4AA40, #BF9835);
    color: #000000;
}

.modal-header h3 {
    font-size: 1.8rem;
    margin: 0;
    color: #000000;
}

.modal-body {
    padding: 30px;
}

/* Quote Form */
.quote-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #D4AA40;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 12px 15px;
    border: 2px solid rgba(212, 170, 64, 0.3);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #2c2c2c;
    color: #F2E8C9;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #D4AA40;
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 170, 64, 0.2);
}

.btn-submit {
    padding: 15px 30px;
    background: linear-gradient(135deg, #D4AA40, #BF9835);
    color: #000000;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(212, 170, 64, 0.3);
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .list-view .product-card {
        flex-direction: column;
        height: auto;
    }

    .list-view .product-image {
        width: 100%;
        height: 250px;
    }
}

@media (max-width: 991px) {
    .products-hero {
        padding-top: 15px !important;
        padding-bottom: 20px !important;
    }
    .products-hero .hero-badge {
        width: 55px !important;
        height: 55px !important;
        margin-bottom: 10px !important;
    }
    .products-hero .hero-badge i {
        font-size: 1.4rem !important;
    }

    /* Product Image - Grid View */
    .products-grid .product-image {
        height: 180px !important;
    }
    .products-grid .product-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* Product Badge - Mobile */
    .product-badge {
        top: 8px !important;
        right: 8px !important;
    }
    [dir="rtl"] .product-badge {
        right: auto !important;
        left: 8px !important;
    }
    .product-badge span {
        padding: 4px 10px !important;
        font-size: 0.7rem !important;
    }
}

@media (max-width: 575px) {
    .products-grid .product-image {
        height: 160px !important;
    }
}

@media (max-width: 480px) {
    .products-grid .product-image {
        height: 140px !important;
    }
    .product-badge {
        top: 6px !important;
        right: 6px !important;
    }
    [dir="rtl"] .product-badge {
        right: auto !important;
        left: 6px !important;
    }
    .product-badge span {
        padding: 3px 8px !important;
        font-size: 0.6rem !important;
    }
}

@media (max-width: 380px) {
    .products-grid .product-image {
        height: 120px !important;
    }
    .product-badge {
        top: 5px !important;
        right: 5px !important;
    }
    [dir="rtl"] .product-badge {
        right: auto !important;
        left: 5px !important;
    }
    .product-badge span {
        padding: 2px 6px !important;
        font-size: 0.55rem !important;
    }
}

@media (max-width: 768px) {
    .products-hero {
        min-height: auto;
        padding-top: 12px !important;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    /* Filters - Single Row Layout */
    .products-filters {
        padding: 10px 0 !important;
        background: #111 !important;
    }

    .filters-wrapper {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        flex-wrap: nowrap !important;
    }

    .filters-right {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px !important;
        flex: 1 !important;
        width: auto !important;
    }

    .filters-left {
        flex-shrink: 0 !important;
        width: auto !important;
    }

    .filter-group {
        flex: 1 !important;
        min-width: 0 !important;
        width: auto !important;
    }

    .filter-label {
        display: none !important;
    }

    .filter-select {
        width: 100% !important;
        padding: 8px 28px 8px 10px !important;
        font-size: 0.7rem !important;
        border-radius: 20px !important;
        background-color: rgba(255, 255, 255, 0.08) !important;
        border: 1px solid rgba(212, 170, 64, 0.25) !important;
    }

    [dir="rtl"] .filter-select {
        padding: 8px 10px 8px 28px !important;
    }

    .view-toggle {
        display: flex !important;
        gap: 4px !important;
    }

    .view-btn {
        width: 30px !important;
        height: 30px !important;
        padding: 0 !important;
        font-size: 0.75rem !important;
        border-radius: 8px !important;
        background: rgba(255, 255, 255, 0.08) !important;
        border: 1px solid rgba(212, 170, 64, 0.25) !important;
    }

    .view-btn.active {
        background: linear-gradient(135deg, #D4AA40, #BF9835) !important;
        color: #000 !important;
        border-color: transparent !important;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }

    .filters-wrapper {
        gap: 6px !important;
    }

    .filters-right {
        gap: 6px !important;
    }

    .filter-select {
        padding: 6px 22px 6px 6px !important;
        font-size: 0.6rem !important;
        border-radius: 15px !important;
    }

    [dir="rtl"] .filter-select {
        padding: 6px 6px 6px 22px !important;
    }

    .view-btn {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.7rem !important;
    }
}

@media (max-width: 480px) {
    .products-hero {
        padding-top: 10px !important;
    }
    .products-hero .hero-badge {
        width: 50px !important;
        height: 50px !important;
    }
    .products-hero .hero-badge i {
        font-size: 1.2rem !important;
    }

    .filters-wrapper {
        gap: 5px !important;
    }

    .filters-right {
        gap: 5px !important;
    }

    .filter-select {
        padding: 5px 20px 5px 5px !important;
        font-size: 0.55rem !important;
        border-radius: 12px !important;
    }

    [dir="rtl"] .filter-select {
        padding: 5px 5px 5px 20px !important;
    }

    .view-btn {
        width: 26px !important;
        height: 26px !important;
        font-size: 0.65rem !important;
        border-radius: 5px !important;
    }
}

/* Print Styles */
@media print {
    .products-hero,
    .products-filters {
        display: none;
    }

    .product-card {
        break-inside: avoid;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
}