/* ═══════════════════════════════════════════════════════════
   Noghte Shop - Complete Stylesheet v2.0
   ═══════════════════════════════════════════════════════════ */

:root {
    --noghte-primary: #00447f;
    --noghte-secondary: #003366;
    --noghte-bg: #ffffff;
    --noghte-text: #1a1c1c;
    --noghte-border: #e0e0e0;
    --noghte-badge: #d32f2f;
    --noghte-gap: 24px;
    --noghte-radius: 16px;
    --noghte-padding: 16px;
    --noghte-title-size: 16px;
    --noghte-price-size: 18px;
}

/* ════════════════════════════════════════════════════════════ 
   BASE STYLES
   ════════════════════════════════════════════════════════════ */

.noghte-products-widget,
.noghte-products-widget * {
    box-sizing: border-box;
}

.noghte-products-widget {
    direction: rtl;
    font-family: inherit;
    background: transparent;
    color: var(--noghte-text);
}

/* ════════════════════════════════════════════════════════════ 
   FILTER SECTION
   ════════════════════════════════════════════════════════════ */

.noghte-filter-section {
    background: linear-gradient(135deg, rgba(0, 68, 127, 0.05) 0%, var(--noghte-bg) 100%);
    border: 1.5px solid var(--noghte-primary);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 4px 16px rgba(0, 68, 127, 0.08);
    animation: slideInDown 0.5s ease-out;
}

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

.noghte-filter-section h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 800;
    color: var(--noghte-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.noghte-filter-section h3 .material-symbols-outlined {
    font-size: 24px;
}

.noghte-filter-form {
    display: grid;
    gap: 16px;
}

.noghte-filter-form > div {
    display: grid;
    gap: 10px;
}

.noghte-filter-form label {
    font-size: 13px;
    font-weight: 700;
    color: var(--noghte-text);
    display: block;
}

.noghte-filter-inputs-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.noghte-filter-form input[type="number"],
.noghte-filter-form input[type="text"] {
    border: 2px solid var(--noghte-border);
    border-radius: 10px;
    padding: 12px 14px;
    background: var(--noghte-bg);
    color: var(--noghte-text);
    font-size: 14px;
    text-align: right;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.noghte-filter-form input[type="number"]:focus,
.noghte-filter-form input[type="text"]:focus {
    outline: none;
    border-color: var(--noghte-primary);
    background: var(--noghte-bg);
    box-shadow: 0 0 0 4px rgba(0, 68, 127, 0.12);
    transform: translateY(-2px);
}

.noghte-filter-form input::placeholder {
    color: #999;
}

/* Filter Categories */

.noghte-filter-categories {
    display: grid;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 4px;
}

.noghte-filter-categories::-webkit-scrollbar {
    width: 6px;
}

.noghte-filter-categories::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.noghte-filter-categories::-webkit-scrollbar-thumb {
    background: var(--noghte-primary);
    border-radius: 10px;
}

.noghte-filter-categories::-webkit-scrollbar-thumb:hover {
    background: var(--noghte-secondary);
}

.noghte-filter-category {
    background: var(--noghte-bg);
    border: 2px solid var(--noghte-border);
    border-radius: 10px;
    padding: 10px 14px;
    color: var(--noghte-text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: right;
    display: flex;
    align-items: center;
    gap: 10px;
}

.noghte-filter-category input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--noghte-primary);
}

.noghte-filter-category:hover {
    border-color: var(--noghte-primary);
    background: rgba(0, 68, 127, 0.05);
    color: var(--noghte-primary);
    transform: translateX(4px);
}

.noghte-filter-category.active {
    background: var(--noghte-primary);
    border-color: var(--noghte-primary);
    color: #fff;
}

/* Filter Button */

.noghte-filter-btn {
    background: linear-gradient(135deg, var(--noghte-primary) 0%, var(--noghte-secondary) 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(0, 68, 127, 0.2);
}

.noghte-filter-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 68, 127, 0.3);
}

.noghte-filter-btn:active {
    transform: translateY(-1px);
}

.noghte-filter-btn .material-symbols-outlined {
    font-size: 20px;
}

/* ════════════════════════════════════════════════════════════ 
   PRODUCT GRID
   ════════════════════════════════════════════════════════════ */

.noghte-product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--noghte-gap);
    margin-bottom: 40px;
}

.noghte-no-products {
    grid-column: 1 / -1;
    padding: 80px 40px;
    text-align: center;
    color: var(--noghte-text);
    font-size: 18px;
    font-weight: 600;
    background: linear-gradient(135deg, #f5f5f5 0%, #fafafa 100%);
    border: 2px dashed var(--noghte-border);
    border-radius: 16px;
}

/* ════════════════════════════════════════════════════════════ 
   PRODUCT CARD
   ════════════════════════════════════════════════════════════ */

.noghte-card {
    background: var(--noghte-bg);
    border: 1px solid var(--noghte-border);
    border-radius: var(--noghte-radius);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.noghte-card:hover {
    transform: translateY(-8px);
    border-color: var(--noghte-primary);
    box-shadow: 0 12px 32px rgba(0, 68, 127, 0.15);
}

/* ════════════════════════════════════════════════════════════ 
   CARD IMAGE
   ════════════════════════════════════════════════════════════ */

.noghte-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    overflow: hidden;
}

.noghte-card-image a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

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

.noghte-card:hover .noghte-card-image img {
    transform: scale(1.15);
}

/* ════════════════════════════════════════════════════════════ 
   BADGE
   ════════════════════════════════════════════════════════════ */

.noghte-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    background: var(--noghte-badge);
    color: #fff;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.35);
    animation: slideInTop 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ════════════════════════════════════════════════════════════ 
   CARD BODY
   ════════════════════════════════════════════════════════════ */

.noghte-card-body {
    padding: var(--noghte-padding);
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ════════════════════════════════════════════════════════════ 
   CARD TITLE
   ════════════════════════════════════════════════════════════ */

.noghte-card-title {
    margin: 0 0 10px 0;
    font-size: var(--noghte-title-size);
    font-weight: 700;
    line-height: 1.4;
    color: var(--noghte-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.noghte-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.noghte-card-title a:hover {
    color: var(--noghte-primary);
}

/* ════════════════════════════════════════════════════════════ 
   RATING
   ════════════════════════════════════════════════════════════ */

.noghte-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 68, 127, 0.08);
    color: var(--noghte-primary);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    width: fit-content;
    margin-bottom: 10px;
}

/* ════════════════════════════════════════════════════════════ 
   CARD FOOTER
   ════════════════════════════════════════════════════════════ */

.noghte-card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(224, 224, 224, 0.4);
}

/* ════════════════════════════════════════════════════════════ 
   PRICE
   ════════════════════════════════════════════════════════════ */

.noghte-price {
    font-size: var(--noghte-price-size);
    font-weight: 900;
    color: var(--noghte-primary);
}

.noghte-price .woocommerce-Price-amount {
    color: inherit;
    font-weight: inherit;
}

.noghte-price del {
    color: #999;
    font-size: 12px;
    font-weight: 600;
    display: block;
    opacity: 0.8;
}

.noghte-price del .woocommerce-Price-amount {
    color: inherit;
    font-weight: inherit;
}

.noghte-price ins {
    text-decoration: none;
}

/* ════════════════════════════════════════════════════════════ 
   ADD TO CART BUTTON
   ════════════════════════════════════════════════════════════ */

.noghte-add-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--noghte-primary) 0%, var(--noghte-secondary) 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 68, 127, 0.2);
}

.noghte-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 68, 127, 0.3);
}

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

.noghte-add-cart .material-symbols-outlined {
    font-size: 20px;
    line-height: 1;
}

.noghte-add-cart span:not(.material-symbols-outlined) {
    display: block;
}

/* ════════════════════════════════════════════════════════════ 
   MATERIAL ICONS
   ════════════════════════════════════════════════════════════ */

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
}

/* ════════════════════════════════════════════════════════════ 
   PAGINATION
   ════════════════════════════════════════════════════════════ */

.noghte-pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    padding: 24px 0 0 0;
    border-top: 1px solid var(--noghte-border);
}

.noghte-page-numbers {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.noghte-page-numbers a,
.noghte-page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    border: 2px solid var(--noghte-border);
    border-radius: 10px;
    background: var(--noghte-bg);
    color: var(--noghte-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.noghte-page-numbers a:hover {
    border-color: var(--noghte-primary);
    background: rgba(0, 68, 127, 0.08);
    color: var(--noghte-primary);
    transform: translateY(-2px);
}

.noghte-page-numbers .current {
    background: linear-gradient(135deg, var(--noghte-primary) 0%, var(--noghte-secondary) 100%);
    color: #fff;
    border-color: transparent;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(0, 68, 127, 0.2);
}

/* ════════════════════════════════════════════════════════════ 
   RESPONSIVE DESIGN
   ════════════════════════════════════════════════════════════ */

@media (max-width: 1200px) {
    .noghte-product-grid {
        gap: calc(var(--noghte-gap) * 0.85);
    }
}

@media (max-width: 992px) {
    .noghte-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .noghte-filter-section {
        padding: 20px;
        margin-bottom: 24px;
    }

    .noghte-filter-section h3 {
        font-size: 16px;
        margin-bottom: 16px;
    }

    .noghte-filter-btn {
        padding: 12px 20px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .noghte-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .noghte-card-image {
        aspect-ratio: 3 / 4;
    }

    .noghte-card-body {
        padding: 12px;
    }

    .noghte-card-title {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .noghte-price {
        font-size: 16px;
    }

    .noghte-add-cart {
        padding: 8px 12px;
        font-size: 12px;
    }

    .noghte-filter-section {
        padding: 16px;
    }

    .noghte-filter-inputs-row {
        grid-template-columns: 1fr 1fr;
    }

    .noghte-page-numbers a,
    .noghte-page-numbers span {
        min-width: 36px;
        height: 36px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .noghte-product-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .noghte-card {
        border-radius: 12px;
    }

    .noghte-badge {
        padding: 6px 12px;
        font-size: 12px;
    }

    .noghte-card-title {
        font-size: 13px;
    }

    .noghte-price {
        font-size: 14px;
    }

    .noghte-card-footer {
        gap: 8px;
        padding-top: 8px;
    }

    .noghte-filter-section {
        padding: 14px;
        margin-bottom: 16px;
        border-radius: 12px;
    }

    .noghte-filter-section h3 {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .noghte-filter-form {
        gap: 12px;
    }

    .noghte-filter-inputs-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .noghte-filter-btn {
        padding: 12px;
        font-size: 12px;
        margin-top: 4px;
    }

    .noghte-filter-categories {
        max-height: 150px;
    }

    .noghte-page-numbers {
        gap: 4px;
    }

    .noghte-page-numbers a,
    .noghte-page-numbers span {
        min-width: 34px;
        height: 34px;
        font-size: 11px;
    }
}

/* ════════════════════════════════════════════════════════════ 
   PRINT STYLES
   ════════════════════════════════════════════════════════════ */

@media print {
    .noghte-filter-section,
    .noghte-add-cart,
    .noghte-pagination {
        display: none;
    }

    .noghte-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* ════════════════════════════════════════════════════════════ 
   ANIMATIONS
   ════════════════════════════════════════════════════════════ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.noghte-card {
    animation: fadeIn 0.5s ease-out;
}

/* ════════════════════════════════════════════════════════════ 
   DARK MODE
   ════════════════════════════════════════════════════════════ */

@media (prefers-color-scheme: dark) {
    :root {
        --noghte-bg: #2a2a2a;
        --noghte-text: #e0e0e0;
        --noghte-border: #404040;
    }

    .noghte-filter-section {
        background: linear-gradient(135deg, rgba(0, 68, 127, 0.12) 0%, #2a2a2a 100%);
    }

    .noghte-filter-form input[type="number"],
    .noghte-filter-form input[type="text"] {
        background: #1a1a1a;
        color: #e0e0e0;
    }

    .noghte-filter-form input[type="number"]:focus,
    .noghte-filter-form input[type="text"]:focus {
        background: #2a2a2a;
    }

    .noghte-no-products {
        background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%);
        border-color: #404040;
        color: #e0e0e0;
    }
}
