1import{o as s,c as o,a as t,b as d,t as a,z as v,r as C,h as _,u as c,F as g,j as $,n as M,H as L,k as y,C as B,l as H,m as S,x as T}from"./app-CZ8j20MO.js";import{_ as V}from"./NavMenu-WjGHzDj2.js";import{F as R}from"./Footer-K7cAbu2D.js";import{u as U}from"./i18n-DF00xIc4.js";import{_ as X}from"./Breadcrumb-BP9ibbO4.js";import{_ as E}from"./ButtonShowMore-DTU-D5-A.js";import{M as A}from"./move-right-DyauKlII.js";import"./logo-corralejo-BwGFQRCK.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./createLucideIcon-CvJdMrTM.js";const G={class:"relative h-50 sm:h-80 w-full overflow-hidden bg-black text-white mb-3"},D={class:"absolute inset-0 overflow-hidden"},O=["src","alt"],J=["src"],K=["src"],Q={class:"absolute inset-0 flex items-center justify-center px-8"},W={class:"flex flex-row flex-wrap items-baseline justify-center gap-4 mt-5 max-w-5xl w-full text-center"},Y={class:"text-2xl sm:text-4xl font-medium text-center w-full",style:{"font-family":"Cinzel"}},Z={key:0,class:"text-5xl sm:text-5xl font-semibold text-yellow-title tracking-wide text-center w-full",style:{"font-family":"VivaBeautiful"}},P={__name:"HeroProduct",props:{title:{type:String,required:!0},subtitle:{type:String,default:null},media:{type:String,default:null},mediaType:{type:String,default:null,validator:e=>!e||["image","video","youtube"].includes(e)}},setup(e){const l=e,m=v(()=>{if(l.mediaType)return l.mediaType;if(!l.media)return null;const i=l.media.toLowerCase();return i.includes("youtube.com")||i.includes("youtu.be")?"youtube":i.match(/\.(jpg|jpeg|png|gif|webp|svg)$/)?"image":i.match(/\.(mp4|webm|ogg)$/)?"video":"image"}),b=v(()=>{if(m.value!=="youtube"||!l.media)return null;let i="";const u=l.media;return u.includes("youtube.com/watch?v=")?i=u.split("v=")[1]?.split("&")[0]:u.includes("youtu.be/")?i=u.split("youtu.be/")[1]?.split("?")[0]:u.includes("youtube.com/embed/")?i=u.split("embed/")[1]?.split("?")[0]:i=u,`https://www.youtube.com/embed/${i}?autoplay=1&mute=1&controls=0&loop=1&playlist=${i}&playsinline=1&modestbranding=1&rel=0`});return(i,u)=>(s(),o("section",G,[t("div",D,[m.value==="image"&&e.media?(s(),o("img",{key:0,src:e.media,alt:e.title,class:"absolute left-1/2 top-1/2 h-full w-full -translate-x-1/2 -translate-y-1/2 object-cover"},null,8,O)):m.value==="video"&&e.media?(s(),o("video",{key:1,src:e.media,class:"absolute left-1/2 top-1/2 h-full w-full -translate-x-1/2 -translate-y-1/2 object-cover",autoplay:"",muted:"",loop:"",playsinline:""},null,8,J)):m.value==="youtube"&&b.value?(s(),o("iframe",{key:2,class:"absolute left-1/2 top-1/2 h-[56.25vw] min-h-full w-[177.78vh] min-w-full -translate-x-1/2 -translate-y-1/2",src:b.value,title:"Background video",frameborder:"0",allow:"autoplay; encrypted-media; picture-in-picture",allowfullscreen:""},null,8,K)):d("",!0)]),u[0]||(u[0]=t("div",{class:"absolute inset-0 bg-linear-to-r from-indigo-700/40 via-black/40 to-lime-700/40"},null,-1)),t("div",Q,[t("div",W,[t("p",Y,a(e.title),1),l.subtitle?(s(),o("p",Z,a(l.subtitle),1)):d("",!0)])])]))}},tt={class:"min-h-screen bg-gray-50"},et={class:"page-container py-5"},st={class:"grid grid-cols-1 gap-8 lg:grid-cols-3"},ot={class:"lg:col-span-2"},lt={class:"lg:hidden"},rt={class:"aspect-square w-full overflow-hidden rounded-lg bg-black shadow-lg"},at=["src"],ct=["src","alt"],it={class:"mt-3 flex gap-3 overflow-x-auto pb-2 snap-x snap-mandatory scrollbar-none"},nt=["onClick"],dt=["src"],ut=["src","alt"],ht={class:"hidden lg:block"},pt={class:"grid grid-cols-2 gap-4"},vt={key:0,class:"aspect-square overflow-hidden rounded-lg bg-black shadow-lg"},mt=["src"],ft={key:1,class:"aspect-square overflow-hidden rounded-lg bg-white shadow-lg"},gt=["src","alt"],yt={key:1,class:"aspect-square overflow-hidden rounded-lg bg-white shadow-lg"},bt=["src","alt"],_t={key:0,class:"relative mt-4"},wt={class:"grid grid-cols-2 gap-4 pt-4"},xt={key:0,class:"aspect-square overflow-hidden rounded-lg bg-black shadow-lg"},kt=["src"],$t={key:1,class:"aspect-square overflow-hidden rounded-lg bg-white shadow-lg"},jt=["src","alt"],Ct={key:0,class:"pointer-events-none absolute bottom-full left-0 w-full h-24 bg-linear-to-t from-gray-50 to-transparent"},Mt={class:"space-y-6"},It={class:"text-2xl font-bold text-gray-900 leading-tight"},zt={class:"mt-1 text-2xl font-bold text-gray-900"},Bt=["href"],Ht={class:"border-t border-gray-200 pt-4"},qt={class:"mb-2 text-sm font-bold uppercase tracking-widest text-gray-900"},Nt=["innerHTML"],Ft={class:"border-t border-gray-200 pt-4"},Lt={class:"mb-3 text-sm font-bold uppercase tracking-widest text-gray-900"},St={class:"space-y-2 text-sm text-gray-700"},Tt={key:0},Vt={class:"font-semibold text-gray-900"},Rt={key:1},Ut={class:"font-semibold text-gray-900"},Xt={key:2},Et={class:"font-semibold text-gray-900"},At={key:3},Gt={class:"font-semibold text-gray-900"},Dt={key:4},Ot={class:"font-semibold text-gray-900"},Jt={key:5},Kt={class:"font-semibold text-gray-900"},Qt={class:"border-t border-gray-200 pt-4"},Wt={class:"text-xs font-bold uppercase tracking-wide text-gray-800"},Yt={class:"mt-1 text-xs uppercase tracking-wide text-gray-700"},Zt={class:"border-t border-gray-200 pt-4"},Pt={class:"mb-3 text-sm font-bold uppercase tracking-widest text-gray-900"},te={class:"flex gap-3"},ee=["href"],se=["href"],oe=["href"],le={key:0,class:"mt-16"},re={class:"mb-8 text-center"},ae={class:"text-4xl uppercase tracking-wide text-corralejo-700",style:{"font-family":"'Cinzel', serif"}},ce={class:"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-4"},ie={class:"aspect-square overflow-hidden"},ne=["src","alt"],de={class:"p-4 text-center"},ue={class:"font-semibold text-corralejo-700"},he={key:0,class:"mt-2 text-lg font-bold text-corralejo-gold-400"},pe={class:"mt-8 text-center mb-28"},$e={__name:"Show",props:{product:{type:Object,required:!0},relatedProducts:{type:Array,default:()=>[]}},setup(e){const{t:l}=U(),m=T(),b=v(()=>m.props.urls||{}),i=e,u=v(()=>{const h=i.product.sale_price||i.product.base_price;return new Intl.NumberFormat("es-MX",{style:"currency",currency:"MXN"}).format(h)}),w=v(()=>i.product.cover_slider),q=v(()=>i.product.images||[]),N=["mp4","webm","ogg","mov","mkv","avi"],x=v(()=>q.value.map(h=>{const n=h&&(h.path||h.url)||h||"",p=((n||"").split("?")[0].split(".").pop()||"").toLowerCase(),z=N.includes(p)?"video":"image";return{path:n,type:z}})),F=v(()=>x.value.slice(0,4)),j=v(()=>x.value.slice(4)),f=C(!1);C(w.value);const I=C(null),k=v(()=>I.value??x.value[0]??{path:w.value,type:"image"});
1return(h,n)=>(s(),o("div",tt,[_(V,{overlay:!0}),_(P,{title:e.product.title,media:w.value,"media-type":"image"},null,8,["title","media"]),t("div",et,[_(X,{items:[...e.product.categories&&e.product.categories.length>0?[{label:c(l)("nav.products"),href:b.value.products||"/productos"},{label:e.product.categories[0].name,href:`/productos/categoria/${e.product.categories[0].slug}`}]:[{label:c(l)("nav.products"),href:b.value.products||"/productos"}],{label:e.product.title}]},null,8,["items"]),t("div",st,[t("div",ot,[t("div",lt,[t("div",rt,[k.value.type==="video"?(s(),o("video",{key:0,src:k.value.path,class:"h-full w-full object-cover",autoplay:"",muted:"",loop:"",playsinline:""},null,8,at)):(s(),o("img",{key:1,src:k.value.path,alt:e.product.title,class:"h-full w-full object-cover transition-opacity duration-300"},null,8,ct))]),t("div",it,[(s(!0),o(g,null,$(x.value,(r,p)=>(s(),o("button",{key:p,type:"button",onClick:z=>I.value=r,class:M(["shrink-0 snap-start h-20 w-20 overflow-hidden rounded-md border-2 transition-all",k.value.path===r.path?"border-black":"border-gray-200"])},[r.type==="video"?(s(),o("video",{key:0,src:r.path,class:"h-full w-full object-cover pointer-events-none",muted:""},null,8,dt)):(s(),o("img",{key:1,src:r.path,alt:`${e.product.title} - ${p+1}`,class:"h-full w-full object-cover"},null,8,ut))],10,nt))),128))])]),t("div",ht,[t("div",pt,[(s(!0),o(g,null,$(F.value,(r,p)=>(s(),o(g,{key:p},[r?(s(),o(g,{key:0},[r.type==="video"?(s(),o("div",vt,[t("video",{src:r.path,class:"h-full w-full object-cover",autoplay:"",muted:"",loop:"",playsinline:""},null,8,mt)])):(s(),o("div",ft,[t("img",{src:r.path,alt:`${e.product.title} - ${p+1}`,class:"h-full w-full object-cover transition-transform duration-300 hover:scale-105"},null,8,gt)]))],64)):(s(),o("div",yt,[t("img",{src:w.value,alt:e.product.title,class:"h-full w-full object-cover transition-transform duration-300 hover:scale-105"},null,8,bt)]))],64))),128))]),j.value.length>0?(s(),o("div",_t,[t("div",{class:"overflow-hidden transition-all duration-700 ease-in-out",style:L(f.value?"max-height: 2000px; opacity: 1;":"max-height: 0px; opacity: 0;")},[t("div",wt,[(s(!0),o(g,null,$(j.value,(r,p)=>(s(),o(g,{key:p},[r.type==="video"?(s(),o("div",xt,[t("video",{src:r.path,class:"h-full w-full object-cover",controls:"",playsinline:""},null,8,kt)])):(s(),o("div",$t,[t("img",{src:r.path,alt:`${e.product.title} - extra ${p+1}`,class:"h-full w-full object-cover"},null,8,jt)]))],64))),128))])],4),t("div",{class:M(["relative flex flex-col items-center transition-all duration-700",f.value?"mt-6":"mt-1"])},[f.value?d("",!0):(s(),o("div",Ct)),t("button",{onClick:n[0]||(n[0]=r=>f.value=!f.value),class:"relative z-10 flex items-center gap-2 border border-black bg-white px-6 py-3 text-sm font-semibold uppercase tracking-widest transition-colors hover:bg-black hover:text-white"},[t("span",null,a(f.value?c(l)("products.show_less"):`${c(l)("products.show_more")} (${j.value.length})`),1),(s(),o("svg",{class:M(["h-4 w-4 transition-transform duration-500",f.value?"rotate-180":"rotate-0"]),fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[...n[1]||(n[1]=[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19 9l-7 7-7-7"},null,-1)])],2))])],2)])):d("",!0)])]),t("div",Mt,[t("div",null,[t("h1",It,a(e.product.title),1),t("p",zt,[y(a(u.value)+" ",1),n[2]||(n[2]=t("span",{class:"text-sm font-normal text-gray-500"},"MXN",-1))])]),e.product.link_store?(s(),o("a",{key:0,href:e.product.link_store,target:"_blank",class:"block w-full rounded-none bg-black px-6 py-3 text-center text-sm font-bold uppercase tracking-widest text-white transition-colors hover:bg-gray-800"},a(c(l)("products.buy_now")),9,Bt)):d("",!0),t("div",Ht,[t("h2",qt,a(c(l)("products.description"))+": ",1),t("div",{class:"prose prose-sm text-gray-700 leading-relaxed",innerHTML:e.product.description_long||e.product.description_short},null,8,Nt)]),t("div",Ft,[t("h2",Lt,a(c(l)("products.characteristics"))+": ",1),t("div",St,[e.product.color?(s(),o("p",Tt,[t("span",Vt,a(c(l)("products.color"))+":",1),y(" "+a(e.product.color),1)])):d("",!0),e.product.fragrance?(s(),o("p",Rt,[t("span",Ut,a(c(l)("products.fragrance"))+":",1),y(" "+a(e.product.fragrance),1)])):d("",!0),e.product.finish?(s(),o("p",Xt,[t("span",Et,a(c(l)("products.finish"))+":",1),y(" "+a(e.product.finish),1)])):d("",!0),e.product.alcohol_percent?(s(),o("p",At,[t("span",Gt,a(c(l)("products.alcohol_content"))+":",1),y(" "+a(e.product.alcohol_percent)+"% alc. Vol. ",1)])):d("",!0),e.product.volume_ml?(s(),o("p",Dt,[t("span",Ot,a(c(l)("products.volume"))+":",1),y(" "+a(e.product.volume_ml)+" ml ",1)])):d("",!0),e.product.agave_percent?(s(),o("p",Jt,[t("span",Kt,a(c(l)("products.agave"))+":",1),y(" "+a(e.product.agave_percent)+"% ",1)])):d("",!0)])]),t("div",Qt,[t("p",Wt,a(c(l)("products.warning")),1),t("p",Yt,a(c(l)("products.warning_text")),1)]),t("div",Zt,[t("p",Pt,a(c(l)("products.product_shared"))+": ",1),t("div",te,[t("a",{href:`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(h.$page.url)}`,target:"_blank",class:"flex h-10 w-10 items-center justify-center rounded-full bg-[#1877F2] text-white transition-opacity hover:opacity-80"},[...n[3]||(n[3]=[t("svg",{class:"h-5 w-5",fill:"currentColor",viewBox:"0 0 24 24"},[t("path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"})],-1)])],8,ee),t("a",{href:`https://twitter.com/intent/tweet?url=${encodeURIComponent(h.$page.url)}&text=${encodeURIComponent(e.product.title)}`,target:"_blank",class:"flex h-10 w-10 items-center justify-center rounded-full bg-black text-white transition-opacity hover:opacity-80"}
1,[...n[4]||(n[4]=[t("svg",{class:"h-4 w-4",fill:"currentColor",viewBox:"0 0 24 24"},[t("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})],-1)])],8,se),t("a",{href:`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(h.$page.url)}`,target:"_blank",class:"flex h-10 w-10 items-center justify-center rounded-full bg-[#0A66C2] text-white transition-opacity hover:opacity-80"},[...n[5]||(n[5]=[t("svg",{class:"h-5 w-5",fill:"currentColor",viewBox:"0 0 24 24"},[t("path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6zM2 9h4v12H2z"}),t("circle",{cx:"4",cy:"4",r:"2"})],-1)])],8,oe)])])])]),e.relatedProducts.length>0?(s(),o("div",le,[t("div",re,[t("h2",ae,a(c(l)("products.related_products")),1)]),t("div",ce,[(s(!0),o(g,null,$(e.relatedProducts,r=>(s(),B(c(S),{key:r.id,href:r.url,class:"group overflow-hidden rounded-lg bg-white shadow transition-all hover:shadow-xl"},{default:H(()=>[t("div",ie,[t("img",{src:r.cover,alt:r.title,class:"h-full w-full object-cover transition-transform group-hover:scale-110"},null,8,ne)]),t("div",de,[t("h3",ue,a(r.title),1),r.sale_price!=0||r.base_price!=0?(s(),o("p",he,a(new Intl.NumberFormat("es-MX",{style:"currency",currency:"MXN"}).format(r.sale_price||r.base_price)),1)):d("",!0)])]),_:2},1032,["href"]))),128))]),t("div",pe,[c(m).props.urls?.products?(s(),B(E,{key:0,href:c(m).props.urls.products,label:c(l)("products.view_all"),color:"var(--color-corralejo-700)","hover-color":"var(--color-corralejo-800)",class:"uppercase"},{icon:H(()=>[_(c(A),{class:"w-5 h-5 text-corralejo-gold-400"})]),_:1},8,["href","label"])):d("",!0)])])):d("",!0)]),_(R)]))}};export{$e as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.