/**
 * Dublin Silver Suite - Public Styles
 *
 * @package Dublin_Silver_Suite
 * @since 1.0.0
 */

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */

:root {
    --dss-primary: #000000;
    --dss-secondary: #666666;
    --dss-accent: #c9a961;
    --dss-success: #28a745;
    --dss-warning: #ffc107;
    --dss-error: #dc3545;
    --dss-background: #f8f8f8;
    --dss-white: #ffffff;
    --dss-border: #e0e0e0;
    --dss-text: #333333;
    --dss-text-light: #666666;
    --dss-radius: 4px;
    --dss-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --dss-transition: 0.2s ease;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.dss-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--dss-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--dss-transition);
    text-decoration: none;
    line-height: 1.4;
}

.dss-btn--primary {
    background: var(--dss-primary);
    color: var(--dss-white);
}

.dss-btn--primary:hover {
    background: #333;
    color: var(--dss-white);
}

.dss-btn--secondary {
    background: var(--dss-white);
    color: var(--dss-text);
    border: 1px solid var(--dss-border);
}

.dss-btn--secondary:hover {
    background: var(--dss-background);
    color: var(--dss-text);
}

.dss-btn--small {
    padding: 8px 16px;
    font-size: 13px;
}

.dss-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================================================
   Trust Badges
   ========================================================================== */

.dss-trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.dss-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--dss-background);
    border-radius: var(--dss-radius);
    font-size: 12px;
    color: var(--dss-text);
}

.dss-trust-badge svg,
.dss-trust-badge img {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   Product Page Elements
   ========================================================================== */

.dss-product-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.dss-product-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: var(--dss-primary);
    color: var(--dss-white);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 2px;
}

.dss-product-badge--sale {
    background: var(--dss-error);
}

.dss-product-badge--new {
    background: var(--dss-success);
}

.dss-product-badge--trending {
    background: var(--dss-accent);
    color: var(--dss-primary);
}

/* ==========================================================================
   Social Proof
   ========================================================================== */

.dss-social-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 10px 0;
    font-size: 13px;
}

.dss-viewing-count,
.dss-sales-count,
.dss-low-stock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--dss-text-light);
}

.dss-pulse {
    width: 8px;
    height: 8px;
    background: var(--dss-success);
    border-radius: 50%;
    animation: dss-pulse 2s infinite;
}

@keyframes dss-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.dss-low-stock {
    color: var(--dss-error);
    font-weight: 500;
}

/* ==========================================================================
   Hallmark Display
   ========================================================================== */

.dss-hallmark-icons {
    margin: 15px 0;
}

.dss-hallmark-row {
    display: flex;
    gap: 8px;
    margin-bottom: 5px;
}

.dss-hallmark-icon {
    position: relative;
    width: 32px;
    height: 32px;
    cursor: pointer;
}

.dss-hallmark-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.dss-hallmark-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--dss-white);
    border: 1px solid var(--dss-border);
    border-radius: var(--dss-radius);
    padding: 12px;
    width: 200px;
    box-shadow: var(--dss-shadow);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dss-transition), visibility var(--dss-transition);
    z-index: 100;
}

.dss-hallmark-icon:hover .dss-hallmark-tooltip,
.dss-hallmark-icon:focus .dss-hallmark-tooltip {
    opacity: 1;
    visibility: visible;
}

.dss-hallmark-tooltip strong {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
}

.dss-hallmark-tooltip p {
    font-size: 12px;
    color: var(--dss-text-light);
    margin: 0;
    line-height: 1.4;
}

.dss-hallmark-link {
    font-size: 12px;
    color: var(--dss-text-light);
    text-decoration: underline;
}

.dss-hallmark-link:hover {
    color: var(--dss-primary);
}

/* ==========================================================================
   Wishlist
   ========================================================================== */

.dss-wishlist-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: transparent;
    border: 1px solid var(--dss-border);
    border-radius: var(--dss-radius);
    color: var(--dss-text);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--dss-transition);
}

.dss-wishlist-btn:hover {
    border-color: var(--dss-primary);
}

.dss-wishlist-btn.dss-in-wishlist {
    background: var(--dss-primary);
    border-color: var(--dss-primary);
    color: var(--dss-white);
}

.dss-wishlist-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Loop wishlist icon */
.dss-wishlist-loop {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: var(--dss-white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--dss-shadow);
    transition: all var(--dss-transition);
    z-index: 10;
}

.dss-wishlist-loop:hover {
    transform: scale(1.1);
}

.dss-wishlist-loop.dss-in-wishlist {
    background: var(--dss-primary);
    color: var(--dss-white);
}

/* ==========================================================================
   Cart Suggestions
   ========================================================================== */

.dss-cart-suggestions {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--dss-border);
}

.dss-cart-suggestions h3 {
    font-size: 18px;
    margin-bottom: 20px;
}

.dss-suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.dss-suggestion-card {
    text-align: center;
}

.dss-suggestion-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--dss-radius);
    margin-bottom: 10px;
}

.dss-suggestion-card h4 {
    font-size: 14px;
    margin: 0 0 5px;
    font-weight: 400;
}

.dss-suggestion-card .price {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
}

.dss-quick-add {
    width: 100%;
    padding: 8px 16px;
    background: var(--dss-primary);
    color: var(--dss-white);
    border: none;
    border-radius: var(--dss-radius);
    font-size: 12px;
    cursor: pointer;
    transition: background var(--dss-transition);
}

.dss-quick-add:hover {
    background: #333;
}

/* ==========================================================================
   Frequently Bought Together
   ========================================================================== */

.dss-frequently-bought {
    margin: 30px 0;
    padding: 20px;
    background: var(--dss-background);
    border-radius: var(--dss-radius);
}

.dss-frequently-bought h4 {
    font-size: 16px;
    margin: 0 0 15px;
}

.dss-fbt-products {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.dss-fbt-product {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--dss-white);
    border-radius: var(--dss-radius);
}

.dss-fbt-product img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--dss-radius);
}

.dss-fbt-plus {
    font-size: 20px;
    color: var(--dss-text-light);
}

.dss-fbt-total {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    margin-bottom: 15px;
}

.dss-fbt-total-price {
    font-weight: 600;
}

.dss-fbt-add-all {
    padding: 12px 24px;
    background: var(--dss-primary);
    color: var(--dss-white);
    border: none;
    border-radius: var(--dss-radius);
    font-size: 14px;
    cursor: pointer;
    transition: background var(--dss-transition);
}

.dss-fbt-add-all:hover {
    background: #333;
}

/* ==========================================================================
   Delivery Estimator
   ========================================================================== */

.dss-delivery-estimate {
    margin: 15px 0;
    padding: 15px;
    background: var(--dss-background);
    border-radius: var(--dss-radius);
}

.dss-delivery-estimate-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dss-delivery-estimate-title svg {
    width: 18px;
    height: 18px;
}

.dss-delivery-estimate-message {
    font-size: 13px;
    color: var(--dss-text-light);
}

.dss-delivery-estimate--same-day {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.dss-delivery-estimate--same-day .dss-delivery-estimate-title {
    color: var(--dss-success);
}

/* ==========================================================================
   Payment Method Notice
   ========================================================================== */

.dss-payment-notice {
    padding: 12px 15px;
    background: rgba(23, 162, 184, 0.1);
    border: 1px solid rgba(23, 162, 184, 0.3);
    border-radius: var(--dss-radius);
    margin-bottom: 15px;
    font-size: 13px;
    color: #0c5460;
}

.dss-payment-notice--warning {
    background: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.3);
    color: #856404;
}

/* ==========================================================================
   Notifications
   ========================================================================== */

.dss-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 20px;
    background: var(--dss-white);
    border-radius: var(--dss-radius);
    box-shadow: var(--dss-shadow);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    animation: dss-slide-up 0.3s ease;
    max-width: 350px;
}

@keyframes dss-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dss-notification--success {
    border-left: 4px solid var(--dss-success);
}

.dss-notification--error {
    border-left: 4px solid var(--dss-error);
}

.dss-notification-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--dss-text-light);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

/* ==========================================================================
   Loading States
   ========================================================================== */

.dss-loading {
    position: relative;
    pointer-events: none;
}

.dss-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--dss-border);
    border-top-color: var(--dss-primary);
    border-radius: 50%;
    animation: dss-spin 0.6s linear infinite;
}

@keyframes dss-spin {
    to { transform: rotate(360deg); }
}

.dss-skeleton {
    background: linear-gradient(90deg, var(--dss-background) 25%, #e8e8e8 50%, var(--dss-background) 75%);
    background-size: 200% 100%;
    animation: dss-skeleton 1.5s ease-in-out infinite;
    border-radius: var(--dss-radius);
}

@keyframes dss-skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.dss-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles */
.dss-btn:focus,
.dss-wishlist-btn:focus,
.dss-quick-add:focus {
    outline: 2px solid var(--dss-primary);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
