/**
 * Survival Product Card Block Styles
 * Based on modern tactical/survival gear product card design
 */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* Main Container */
.survival-product-card {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.spcard-container {
    width: 100%;
    /* max-width: 42rem; */
    margin: 0 auto;
}

/* Card Component */
.spcard-article {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: #25262b;
    border: 1px solid #35363c;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease-out;
}

.spcard-article:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 165, 39, 0.4);
}

/* Ranking Badge */
.spcard-ranking-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 20;
}

.spcard-ranking-badge-inner {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background-color: #ffa527;
    color: #1d1e23;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.spcard-ranking-badge-text {
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Image Section */
.spcard-image-section {
    position: relative;
    width: 100%;
    height: 16rem;
    overflow: hidden;
    background-color: #fff;
}

@media (min-width: 768px) {
    .spcard-image-section {
        height: 20rem;
    }
}

.spcard-product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    opacity: 0.9;
    transition: all 0.7s ease-in-out;
}

.spcard-article:hover .spcard-product-image {
    transform: scale(1.05);
    opacity: 1;
}

.spcard-image-overlay {
    position: absolute;
    inset: 0;
    /* background: linear-gradient(to top, #25262b, transparent, transparent); */
    /* opacity: 0.8; */
}

/* Content Section */
.spcard-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    position: relative;
}

@media (min-width: 768px) {
    .spcard-content {
        padding: 2rem;
    }
}

/* Header */
.spcard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.spcard-header-left {
    flex: 1;
}

.spcard-brand-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.spcard-brand {
    color: #ffa527;
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.spcard-stars {
    display: flex;
    gap: 0.125rem;
}

.spcard-star-icon {
    width: 0.875rem;
    height: 0.875rem;
    color: #4b5563;
}

.spcard-star-icon.spcard-star-filled {
    color: #ffa527;
}

.spcard-rating-text {
    color: #6b7280;
    font-size: 0.75rem;
    margin-left: 0.25rem;
}

.spcard-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: #ffffff;
    letter-spacing: -0.025em;
    line-height: 1.2;
    transition: color 0.3s;
    margin: 0;
}

.spcard-article:hover .spcard-title {
    color: #ffa527;
}

/* Bookmark Button */
.spcard-bookmark-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: #6b7280;
    transition: color 0.2s;
}

.spcard-bookmark-btn:hover {
    color: #ffffff;
}

.spcard-bookmark-icon {
    width: 1.25rem;
    height: 1.25rem;
}

/* Technical Specs Grid */
.spcard-specs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-top: 1px solid #35363c;
    border-bottom: 1px solid #35363c;
    padding: 1rem 0;
}

.spcard-spec-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.spcard-spec-label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: #6b7280;
}

.spcard-spec-icon {
    width: 0.875rem;
    height: 0.875rem;
}

.spcard-spec-label span {
    font-size: 0.75rem;
    font-weight: 500;
}

.spcard-spec-value {
    font-size: 0.875rem;
    color: #e5e7eb;
    font-family: 'JetBrains Mono', monospace;
}

/* Description */
.spcard-description {
    color: #9ca3af;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* Action Buttons */
.spcard-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: auto;
}

@media (min-width: 640px) {
    .spcard-actions {
        flex-direction: row;
        align-items: center;
    }
}

.spcard-btn-primary {
    position: relative;
    flex: 1;
    overflow: hidden;
    background-color: #ffa527;
    border-radius: 0.5rem;
    padding: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: transform 0.1s;
}

.spcard-btn-primary:active {
    transform: scale(0.95);
}

.spcard-btn-shimmer {
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(100%);
    transition: transform 0.3s;
}

.spcard-btn-primary:hover .spcard-btn-shimmer {
    transform: translateY(0);
}

.spcard-btn-content {
    color: #1d1e23;
    font-weight: 600;
    font-size: 0.875rem;
    position: relative;
    z-index: 10;
}

.spcard-btn-arrow {
    width: 1rem;
    height: 1rem;
    color: #1d1e23;
    position: relative;
    z-index: 10;
    transition: transform 0.3s;
}

.spcard-btn-primary:hover .spcard-btn-arrow {
    transform: translate(0.25rem, -0.25rem);
}

.spcard-btn-secondary {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #35363c;
    color: #d1d5db;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

@media (min-width: 640px) {
    .spcard-btn-secondary {
        width: auto;
    }
}

.spcard-btn-secondary:hover {
    color: #ffffff;
    border-color: #6b7280;
}

/* Stock Indicator */
.spcard-stock-indicator {
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .spcard-stock-indicator {
        justify-content: flex-start;
    }
}

.spcard-stock-pulse {
    position: relative;
    display: flex;
    height: 0.5rem;
    width: 0.5rem;
}

.spcard-stock-ping {
    position: absolute;
    display: inline-flex;
    height: 100%;
    width: 100%;
    border-radius: 9999px;
    background-color: #34d399;
    opacity: 0.75;
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.spcard-stock-dot {
    position: relative;
    display: inline-flex;
    border-radius: 9999px;
    height: 0.5rem;
    width: 0.5rem;
    background-color: #10b981;
}

.spcard-stock-text {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    font-weight: 500;
}

/* Animations */
@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Selection Color */
.survival-product-card ::selection {
    background-color: #ffa527;
    color: #1d1e23;
}

/* ========================================
   LIGHT THEME STYLES
   ======================================== */

/* Light Theme Card Component */
.survival-product-card.spcard-light .spcard-article {
    background-color: #ffffff;
    border-color: #e5e7eb;
}

.survival-product-card.spcard-light .spcard-article:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 165, 39, 0.4);
}

/* Light Theme Image Section */
.survival-product-card.spcard-light .spcard-image-section {
    /* background-color: #f9fafb; */
    background-color: #fff;
}

.survival-product-card.spcard-light .spcard-image-overlay {
    /* background: linear-gradient(to top, #ffffff, transparent, transparent);
    opacity: 0.8; */
}

/* Light Theme Header & Text */
.survival-product-card.spcard-light .spcard-title {
    color: #111827;
}

.survival-product-card.spcard-light .spcard-article:hover .spcard-title {
    color: #ffa527;
}

.survival-product-card.spcard-light .spcard-rating-text {
    color: #6b7280;
}

/* Light Theme Bookmark Button */
.survival-product-card.spcard-light .spcard-bookmark-btn {
    color: #9ca3af;
}

.survival-product-card.spcard-light .spcard-bookmark-btn:hover {
    color: #111827;
}

/* Light Theme Specs Grid */
.survival-product-card.spcard-light .spcard-specs-grid {
    border-top-color: #f3f4f6;
    border-bottom-color: #f3f4f6;
}

.survival-product-card.spcard-light .spcard-spec-label {
    color: #6b7280;
}

.survival-product-card.spcard-light .spcard-spec-value {
    color: #111827;
}

/* Light Theme Description */
.survival-product-card.spcard-light .spcard-description {
    color: #4b5563;
}

/* Light Theme Secondary Button */
.survival-product-card.spcard-light .spcard-btn-secondary {
    border-color: #e5e7eb;
    color: #4b5563;
}

.survival-product-card.spcard-light .spcard-btn-secondary:hover {
    color: #111827;
    border-color: #d1d5db;
}

/* Light Theme Stock Indicator */
.survival-product-card.spcard-light .spcard-stock-text {
    color: #6b7280;
}
