/* 
 * Puerta Roja - Footer Styles
 * Elegant, grid-based, responsive footer matching Shopify Dawn aesthetics.
 */

.pr-footer {
    border-top: 1px solid var(--pr-color-border, #e1e3e5);
    padding: 60px 0 40px;
    font-family: var(--pr-font-family, 'Inter', sans-serif);
    font-size: 14px;
}

.pr-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 1. Newsletter Section */
.pr-footer-newsletter {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 60px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.pr-footer-newsletter .pr-footer-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.pr-footer-desc {
    margin-bottom: 24px;
    opacity: 0.8;
}

.pr-newsletter-form {
    width: 100%;
}

.pr-newsletter-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.pr-newsletter-input-group input {
    width: 100%;
    padding: 14px 50px 14px 16px;
    background: transparent;
    border: 1px solid currentColor;
    border-radius: 4px;
    outline: none;
    font-size: 15px;
    transition: box-shadow 0.2s ease;
}

.pr-newsletter-input-group input:focus {
    box-shadow: 0 0 0 1px currentColor;
}

.pr-newsletter-input-group input::placeholder {
    color: currentColor;
    opacity: 0.6;
}

.pr-newsletter-input-group button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: currentColor;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.pr-newsletter-input-group button:hover {
    opacity: 0.6;
}

/* 2. Grid Columns */
.pr-footer-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.pr-footer-col {
    display: flex;
    flex-direction: column;
}

.pr-footer-col-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pr-accordion-icon {
    display: none; /* hidden on desktop */
    transition: transform 0.3s ease;
}

.pr-accordion-content {
    overflow: hidden;
}

@media (min-width: 601px) {
    .pr-accordion-content {
        max-height: none !important; /* Forces desktop to ignore JS limits */
    }
}

/* Footer Menus */
.pr-footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pr-footer-menu li {
    margin-bottom: 12px;
}

.pr-footer-menu a {
    color: inherit;
    text-decoration: none;
    opacity: 0.75;
    transition: opacity 0.2s ease;
}

.pr-footer-menu a:hover {
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* 3. Bottom Bar */
.pr-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid currentColor;
    padding-top: 24px;
    opacity: 0.8;
}

.pr-footer-copyright p {
    margin: 0;
    font-size: 13px;
}

.pr-legal-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
    font-size: 13px;
}

.pr-legal-menu-list a {
    color: inherit;
    text-decoration: none;
    opacity: 0.75;
}

.pr-legal-menu-list a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Social Icons */
.pr-footer-social {
    display: flex;
    gap: 16px;
    align-items: center;
}

.pr-footer-social a {
    color: inherit;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.pr-footer-social a:hover {
    transform: translateY(-2px);
    opacity: 0.7;
}

/* Payments */
.pr-footer-payments {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.pr-payment-icon {
    display: block;
    height: 24px;
    width: auto;
}

/* Responsive */
@media (max-width: 1024px) {
    .pr-footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .pr-footer {
        padding: 40px 0 30px;
    }
    
    .pr-footer-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .pr-footer-col {
        border-bottom: 1px solid rgba(0,0,0,0.05); /* very subtle */
        padding: 15px 0;
    }
    
    .pr-footer-col:last-child {
        border-bottom: none;
    }

    .pr-footer-col-title {
        margin-bottom: 0px;
        cursor: pointer;
    }
    
    .pr-col-static .pr-footer-col-title {
        cursor: default;
        margin-bottom: 15px;
    }

    .pr-accordion-icon {
        display: block;
    }

    .pr-col-accordion.pr-open .pr-accordion-icon {
        transform: rotate(180deg);
    }

    .pr-col-accordion .pr-accordion-content {
        max-height: 0;
        transition: max-height 0.3s ease-out;
    }

    .pr-col-accordion.pr-open .pr-accordion-content {
        /* JS handles max-height */
    }
    
    .pr-footer-menu {
        padding-top: 15px; /* Adds space when opened */
    }

    .pr-footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        margin-top: 20px;
    }
    
    .pr-legal-menu-list {
        justify-content: center;
        flex-wrap: wrap;
    }
}
